ZigBee PRO Leaf Library Callbacks#

These callbacks are contributed by the ZigBee PRO Leaf Library plugin.

Functions#

void
emberPanIdConflictHandler(int8_t conflictCount)

Invoked by the EmberZNet stack to report the number of conflict reports exceeding (EMBER_PAN_ID_CONFLICT_REPORT_THRESHOLD - 1) within a period of 1 minute. Application can take care of what needs to be done after these number of conflicts are detected, for example do a panId updtae if needed (emberSendPanIdUpdate()). Without applications trigger, EmberZNet stack would not take any action on its own.

bool

Invoked by the EmberZNet stack to filter out incoming application MAC passthrough messages. If this returns true for a message the complete message will be passed to emberMacPassthroughMessageHandler() with a type of EMBER_MAC_PASSTHROUGH_APPLICATION.

emberPacketHandoffIncoming(EmberZigbeePacketType packetType, EmberMessageBuffer packetBuffer, uint8_t index, void *data)

Intercepts an incoming packet from the stack and hands off to a plugin for further processing.

emberPacketHandoffOutgoing(EmberZigbeePacketType packetType, EmberMessageBuffer packetBuffer, uint8_t index, void *data)

Intercepts an outgoing packet from the stack and hands off to a plugin for further processing.

Function Documentation#

emberOrphanNotificationHandler#

void emberOrphanNotificationHandler (EmberEUI64 longId)
Parameters
TypeDirectionArgument NameDescription
EmberEUI64N/AlongId

emberPanIdConflictHandler#

EmberStatus emberPanIdConflictHandler (int8_t conflictCount)

Invoked by the EmberZNet stack to report the number of conflict reports exceeding (EMBER_PAN_ID_CONFLICT_REPORT_THRESHOLD - 1) within a period of 1 minute. Application can take care of what needs to be done after these number of conflicts are detected, for example do a panId updtae if needed (emberSendPanIdUpdate()). Without applications trigger, EmberZNet stack would not take any action on its own.

Parameters
TypeDirectionArgument NameDescription
int8_tN/AconflictCount

Number of detected conflicts in last period

Returns

  • EmberStatus EMBER_SUCCESS by default. This status is not currently checked by the stack.


emberMacPassthroughFilterHandler#

bool emberMacPassthroughFilterHandler (uint8_t * macHeader)

Invoked by the EmberZNet stack to filter out incoming application MAC passthrough messages. If this returns true for a message the complete message will be passed to emberMacPassthroughMessageHandler() with a type of EMBER_MAC_PASSTHROUGH_APPLICATION.

Parameters
TypeDirectionArgument NameDescription
uint8_t *N/AmacHeader

A pointer to the initial portion of the incoming MAC header. This contains the MAC frame control and addressing fields. Subsequent MAC fields, and the MAC payload, may not be present.

Note that this callback may be invoked in ISR context and should execute as quickly as possible.

Note that this callback may be called more than once per incoming message. Therefore, the callback code should not depend on being called only once, and should return the same value each time it is called with a given header.

If the application includes this callback, it must define EMBER_APPLICATION_HAS_MAC_PASSTHROUGH_FILTER_HANDLER in its CONFIGURATION_HEADER.

Returns

  • true if the messages is an application MAC passthrough message.


emberPacketHandoffIncoming#

EmberPacketAction emberPacketHandoffIncoming (EmberZigbeePacketType packetType, EmberMessageBuffer packetBuffer, uint8_t index, void * data)

Intercepts an incoming packet from the stack and hands off to a plugin for further processing.

Parameters
TypeDirectionArgument NameDescription
EmberZigbeePacketTypeN/ApacketType

The type of packet and the target stack layer. See EmberZigbeePacketType.

EmberMessageBufferN/ApacketBuffer

The ::EmberMessageBuffer containing the packet. @parma index The starting index of the relevant packet data. The plugin\ will receive a flat copy of the packet starting from this index.

uint8_tN/Aindex

Auxiliary data pointer

void *N/Adata

Returns


emberPacketHandoffOutgoing#

EmberPacketAction emberPacketHandoffOutgoing (EmberZigbeePacketType packetType, EmberMessageBuffer packetBuffer, uint8_t index, void * data)

Intercepts an outgoing packet from the stack and hands off to a plugin for further processing.

Parameters
TypeDirectionArgument NameDescription
EmberZigbeePacketTypeN/ApacketType

The type of packet and the source stack layer. See EmberZigbeePacketType.

EmberMessageBufferN/ApacketBuffer

The ::EmberMessageBuffer containing the packet.

uint8_tN/Aindex

The starting index of the relevant packet data. The plugin\ will receive a flat copy of the packet starting from this index.

void *N/Adata

Auxiliary data pointer

Returns