Application Framework Common#

Application framework common.

Declare all required application framework globals, initialize the Connect stack, and dispatch stack callbacks calls as needed to the application components.

Callbacks#

void

Application Framework Initialization Callback.

void

Application Framework Tick Callback.

void
emberAfStackStatusCallback(EmberStatus status)

Application framework equivalent of emberStackStatusHandler.

void
emberAfIncomingMessageCallback(EmberIncomingMessage *message)

Application framework equivalent of emberIncomingMessageHandler.

void
emberAfIncomingMacMessageCallback(EmberIncomingMacMessage *message)

Application framework equivalent of emberIncomingMacMessageHandler.

void
emberAfMessageSentCallback(EmberStatus status, EmberOutgoingMessage *message)

Application framework equivalent of emberMessageSentHandler.

void
emberAfMacMessageSentCallback(EmberStatus status, EmberOutgoingMacMessage *message)

Application framework equivalent of emberMacMessageSentHandler.

void
emberAfChildJoinCallback(EmberNodeType nodeType, EmberNodeId nodeId)

Application framework equivalent of emberChildJoinHandler.

void

Application framework equivalent of emberActiveScanCompleteHandler.

void
emberAfEnergyScanCompleteCallback(int8_t mean, int8_t min, int8_t max, uint16_t variance)

Application framework equivalent of emberEnergyScanCompleteHandler.

void

Application framework equivalent of ::emberMarkApplicationBuffersHandler.

void
emberAfIncomingBeaconCallback(EmberPanId panId, EmberMacAddress *source, int8_t rssi, bool permitJoining, uint8_t beaconFieldsLength, uint8_t *beaconFields, uint8_t beaconPayloadLength, uint8_t *beaconPayload)

Application framework equivalent of emberIncomingBeaconHandler.

void
bool
emberAfStackIdleCallback(uint32_t *idleTimeMs)

Application framework equivalent of emberStackIdleHandler.

bool
emberAfCommonOkToEnterLowPowerCallback(bool enter_em2, uint32_t duration_ms)

Application framework Low Power notification Callback.

Functions#

emberAfAllocateEvent(EmberEventControl **control, void(*handler)(void))

Allocate a new event to the app event table.

Callbacks Documentation#

emberAfInitCallback#

void emberAfInitCallback (void )

Application Framework Initialization Callback.

Parameters
TypeDirectionArgument NameDescription
voidN/A

A callback invoked once during the initialization. It is called after the stack and plugins initialization.


emberAfTickCallback#

void emberAfTickCallback (void )

Application Framework Tick Callback.

Parameters
TypeDirectionArgument NameDescription
voidN/A

A callback invoked in each iteration of the application super loop and can be used to perform periodic functions. The frequency with which this function is called depends on how quickly the main loop runs. If the application blocks at any time during the main loop, this function will not be called until execution resumes.


emberAfStackStatusCallback#

void emberAfStackStatusCallback (EmberStatus status)

Application framework equivalent of emberStackStatusHandler.

Parameters
TypeDirectionArgument NameDescription
EmberStatusN/Astatus

emberAfIncomingMessageCallback#

void emberAfIncomingMessageCallback (EmberIncomingMessage * message)

Application framework equivalent of emberIncomingMessageHandler.

Parameters
TypeDirectionArgument NameDescription
EmberIncomingMessage *N/Amessage

emberAfIncomingMacMessageCallback#

void emberAfIncomingMacMessageCallback (EmberIncomingMacMessage * message)

Application framework equivalent of emberIncomingMacMessageHandler.

Parameters
TypeDirectionArgument NameDescription
EmberIncomingMacMessage *N/Amessage

emberAfMessageSentCallback#

void emberAfMessageSentCallback (EmberStatus status, EmberOutgoingMessage * message)

Application framework equivalent of emberMessageSentHandler.

Parameters
TypeDirectionArgument NameDescription
EmberStatusN/Astatus
EmberOutgoingMessage *N/Amessage

emberAfMacMessageSentCallback#

void emberAfMacMessageSentCallback (EmberStatus status, EmberOutgoingMacMessage * message)

Application framework equivalent of emberMacMessageSentHandler.

Parameters
TypeDirectionArgument NameDescription
EmberStatusN/Astatus
EmberOutgoingMacMessage *N/Amessage

emberAfChildJoinCallback#

void emberAfChildJoinCallback (EmberNodeType nodeType, EmberNodeId nodeId)

Application framework equivalent of emberChildJoinHandler.

Parameters
TypeDirectionArgument NameDescription
EmberNodeTypeN/AnodeType
EmberNodeIdN/AnodeId

Warnings

  • Requires the parent support plugin installed.


emberAfActiveScanCompleteCallback#

void emberAfActiveScanCompleteCallback (void )

Application framework equivalent of emberActiveScanCompleteHandler.

Parameters
TypeDirectionArgument NameDescription
voidN/A

emberAfEnergyScanCompleteCallback#

void emberAfEnergyScanCompleteCallback (int8_t mean, int8_t min, int8_t max, uint16_t variance)

Application framework equivalent of emberEnergyScanCompleteHandler.

Parameters
TypeDirectionArgument NameDescription
int8_tN/Amean
int8_tN/Amin
int8_tN/Amax
uint16_tN/Avariance

emberAfMarkApplicationBuffersCallback#

void emberAfMarkApplicationBuffersCallback (void )

Application framework equivalent of ::emberMarkApplicationBuffersHandler.

Parameters
TypeDirectionArgument NameDescription
voidN/A

emberAfIncomingBeaconCallback#

void emberAfIncomingBeaconCallback (EmberPanId panId, EmberMacAddress * source, int8_t rssi, bool permitJoining, uint8_t beaconFieldsLength, uint8_t * beaconFields, uint8_t beaconPayloadLength, uint8_t * beaconPayload)

Application framework equivalent of emberIncomingBeaconHandler.

Parameters
TypeDirectionArgument NameDescription
EmberPanIdN/ApanId
EmberMacAddress *N/Asource
int8_tN/Arssi
boolN/ApermitJoining
uint8_tN/AbeaconFieldsLength
uint8_t *N/AbeaconFields
uint8_tN/AbeaconPayloadLength
uint8_t *N/AbeaconPayload

emberAfFrequencyHoppingStartClientCompleteCallback#

void emberAfFrequencyHoppingStartClientCompleteCallback (EmberStatus status)

Application framework equivalent of emberFrequencyHoppingStartClientCompleteHandler.

Parameters
TypeDirectionArgument NameDescription
EmberStatusN/Astatus

emberAfRadioNeedsCalibratingCallback#

void emberAfRadioNeedsCalibratingCallback (void )

Application framework equivalent of emberRadioNeedsCalibratingHandler.

Parameters
TypeDirectionArgument NameDescription
voidN/A

emberAfStackIdleCallback#

bool emberAfStackIdleCallback (uint32_t * idleTimeMs)

Application framework equivalent of emberStackIdleHandler.

Parameters
TypeDirectionArgument NameDescription
uint32_t *N/AidleTimeMs

emberAfCommonOkToEnterLowPowerCallback#

bool emberAfCommonOkToEnterLowPowerCallback (bool enter_em2, uint32_t duration_ms)

Application framework Low Power notification Callback.

Parameters
TypeDirectionArgument NameDescription
bool[in]enter_em2

true if the system is about to sleep or false to idle.

uint32_t[in]duration_ms

Duration of the low power period. Time to the next event.

A callback invoked when the system is about to go sleeping.

Returns

  • true if the application allows the system to go to sleep.


Function Documentation#

emberAfAllocateEvent#

EmberStatus emberAfAllocateEvent (EmberEventControl ** control, void(*)(void) handler)

Allocate a new event to the app event table.

Parameters
TypeDirectionArgument NameDescription
EmberEventControl **[out]control

The EmberEventControl to allocate

void(*)(void)[in]handler

Pointer to the handler function associated to the event

Returns

See Also