Functions

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.
 
bool emberAfIncomingMessageCallback (EmberIncomingMessageType type, EmberApsFrame *apsFrame, EmberMessageBuffer message)
 Called when the NCP receives an incoming Zigbee PRO message.
 
bool emberAfPluginCommandHandlerPermitNcpToHostFrameCallback (uint8_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.
 
bool emberAfPluginCommandHandlerPermitHostToNcpFrameCallback (uint8_t frameId, uint8_t payloadLength, uint8_t *payload)
 Enables or disables the processing of EZSP commands on the NCP.
 
void emberAfPluginXncpGetXncpInformation (uint16_t *manufacturerId, uint16_t *versionNumber)
 Gets XNCP information.

Detailed Description

These callbacks are contributed by the XNCP Library plugin.

Function Documentation

bool emberAfIncomingMessageCallback ( EmberIncomingMessageType  type,
EmberApsFrame apsFrame,
EmberMessageBuffer  message 
)

Called when the NCP receives an incoming Zigbee PRO message.

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.

Parameters
typeThe EmberIncomingMessageType of the incoming message. Ver.: always
apsFrameThe EmberApsFrame recieved in the incoming message. Ver.: always
messageThe payload of the incoming message, in the form of an EmberMessageBuffer. Ver.: always
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.
bool emberAfPluginCommandHandlerPermitHostToNcpFrameCallback ( uint8_t  frameId,
uint8_t  payloadLength,
uint8_t *  payload 
)

Enables or disables the processing of EZSP commands on the NCP.

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.

Parameters
frameIdThe EZSP frame ID of the message. Ver.: always
payloadLengthThe length of the payload of the EZSP message. Ver.: always
payloadThe EZSP message payload. Ver.: always
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.
bool emberAfPluginCommandHandlerPermitNcpToHostFrameCallback ( uint8_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.

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.

Parameters
frameIdThe frameId of the callback. Ver.: always
payloadLengthThe length of the payload carried in the callback. Ver.: always
payloadThe actual payload carried by the callback. Ver.: always
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.
void emberAfPluginXncpGetXncpInformation ( uint16_t *  manufacturerId,
uint16_t *  versionNumber 
)

Gets XNCP information.

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.

Parameters
versionNumberThe version number of the NCP application.
manufacturerIdThe manufacturer ID of the NCP application.
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.

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.

Parameters
messageLengthThe length of the messagePayload.
messagePayloadThe custom message that was sent from the HOST. Ver.: always
replyPayloadLengthThe 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
replyPayloadThe custom message to send back to the HOST in respose to the custom message. Ver.: always
Returns
An EmberStatus indicating the result of the custom message handling. This returned status is always the first byte of the EZSP response.

References EMBER_LIBRARY_NOT_PRESENT.