Green Power Server#
API and Callbacks for the Green Power Cluster Server Component.
A component implementing the server-side functionality of the Green Power cluster.
Modules#
sl_zigbee_af_green_power_server_commissioning_state_t
sli_zigbee_gp_device_id_and_command_map_t
sli_zigbee_gp_device_id_and_cluster_map_t
sli_zigbee_gp_comm_data_saved_t
API#
Get a GPD commissioning instance in a multiple GPD commissioning session.
Delete a GPD commissioning instance in a multiple GPD commissioning session.
Extend the commissioning window of a commissioning session.
Get the commissioning state of the green power server.
Derive the shared key from the sink attributes.
Clears the entry for a GPD in sink table.
Close the commissioning window of current commissioning session.
Enumerations#
Typedefs#
GP Server network state.
Describes how the GP server accesses or updates the sink table.
Represents the current state of GP sink commissioning.
Specifies the type of timeout used during GP sink commissioning.
Indicates the result or status of a GP sink pairing attempt.
Identifies the source that triggered the pre-sink-pairing callback.
Cached commissioning information for a Green Power Device (GPD).
Variables#
Functions#
Macros#
API Documentation#
sl_zigbee_af_green_power_server_find_commissioning_gpd_instance#
sl_zigbee_commissioning_gpd_t * sl_zigbee_af_green_power_server_find_commissioning_gpd_instance (sl_zigbee_gp_address_t * gpdAddr)
Get a GPD commissioning instance in a multiple GPD commissioning session.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_zigbee_gp_address_t * | [in] | gpdAddr | GPD address |
The green power server can be configured to allow multiple GPDs to commission within a commissioning session. Given a GPD instance address, this function will find the currently-commissioning GPD instance. This is a helpful indicator of the commissioning progress of a given GPD when multi GPDS are commissioning in a commissioning window.
Returns
Information on the commissioning pointed by a structure sli_zigbee_gp_comm_data_saved_t type about the GPD.
sl_zigbee_af_green_power_server_delete_commissioning_gpd_instance#
void sl_zigbee_af_green_power_server_delete_commissioning_gpd_instance (sl_zigbee_gp_address_t * gpdAddr)
Delete a GPD commissioning instance in a multiple GPD commissioning session.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_zigbee_gp_address_t * | [in] | gpdAddr | GPD address |
The green power server can be configured to allow multiple GPDs to commission within a commissioning session. Given a GPD instance address, this function will find and delete the currently-commissioning GPD instance. This is a helpful way to remove unwanted GPD instances in a multiple GPD commissioning session.
sl_zigbee_af_green_power_cluster_gp_sink_commissioning_window_extend#
void sl_zigbee_af_green_power_cluster_gp_sink_commissioning_window_extend (uint16_t commissioningWindow)
Extend the commissioning window of a commissioning session.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint16_t | [in] | commissioningWindow | Commissioning window to be extended from this point in time in seconds |
This is a helper function that sends out a proxy commissioning mode from the server side to all proxies in the network. It internally uses the same parameters used previously in the proxy commissioning mode with action = enter.
sl_zigbee_af_green_power_cluster_get_server_commissioning_sate#
sl_zigbee_af_green_power_server_commissioning_state_t * sl_zigbee_af_green_power_cluster_get_server_commissioning_sate (void )
Get the commissioning state of the green power server.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
This function gets the commissioning state of the green power server.
Returns
Server commissioning state and related parameters pointed by structure sl_zigbee_af_green_power_server_commissioning_state_t
sl_zigbee_af_green_power_server_derive_shared_key_from_sink_attribute
sl_zigbee_af_status_t sl_zigbee_af_green_power_server_derive_shared_key_from_sink_attribute (uint8_t * gpsSecurityKeyTypeAtrribute, sl_zigbee_key_data_t * gpSharedKeyAttribute, sl_zigbee_gp_address_t * gpdAddr)
Derive the shared key from the sink attributes.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint8_t * | [in] | gpsSecurityKeyTypeAtrribute | Security key type attribute |
| sl_zigbee_key_data_t * | [out] | gpSharedKeyAttribute | Security key attribute |
| sl_zigbee_gp_address_t * | [in] | gpdAddr | GPD address |
This function derives the shared key used in green power server side using the respective security attribute values.
Returns
Status of the key derivation
sl_zigbee_af_green_power_server_remove_sink_entry#
void sl_zigbee_af_green_power_server_remove_sink_entry (sl_zigbee_gp_address_t * gpdAddr)
Clears the entry for a GPD in sink table.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_zigbee_gp_address_t * | [in] | gpdAddr | GPD address |
This function clears the entries in the sink table for a given gpd. In a sink table, there is unique entry for each GPD based on its addressing. When the GPD addressing uses application id=0b000 with 32 bit sourceId, there is just one entry for each GPD. But, when the GPD addressing with application Id=0b010 that is EUI64 with endpoint id, for each unique endpoint, there can be an entry in sink table. Hence, when this function is called with application Id=0b010,EUI64 with endpoint id=0xff(all endpoints), it clears all the entry for that GPD with supplied EUI64. With clear up the gpd from sink table it also clears the translation table for that GPD.
sl_zigbee_af_green_power_cluster_gp_sink_close_commissioning_window#
bool sl_zigbee_af_green_power_cluster_gp_sink_close_commissioning_window (void )
Close the commissioning window of current commissioning session.
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
This is a helper function that closes a commissioning session if there is no active GPD commissioning in progress. If the commissioning session started with "InvolveProxy" option, then it also sends out a proxy commissioning mode message with action to exit commissioning from the server side to all proxies in the network. It internally uses the same parameters used previously in the proxy commissioning mode entered but with action as "exit".
Returns
Status of the command as true when success or there is no open commissioning window. Returns false for failure of the command for any reason or there is any GPD that is still undergoing commissioning process or a failure.
Enumeration Documentation#
GreenPowerServerGPSNodeState#
GreenPowerServerGPSNodeState
| Enumerator | |
|---|---|
| GREEN_POWER_SERVER_GPS_NODE_STATE_NOT_IN_NETWORK | Node not in network |
| GREEN_POWER_SERVER_GPS_NODE_STATE_IN_NETWORK | Node in network |
GreenPowerServerSinkTableAccessType#
GreenPowerServerSinkTableAccessType
| Enumerator | |
|---|---|
| GREEN_POWER_SERVER_SINK_TABLE_ACCESS_TYPE_REMOVE_GPD | Remove GPD from Sink Table |
| GREEN_POWER_SERVER_SINK_TABLE_ACCESS_TYPE_ADD_GPD | Add GPD in Sink Table |
| GREEN_POWER_SERVER_SINK_TABLE_ACCESS_TYPE_UNKNOWN | Access type unknown |
GPSinkCommState#
GPSinkCommState
| Enumerator | |
|---|---|
| GP_SINK_COMM_STATE_IDLE | Idle |
| GP_SINK_COMM_STATE_COLLECT_REPORTS | Collect reports |
| GP_SINK_COMM_STATE_SEND_COMM_REPLY | Send commissioning reply |
| GP_SINK_COMM_STATE_WAIT_FOR_SUCCESS | Wait for success |
| GP_SINK_COMM_STATE_FINALISE_PAIRING | Finalize pairing |
| GP_SINK_COMM_STATE_PAIRING_DONE | Pairing done |
CommissioningTimeoutType#
CommissioningTimeoutType
| Enumerator | |
|---|---|
| COMMISSIONING_TIMEOUT_TYPE_GENERIC_SWITCH | Generic switch |
| COMMISSIONING_TIMEOUT_TYPE_MULTI_SENSOR | Multi-sensor |
| COMMISSIONING_TIMEOUT_TYPE_COMMISSIONING_WINDOW_TIMEOUT | Commissioning window timeout |
PairingStatus#
PairingStatus
| Enumerator | |
|---|---|
| SINK_PAIRING_STATUS_SUCCESS | Success |
| SINK_PAIRING_STATUS_FAILURE | Failure |
| SINK_PAIRING_STATUS_IN_PROGRESS | In progress |
| SINK_PAIRING_STATUS_FAIL_NO_MATCHING_FUNCTIONALITY | Failure (No matching functionality) |
| SINK_PAIRING_STATUS_FAIL_ADDING_TRANSLATION | Failure (Adding translation) |
| SINK_PAIRING_STATUS_FAIL_NO_SPACE_IN_SINK_TABLE | Failure (No space in sink table) |
| SINK_PAIRING_STATUS_FAIL_ENTRY_CORRUPTED | Failure (Entry corrupted) |
PreSinkPairingCallbackSource#
PreSinkPairingCallbackSource
| Enumerator | |
|---|---|
| GP_PRE_SINK_PAIRING_CALLBACK_SOURCE_UNKNOWN | Unknown |
| GP_PRE_SINK_PAIRING_CALLBACK_COMMISSONING_FINALIZE | Commissioning finalize |
| GP_PRE_SINK_PAIRING_CALLBACK_PAIRING_CONFIGURATION | Pairing configuration |
Typedef Documentation#
sli_zigbee_gps_network_state_t#
typedef uint8_t sli_zigbee_gps_network_state_t
GP Server network state.
sl_zigbee_af_gp_server_sink_table_access_type_t#
typedef uint8_t sl_zigbee_af_gp_server_sink_table_access_type_t
Describes how the GP server accesses or updates the sink table.
sl_zigbee_sink_commission_state_t#
typedef uint8_t sl_zigbee_sink_commission_state_t
Represents the current state of GP sink commissioning.
sl_zigbee_sink_commissioning_timeout_type_t#
typedef uint8_t sl_zigbee_sink_commissioning_timeout_type_t
Specifies the type of timeout used during GP sink commissioning.
sl_zigbee_sink_pairing_status_t#
typedef uint8_t sl_zigbee_sink_pairing_status_t
Indicates the result or status of a GP sink pairing attempt.
sl_zigbee_pre_sink_pairing_callback_source_t#
typedef uint8_t sl_zigbee_pre_sink_pairing_callback_source_t
Identifies the source that triggered the pre-sink-pairing callback.
sl_zigbee_commissioning_gpd_t#
typedef sli_zigbee_gp_comm_data_saved_t sl_zigbee_commissioning_gpd_t
Cached commissioning information for a Green Power Device (GPD).
Variable Documentation#
sl_zigbee_af_green_power_server_generic_switch_commissioning_timeout_event#
sl_zigbee_af_event_t sl_zigbee_af_green_power_server_generic_switch_commissioning_timeout_event
sl_zigbee_af_green_power_server_multi_sensor_commissioning_timeout_event#
sl_zigbee_af_event_t sl_zigbee_af_green_power_server_multi_sensor_commissioning_timeout_event
sl_zigbee_af_green_power_server_commissioning_window_timeout_event#
sl_zigbee_af_event_t sl_zigbee_af_green_power_server_commissioning_window_timeout_event
Function Documentation#
sl_zigbee_af_green_power_server_generic_switch_commissioning_timeout_event_handler#
void sl_zigbee_af_green_power_server_generic_switch_commissioning_timeout_event_handler (sl_zigbee_af_event_t * event)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_zigbee_af_event_t * | N/A | event |
sl_zigbee_af_green_power_server_multi_sensor_commissioning_timeout_event_handler#
void sl_zigbee_af_green_power_server_multi_sensor_commissioning_timeout_event_handler (sl_zigbee_af_event_t * event)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_zigbee_af_event_t * | N/A | event |
sl_zigbee_af_green_power_server_commissioning_window_timeout_event_handler#
void sl_zigbee_af_green_power_server_commissioning_window_timeout_event_handler (sl_zigbee_af_event_t * event)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| sl_zigbee_af_event_t * | N/A | event |