ZigBee PRO Leaf Library Callbacks
Functions |
|
void | emberOrphanNotificationHandler (EmberEUI64 longId) |
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.
|
|
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.
|
|
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.
|
|
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.
|
Detailed Description
These callbacks are contributed by the ZigBee PRO Leaf Library plugin.
Function Documentation
◆ 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.
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.
- Parameters
-
macHeader
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.
- Returns
- true if the messages is an application MAC passthrough message.
Referenced by emberPacketHandoffOutgoing() .
◆ emberOrphanNotificationHandler()
void emberOrphanNotificationHandler | ( | EmberEUI64 |
longId
|
) |
Referenced by emberPacketHandoffOutgoing() .
◆ 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
-
packetType
The type of packet and the target stack layer. See EmberZigbeePacketType . packetBuffer
The ::EmberMessageBuffer containing the packet. index The starting index of the relevant packet data. The plugin\ will receive a flat copy of the packet starting from this index. data
Auxiliary data pointer
- Returns
- See EmberPacketAction
References EMBER_ACCEPT_PACKET .
Referenced by emberPacketHandoffOutgoing() .
◆ 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
-
packetType
The type of packet and the source stack layer. See EmberZigbeePacketType . packetBuffer
The ::EmberMessageBuffer containing the packet. index
The starting index of the relevant packet data. The plugin\ will receive a flat copy of the packet starting from this index. data
Auxiliary data pointer
- Returns
- See EmberPacketAction
References EMBER_ACCEPT_PACKET , EMBER_SUCCESS , emberMacPassthroughFilterHandler() , emberOrphanNotificationHandler() , emberPacketHandoffIncoming() , and emberPanIdConflictHandler() .
◆ 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
-
conflictCount
Number of detected conflicts in last period
- Returns
- EmberStatus EMBER_SUCCESS by default. This status is not currently checked by the stack.
References EMBER_SUCCESS .
Referenced by emberPacketHandoffOutgoing() .