XNCP Library Callbacks#
These callbacks are contributed by the XNCP Library plugin.
Functions#
Called when the NCP receives a custom EZSP message from the HOST.
Called when the NCP receives an incoming Zigbee PRO message.
Called when the NCP wants to inform the HOST of a callback that has been called on the NCP.
Enables or disables the processing of EZSP commands on the NCP.
Gets XNCP information.
Function Documentation#
emberAfPluginXncpIncomingCustomFrameCallback#
EmberStatus emberAfPluginXncpIncomingCustomFrameCallback (uint8_t messageLength, uint8_t * messagePayload, uint8_t * replyPayloadLength, uint8_t * replyPayload)
Called when the NCP receives a custom EZSP message from the HOST.
N/A | messageLength | The length of the messagePayload. |
N/A | messagePayload | The custom message that was sent from the HOST. Ver.: always |
N/A | replyPayloadLength | The length of the replyPayload. This needs to be set by the implementation for a properly formed response to be sent back to the HOST. Ver.: always |
N/A | replyPayload | The custom message to send back to the HOST in respose to the custom message. Ver.: always |
The message length and payload is passed to the callback in the first two arguments. The implementation can then fill in the replyPayload and set the replayPayloadLength to the number of bytes in the replyPayload. See documentation for the function ezspCustomFrame on sending these messages from the HOST.
Returns
An EmberStatus indicating the result of the custom message handling. This returned status is always the first byte of the EZSP response.
1016
of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/app/ncp/doc/callback.doc
emberAfIncomingMessageCallback#
bool emberAfIncomingMessageCallback (EmberIncomingMessageType type, EmberApsFrame * apsFrame, EmberMessageBuffer message)
Called when the NCP receives an incoming Zigbee PRO message.
N/A | type | The EmberIncomingMessageType of the incoming message. Ver.: always |
N/A | apsFrame | The EmberApsFrame recieved in the incoming message. Ver.: always |
N/A | message | The payload of the incoming message, in the form of an ::EmberMessageBuffer. Ver.: always |
This handling is done before any other action is taken by the NCP on the callback. If the function returns true, the incoming message is done being handled, and the NCP does not need to record the callback or report it to the HOST.
Returns
A ::bool value. If this value is true, the NCP will not handle the incoming message any further and it will not report the incoming message to the HOST. If the returned value is false, the NCP will continue to process the incoming message and the callback will also be passed to the HOST.
1044
of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/app/ncp/doc/callback.doc
emberAfPluginCommandHandlerPermitNcpToHostFrameCallback#
bool emberAfPluginCommandHandlerPermitNcpToHostFrameCallback (uint16_t frameId, uint8_t payloadLength, uint8_t * payload)
Called when the NCP wants to inform the HOST of a callback that has been called on the NCP.
N/A | frameId | The frameId of the callback. Ver.: always |
N/A | payloadLength | The length of the payload carried in the callback. Ver.: always |
N/A | payload | The actual payload carried by the callback. Ver.: always |
If this function returns false, the NCP will not notify the HOST of the callback. If the function returns true, then the NCP will continue scheduling the notification of the HOST regarding the callback.
Returns
A ::bool value. If the value is false, then the NCP will not notify the HOST of the callback. If the return value is true, the NCP will continue scheduling the notification of the HOST regarding the callback.
1069
of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/app/ncp/doc/callback.doc
emberAfPluginCommandHandlerPermitHostToNcpFrameCallback#
bool emberAfPluginCommandHandlerPermitHostToNcpFrameCallback (uint16_t frameId, uint8_t payloadLength, uint8_t * payload)
Enables or disables the processing of EZSP commands on the NCP.
N/A | frameId | The EZSP frame ID of the message. Ver.: always |
N/A | payloadLength | The length of the payload of the EZSP message. Ver.: always |
N/A | payload | The EZSP message payload. Ver.: always |
The application can use this callback to enable or disable the processing of EZSP commands on the NCP. If this function returns true, the frame will be handled by the NCP in a normal manner. If this function returns false, the NCP will disregard this command and respond to the HOST that it is an invalid frame.
Returns
A ::bool value indicating whether or not the frame will continue to be handled. If this function returns true, the frame will be handled by the NCP in a normal manner. If this function returns false, then the NCP will disregard this command and respond to the HOST that it is an invalid frame.
1095
of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/app/ncp/doc/callback.doc
emberAfPluginXncpGetXncpInformation#
void emberAfPluginXncpGetXncpInformation (uint16_t * manufacturerId, uint16_t * versionNumber)
Gets XNCP information.
N/A | manufacturerId | The version number of the NCP application. |
N/A | versionNumber | The manufacturer ID of the NCP application. |
This callback enables users to communicate the version number and manufacturer ID of their NCP application to the framework. This information is needed for the EZSP command frame called getXncpInfo. This callback will be called when that frame is received so that the application can report its version number and manufacturer ID to be sent back to the HOST.
1113
of file /Users/vihuszar/Git/EmbeddedSoftware/super/protocol/zigbee/app/ncp/doc/callback.doc