Green Power Server#
Callbacks for Green Power Server Component.
Callbacks#
Green power server commissioning timeout callback.
Green power server pairing complete callback.
Sink table access notification callback.
Green power server commissioning callback.
Green power server security failure callback.
Green power server update involved TC callback.
Green power server notification forward callback.
Green power commissioning notification callback.
Sink commissioning enter call status notification callback.
Callbacks Documentation#
emberAfGreenPowerServerCommissioningTimeoutCallback#
void emberAfGreenPowerServerCommissioningTimeoutCallback (uint8_t commissioningTimeoutType, uint8_t numberOfEndpoints, uint8_t * endpoint)
Green power server commissioning timeout callback.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | N/A | commissioningTimeoutType | one of the types COMMISSIONING_TIMEOUT_TYPE_COMMISSIONING_WINDOW_TIMEOUT, COMMISSIONING_TIMEOUT_TYPE_GENERIC_SWITCH or COMMISSIONING_TIMEOUT_TYPE_MULTI_SENSOR Ver.: always |
uint8_t | N/A | numberOfEndpoints | Number of sink endpoints participated in the commissioning Ver.: always |
uint8_t * | N/A | endpoint | list of sink endpoints Ver.: always |
This function is called by the Green Power Server upon expiration of any of the commissioning timers, which can be server commissioning window, generic switch commissioning, or multi-sensor commissioning timer expiration.
emberAfGreenPowerServerPairingCompleteCallback#
void emberAfGreenPowerServerPairingCompleteCallback (uint8_t numberOfEndpoints, uint8_t * endpoint)
Green power server pairing complete callback.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | N/A | numberOfEndpoints | number of sink endpoints participated in the pairing Ver.: always |
uint8_t * | N/A | endpoint | list of sink endpoints Ver.: always |
This function is called by the Green Power Server upon the completion of the pairing to indicate the closure of the pairing session.
emberAfPluginGreenPowerServerSinkTableAccessNotificationCallback#
bool emberAfPluginGreenPowerServerSinkTableAccessNotificationCallback (void * data, EmberAfGpServerSinkTableAccessType accessType)
Sink table access notification callback.
Type | Direction | Argument Name | Description |
---|---|---|---|
void * | N/A | data | void pointer to the data Ver.: always |
EmberAfGpServerSinkTableAccessType | N/A | accessType | accessType Ver.: always |
This function is called by the green power server plugin to notify the application about Green Power Device addition or removal by the green power server to the Sink Table. If returned false, the sink table remains un-accessed.
Returns
true if the access is granted.
emberAfPluginGreenPowerServerGpdCommissioningCallback#
bool emberAfPluginGreenPowerServerGpdCommissioningCallback (EmberGpApplicationInfo * appInfo, bool * matchFound)
Green power server commissioning callback.
Type | Direction | Argument Name | Description |
---|---|---|---|
EmberGpApplicationInfo * | N/A | appInfo | Application information of the commissioning GPD. Ver.: always |
bool * | N/A | matchFound | Output flag to notify matching functionality. Ver.: always |
This function is called by the green power server plugin to notify the application of a Green Power Device that has requested commissioning with this sink. Returns false if callback is not handled, true if callback is handled. When the callback is handled, it must set the matchFound argument appropriately to indicate if the matching functionality is found on the sink or not.
Returns
true if application handled it Ver.: always
emberAfPluginGreenPowerServerGpdSecurityFailureCallback#
void emberAfPluginGreenPowerServerGpdSecurityFailureCallback (EmberGpAddress * gpdAddr)
Green power server security failure callback.
Type | Direction | Argument Name | Description |
---|---|---|---|
EmberGpAddress * | N/A | gpdAddr | Ver.: always |
This function is called by the green power server plugin to notify the application of a Green Power Security Processing failed for an incoming notification.
emberAfGreenPowerServerUpdateInvolveTCCallback#
bool emberAfGreenPowerServerUpdateInvolveTCCallback (EmberStatus status)
Green power server update involved TC callback.
Type | Direction | Argument Name | Description |
---|---|---|---|
EmberStatus | N/A | status | Ver.: always |
This function is called by the Green Power Server to proceed with updating the InvolveTC bit of the security level attribute.
Returns
true if application handled it and plugin will not process it Ver.: always
emberAfGreenPowerClusterGpNotificationForwardCallback#
bool emberAfGreenPowerClusterGpNotificationForwardCallback (uint16_t options, EmberGpAddress * addr, uint32_t gpdSecurityFrameCounter, uint8_t gpdCommandId, uint8_t * gpdCommandPayload, uint16_t gppShortAddress, uint8_t gppDistance)
Green power server notification forward callback.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint16_t | N/A | options | from the incoming Gp Notification Command Ver.: always |
EmberGpAddress * | N/A | addr | GPD address Ver.: always |
uint32_t | N/A | gpdSecurityFrameCounter | Ver.: always |
uint8_t | N/A | gpdCommandId | Ver.: always |
uint8_t * | N/A | gpdCommandPayload | first byte is length of the payload Ver.: always |
uint16_t | N/A | gppShortAddress | Ver.: always |
uint8_t | N/A | gppDistance | Ver.: always |
This function is called by the green power server plugin to notify the application of a Green Power Gp Notification of an incoming gpd command. Return true to handle in application.
Returns
true if application handled it and plugin will not process it anymore. else return false to process the notification by the plugin Ver.: always
emberAfPluginGreenPowerServerGpdCommissioningNotificationCallback#
bool emberAfPluginGreenPowerServerGpdCommissioningNotificationCallback (uint8_t commandId, uint16_t commNotificationOptions, EmberGpAddress * gpdAddr, uint32_t gpdSecurityFrameCounter, uint8_t gpdCommandId, uint8_t * gpdCommandPayload, uint16_t gppShortAddress, int8_t rssi, uint8_t linkQuality, uint8_t gppDistance, uint32_t commissioningNotificationMic)
Green power commissioning notification callback.
Type | Direction | Argument Name | Description |
---|---|---|---|
uint8_t | N/A | commandId | Ver.: always |
uint16_t | N/A | commNotificationOptions | Ver.: always |
EmberGpAddress * | N/A | gpdAddr | Ver.: always |
uint32_t | N/A | gpdSecurityFrameCounter | Ver.: always |
uint8_t | N/A | gpdCommandId | Ver.: always |
uint8_t * | N/A | gpdCommandPayload | Ver.: always |
uint16_t | N/A | gppShortAddress | Ver.: always |
int8_t | N/A | rssi | Ver.: always |
uint8_t | N/A | linkQuality | Ver.: always |
uint8_t | N/A | gppDistance | Ver.: always |
uint32_t | N/A | commissioningNotificationMic | Ver.: always |
This function is called by the green power server plugin to notify the application about gp commissioning notification received by the sink. If the this function returns false indicating application does not handle the notification, the plugin will handle. If this returns true, the plugin will skip processing of the commissioning notification.
Returns
true if application handles it and plugin will not process it anymore. else return false to process the notification by the plugin Ver.: always
emberAfGreenPowerClusterCommissioningMessageStatusNotificationCallback#
void emberAfGreenPowerClusterCommissioningMessageStatusNotificationCallback (EmberAfGreenPowerServerCommissioningState * commissioningState, EmberApsFrame * apsFrame, EmberOutgoingMessageType messageType, uint16_t destination, EmberStatus status)
Sink commissioning enter call status notification callback.
Type | Direction | Argument Name | Description |
---|---|---|---|
EmberAfGreenPowerServerCommissioningState * | N/A | commissioningState | Sink commissioning state Ver.: always |
EmberApsFrame * | N/A | apsFrame | aps frame header Ver.: always |
EmberOutgoingMessageType | N/A | messageType | unicast or broadcast Ver.: always |
uint16_t | N/A | destination | destination node Ver.: always |
EmberStatus | N/A | status | status of the network submission Ver.: always |
This function is called by the green power server plugin from the sink commissioning enter command to notify the application of the status of the proxy commissioning enter message submission to network layer.