![Neo.cortec NCxxxx series Скачать руководство пользователя страница 13](http://html1.mh-extra.com/html/neo-cortec/ncxxxx-series/ncxxxx-series_integration-manual_718966013.webp)
- 13 of 18 –
neo.
cortec
.
Figure 2 - NcApi structure
The API serves as layer, which implements high-level functions for sending and
receiving payload data through the mesh network.
The API provides two basic functions to the application layer: NcApiInit &
NcApiSendAcknowledged.
NcApiInit
will have to be called once to initialize the API.
The
NcApiSendAcknowledged
function can be used to send payload data to another
node inside the mesh network.
When data is received from the mesh network, a series of call-back functions will call the
Application with the received data. Depending on what type of data is received, a type
specific call-back is issued. It is optional for the application layer to register for the call-
backs.
ReadCallback
will deliver a byte array containing the raw UART frame received
following the formats in section 0 “List of application data”. It is normally not necessary
to register for this callback, as there are other callbacks which are specific to the various
types of application data. These are described here:
The application layer can register for
HostAckCallback
. The callback is issued when the
module receives an ACK message for a previously send payload package. The callback
function delivers the NEOCORTEC ID for the node, which has send, the ACK.
The application layer can register for
HostNAckCallback
. The callback is issued when
the module receives an NAC message for a previously send payload package. The
callback function delivers the NEOCORTEC ID for the node, which has send, the NACK.