Green Power Data Types#
This file defines data types relevant to the Green Power implementation.
See gp-types.h for source code.
Modules#
sl_zigbee_gp_sink_list_entry_t
sl_zigbee_gp_proxy_table_entry_t
sl_zigbee_gp_sink_table_entry_t
sl_zigbee_gp_proxy_cluster_attributes_t
sl_zigbee_gp_application_info_t
sl_zigbee_gp_attribute_record_t
sl_zigbee_gp_data_point_descriptor_t
sl_zigbee_gp_report_descriptor_t
sl_zigbee_gp_switch_information_t
sl_zigbee_gp_generic_switch_data_t
sl_zigbee_gp_translation_table_additional_info_block_option_record_field_t
GP Types#
Green Power Security Level.
Green Power Security Level.
Green Power Security Security Key Type.
Green Power Application ID.
GP proxy table entry status.
GP sink table entry status.
GP Sink Type.
CGp Transmit options.
Addressing modes for CGp messages.
Transmit options for DGp messages.
API#
DGp Send.
Gets tx queue head.
Sets maximum limit for number of entries in the tx queue.
Gets the limit set for maximum number of entries in the tx queue.
Gets the number of entries in the tx queue.
Gets an entry from Tx Queue The function searches the tx queue using gpd address pointed by supplied in the input/output argument txQueue and returns the message buffer that currently holding the outgoing gpdf information, returns SL_ZIGBEE_NULL_MESSAGE_BUFFER if not found.
Gets the entry at the specified index of Tx Queue The function goes through the tx queue and populates the output parameters with the relevant entry if it exists.
Adds an entry to Tx Queue This function adds an entry along with supplied payload data to the Buffer queue. Returns the buffer handle if success else null message buffer upon failure.
Remove an entry from Tx Queue This function searches and removes the entry provided.
Purges Tx Queue This function purges the tx queue.
Macros#
Mask used in the green power endpoint incoming message handler to pass bidirectional information. Incoming GPDF has rxAfterTx bit set.
Mask to test if transmit queue is available at green power stub layer to hold an outgoing GPDF.
Number of GP sink list entries. Minimum is 2 sink list entries.
The size of the SinkList entries in sink table in form of octet string that has a format of [<1 byte length>, <n bytes for sink groups>].
GP parameters list represented as a macro for GP endpoint incoming message handler and callbacks prototypes.
GP arguments list represented as a macro while calling GP endpoint incoming message handler and callbacks.
GP arguments list with void type cast represented as a macro to be used in callback stubs.
Bit mask for the proxy table ebtry option bit representing in-range bit field.
Maximum number of bytes in a green power commissioning frame excluding 3 bytes for device ID, option and application information fields.
GPD Source ID when requesting channel request.
GPD wildcard Source ID.
GPD Reserved Source ID. Used in maintenance frame.
GPD Reserved Source ID. All addresses between 0xFFFFFFF9 and 0xFFFFFFFE are reserved.
GPD Reserved Source ID. All addresses between 0xFFFFFFF9 and 0xFFFFFFFE are reserved.
Default value for derived group ID when alias is not used.
Tunneling delay constant Dmin_b in milliseconds. Ref green power specification for more information on this constant.
Tunneling delay constant Dmin_u in milliseconds. Ref green power specification for more information on this constant.
Tunneling delay constant Dmax in milliseconds. Ref green power specification for more information on this constant.
GP Types Documentation#
sl_zigbee_gp_status_t#
sl_zigbee_gp_status_t
Green Power Security Level.
Enumerator | |
---|---|
SL_ZIGBEE_GP_STATUS_OK | Success Status |
SL_ZIGBEE_GP_STATUS_MATCH | Match Frame |
SL_ZIGBEE_GP_STATUS_DROP_FRAME | Drop Frame |
SL_ZIGBEE_GP_STATUS_UNPROCESSED | Frame Unprocessed |
SL_ZIGBEE_GP_STATUS_PASS_UNPROCESSED | Frame Pass Unprocessed |
SL_ZIGBEE_GP_STATUS_TX_THEN_DROP | Frame TX Then Drop |
SL_ZIGBEE_GP_STATUS_NO_SECURITY | No Security |
SL_ZIGBEE_GP_STATUS_AUTH_FAILURE | Security Failure |
178
of file stack/include/gp-types.h
sl_zigbee_gp_security_level_t#
sl_zigbee_gp_security_level_t
Green Power Security Level.
Enumerator | |
---|---|
SL_ZIGBEE_GP_SECURITY_LEVEL_NONE | No Security |
SL_ZIGBEE_GP_SECURITY_LEVEL_RESERVED | Reserved |
SL_ZIGBEE_GP_SECURITY_LEVEL_FC_MIC | 4 Byte Frame Counter and 4 Byte MIC |
SL_ZIGBEE_GP_SECURITY_LEVEL_FC_MIC_ENCRYPTED | 4 Byte Frame Counter and 4 Byte MIC with encryption |
206
of file stack/include/gp-types.h
sl_zigbee_gp_key_type_t#
sl_zigbee_gp_key_type_t
Green Power Security Security Key Type.
Enumerator | |
---|---|
SL_ZIGBEE_GP_SECURITY_KEY_NONE | No Key |
SL_ZIGBEE_GP_SECURITY_KEY_NWK | GP Security Key Type is Zigbee Network Key |
SL_ZIGBEE_GP_SECURITY_KEY_GPD_GROUP | GP Security Key Type is Group Key |
SL_ZIGBEE_GP_SECURITY_KEY_NWK_DERIVED | GP Security Key Type is Derived Network Key |
SL_ZIGBEE_GP_SECURITY_KEY_GPD_OOB | GP Security Key Type is Out Of Box Key |
SL_ZIGBEE_GP_SECURITY_KEY_GPD_DERIVED | GP Security Key Type is GPD Derived Key |
225
of file stack/include/gp-types.h
sl_zigbee_gp_application_id_t#
sl_zigbee_gp_application_id_t
Green Power Application ID.
Enumerator | |
---|---|
SL_ZIGBEE_GP_APPLICATION_SOURCE_ID | Source identifier. |
SL_ZIGBEE_GP_APPLICATION_IEEE_ADDRESS | IEEE address. |
248
of file stack/include/gp-types.h
sl_zigbee_gp_proxy_table_entry_status_t#
sl_zigbee_gp_proxy_table_entry_status_t
GP proxy table entry status.
Enumerator | |
---|---|
SL_ZIGBEE_GP_PROXY_TABLE_ENTRY_STATUS_ACTIVE | The GP table entry is in use for a Proxy Table Entry. |
SL_ZIGBEE_GP_PROXY_TABLE_ENTRY_STATUS_UNUSED | The proxy table entry is not in use. |
264
of file stack/include/gp-types.h
sl_zigbee_gp_sink_table_entry_status_t#
sl_zigbee_gp_sink_table_entry_status_t
GP sink table entry status.
Enumerator | |
---|---|
SL_ZIGBEE_GP_SINK_TABLE_ENTRY_STATUS_ACTIVE | The GP table entry is in use for a Sink Table Entry. |
SL_ZIGBEE_GP_SINK_TABLE_ENTRY_STATUS_UNUSED | The proxy table entry is not in use. |
284
of file stack/include/gp-types.h
sl_zigbee_gp_sink_type_t#
sl_zigbee_gp_sink_type_t
GP Sink Type.
Enumerator | |
---|---|
SL_ZIGBEE_GP_SINK_TYPE_FULL_UNICAST | Sink Type is Full Unicast |
SL_ZIGBEE_GP_SINK_TYPE_D_GROUPCAST | Sink Type is Derived groupcast, the group ID is derived from the GpdId during commissioning. The sink is added to the APS group with that groupId. |
SL_ZIGBEE_GP_SINK_TYPE_GROUPCAST | Sink type SL_ZIGBEE_GP_SINK_TYPE_GROUPCAST, the groupId can be obtained from the APS group table or from the sink table. |
SL_ZIGBEE_GP_SINK_TYPE_LW_UNICAST | Sink Type is Light Weight Unicast. |
SL_ZIGBEE_GP_SINK_TYPE_UNUSED | Unused sink type |
325
of file stack/include/gp-types.h
sl_zigbee_c_gp_tx_option_t#
sl_zigbee_c_gp_tx_option_t
CGp Transmit options.
Enumerator | |
---|---|
SL_ZIGBEE_CGP_TX_OPTION_NONE | No options. |
SL_ZIGBEE_CGP_TX_OPTION_USE_CSMA_CA | Use CSMA/CA. |
SL_ZIGBEE_CGP_TX_OPTION_USE_MAC_ACK | Use MAC ACK. |
SL_ZIGBEE_CGP_TX_OPTION_RESERVED | Reserved. |
472
of file stack/include/gp-types.h
sl_zigbee_c_gp_address_mode_t#
sl_zigbee_c_gp_address_mode_t
Addressing modes for CGp messages.
Enumerator | |
---|---|
SL_ZIGBEE_CGP_ADDRESS_MODE_NONE | No address (PAN identifier and address omitted). |
SL_ZIGBEE_CGP_ADDRESS_MODE_RESERVED | Reserved. |
SL_ZIGBEE_CGP_ADDRESS_MODE_SHORT | 16-bit short address. |
SL_ZIGBEE_CGP_ADDRESS_MODE_EXTENDED | 64-bit extended address. |
492
of file stack/include/gp-types.h
sl_zigbee_d_gp_tx_option_t#
sl_zigbee_d_gp_tx_option_t
Transmit options for DGp messages.
Enumerator | |
---|---|
SL_ZIGBEE_DGP_TX_OPTION_NONE | No options. |
SL_ZIGBEE_DGP_TX_OPTION_USE_GP_TX_QUEUE | Use gpTxQueue. |
SL_ZIGBEE_DGP_TX_OPTION_USE_CSMA_CA | Use CSMA/CA. |
SL_ZIGBEE_DGP_TX_OPTION_USE_MAC_ACK | Use MAC ACK. |
SL_ZIGBEE_DGP_TX_OPTION_FRAME_TYPE_DATA | Data frame. |
SL_ZIGBEE_DGP_TX_OPTION_FRAME_TYPE_MAINTENANCE | Maintenance frame. |
SL_ZIGBEE_DGP_TX_OPTION_RESERVED | Reserved. |
534
of file stack/include/gp-types.h
sl_zigbee_gp_source_id_t#
typedef uint32_t sl_zigbee_gp_source_id_t
32-bit GPD source identifier
171
of file stack/include/gp-types.h
sl_zigbee_gp_security_frame_counter_t#
typedef uint32_t sl_zigbee_gp_security_frame_counter_t
32-bit security frame counter
173
of file stack/include/gp-types.h
sl_zigbee_gp_mic_t#
typedef uint32_t sl_zigbee_gp_mic_t
32-bit MIC code
175
of file stack/include/gp-types.h
API Documentation#
sl_zigbee_d_gp_send#
sl_status_t sl_zigbee_d_gp_send (bool action, bool useCca, sl_zigbee_gp_address_t * addr, uint8_t gpdCommandId, uint8_t gpdAsduLength, uint8_t const * gpdAsdu, uint8_t gpepHandle, uint16_t gpTxQueueEntryLifetimeMs)
DGp Send.
N/A | action | Action to add (true) or remove (false) |
N/A | useCca | Use CCA for GPDF transmission. |
N/A | addr | The gpd address sl_zigbee_gp_address_t. |
N/A | gpdCommandId | GPD Command ID |
N/A | gpdAsduLength | ASDU Length. |
N/A | gpdAsdu | The ASDU buffer that holds the outgoing GPDF as payload. |
N/A | gpepHandle | Handle for the asdu. |
N/A | gpTxQueueEntryLifetimeMs | Life time in milliseconds in Tx queue after which it gets cleared. |
This API adds or removes an outgoing GPDF (passed as ASDU) in the GP stub layer. As part of Gp Response command processing by green power client cluster, this API submits a outgoing a channel configuration or a commissioning reply GPDF. Similarly, it is called with appropriate action to clear the Tx queue upon channel request timeout.
Returns
An ::sl_status_t as status.
776
of file stack/include/gp-types.h
sl_zigbee_gp_get_tx_queue_head#
sli_zigbee_message_buffer_queue_t * sl_zigbee_gp_get_tx_queue_head (void )
Gets tx queue head.
N/A |
This function gets the head pointer of the tx queue. Note : since it returns a pointer to memory the head, it 'll not be useful on host.
Returns
pointer to head of tx queue sli_zigbee_message_buffer_queue_t
794
of file stack/include/gp-types.h
sl_zigbee_gp_set_max_tx_queue_entry#
void sl_zigbee_gp_set_max_tx_queue_entry (uint16_t maxEntries)
Sets maximum limit for number of entries in the tx queue.
N/A | maxEntries |
This function sets the maximum number of entries the tx queue is supposed to grow.
800
of file stack/include/gp-types.h
sl_zigbee_get_gp_max_tx_q_list_count#
uint16_t sl_zigbee_get_gp_max_tx_q_list_count (void )
Gets the limit set for maximum number of entries in the tx queue.
N/A |
This function gets the limit set for the maximum number of entries the tx queue is supposed to hold.
Returns
limit to the maximum number of entries.
808
of file stack/include/gp-types.h
sl_zigbee_get_gp_tx_q_list_count#
uint16_t sl_zigbee_get_gp_tx_q_list_count (void )
Gets the number of entries in the tx queue.
N/A |
This function gets the number of entries present in tx queue.
Returns
number of entries.
816
of file stack/include/gp-types.h
sl_zigbee_gp_get_tx_queue_entry_from_queue#
sli_buffer_manager_buffer_t sl_zigbee_gp_get_tx_queue_entry_from_queue (sl_zigbee_gp_tx_queue_entry_t * txQueue, uint8_t * data, uint16_t * dataLength, uint16_t allocatedDataLength)
Gets an entry from Tx Queue The function searches the tx queue using gpd address pointed by supplied in the input/output argument txQueue and returns the message buffer that currently holding the outgoing gpdf information, returns SL_ZIGBEE_NULL_MESSAGE_BUFFER if not found.
N/A | txQueue | sl_zigbee_gp_tx_queue_entry_t A pointer to an allocated memory to get a copy of the tx queue entry from the buffer queue. The caller populates the addr field of this parameter which is used as a search key. |
N/A | data | A pointer to an allocated memory to get a copy of the gpd command payload if an entry is found. This can be passed as NULL if payload is not required by caller. |
N/A | dataLength | A pointer to hold the length of the gpd command payload when an entry is found and the data collector is non-NULL. |
N/A | allocatedDataLength | Size in bytes for the allocated memory for the data collector. If this value is smaller compared to length of the data in the queue, no data gets copied out. |
Returns
Buffer sli_buffer_manager_buffer_t that holds the entry if found, null message buffer if not found.
834
of file stack/include/gp-types.h
sl_zigbee_gp_get_tx_queue_entry_from_queue_index#
sl_status_t sl_zigbee_gp_get_tx_queue_entry_from_queue_index (uint8_t index, sl_zigbee_gp_tx_queue_entry_t * txQueue, uint8_t * payload, uint16_t * payload_len, allocatedDataLength)
Gets the entry at the specified index of Tx Queue The function goes through the tx queue and populates the output parameters with the relevant entry if it exists.
N/A | index | The index in the queue to retrieve from. |
N/A | txQueue | sl_zigbee_gp_tx_queue_entry_t A pointer to an allocated memory to get a copy of the tx queue entry from the buffer queue. The caller populates the addr field of this parameter which is used as a search key. |
N/A | payload | A pointer to an allocated memory to get a copy of the gpd command payload if an entry is found. This can be passed as NULL if payload is not required by caller. |
N/A | payload_len | A pointer to hold the length of the gpd command payload when an entry is found and the data collector is non-NULL. |
N/A | allocatedDataLength | Size in bytes for the allocated memory for the data collector. If this value is smaller compared to length of the data in the queue, no data gets copied out. |
Returns
sl_status_t SL_STATUS_OK if a valid entry was retrieved, SL_STATUS_NOT_FOUND if not.
856
of file stack/include/gp-types.h
sl_zigbee_gp_add_gp_tx_queue_entry_with_payload#
sli_buffer_manager_buffer_t sl_zigbee_gp_add_gp_tx_queue_entry_with_payload (sl_zigbee_gp_tx_queue_entry_t * txQueue, uint8_t * data, uint16_t dataLength)
Adds an entry to Tx Queue This function adds an entry along with supplied payload data to the Buffer queue. Returns the buffer handle if success else null message buffer upon failure.
N/A | txQueue | sl_zigbee_gp_tx_queue_entry_t A pointer to an allocated memory holding the entry with all the members of the structure assigned as needed. |
N/A | data | A pointer holding the data payload. Can be supplied as NULL if there is no data payload. |
N/A | dataLength | Length of the data. |
Returns
Buffer sli_buffer_manager_buffer_t that holds the entry upon success else null message buffer.
872
of file stack/include/gp-types.h
sl_zigbee_gp_remove_from_tx_queue#
bool sl_zigbee_gp_remove_from_tx_queue (sl_zigbee_gp_tx_queue_entry_t * txQueue)
Remove an entry from Tx Queue This function searches and removes the entry provided.
N/A | txQueue | sl_zigbee_gp_tx_queue_entry_t A pointer to an allocated memory holding the entry with gpd addr field assigned, which is used as for searching the tx queue. NOTE : Use of wildcard gpd addr (AppId = 0,SrcId = 0xFFFFFFFF) , removes all the entries of the tx queue. |
Returns
True upon success else false.
882
of file stack/include/gp-types.h
sl_zigbee_gp_clear_tx_queue#
void sl_zigbee_gp_clear_tx_queue (void )
Purges Tx Queue This function purges the tx queue.
N/A |
888
of file stack/include/gp-types.h
Macro Definition Documentation#
SL_ZIGBEE_GP_BIDIRECTION_INFO_RX_AFTER_TX_MASK#
#define SL_ZIGBEE_GP_BIDIRECTION_INFO_RX_AFTER_TX_MASKValue:
0x01
Mask used in the green power endpoint incoming message handler to pass bidirectional information. Incoming GPDF has rxAfterTx bit set.
37
of file stack/include/gp-types.h
SL_ZIGBEE_GP_BIDIRECTION_INFO_TX_QUEUE_AVAILABLE_MASK#
#define SL_ZIGBEE_GP_BIDIRECTION_INFO_TX_QUEUE_AVAILABLE_MASKValue:
0x02
Mask to test if transmit queue is available at green power stub layer to hold an outgoing GPDF.
42
of file stack/include/gp-types.h
GP_SINK_LIST_ENTRIES#
#define GP_SINK_LIST_ENTRIESValue:
2
Number of GP sink list entries. Minimum is 2 sink list entries.
47
of file stack/include/gp-types.h
GP_SIZE_OF_SINK_LIST_ENTRIES_OCTET_STRING#
#define GP_SIZE_OF_SINK_LIST_ENTRIES_OCTET_STRINGValue:
(1 + (GP_SINK_LIST_ENTRIES * (sizeof(sl_zigbee_gp_sink_group_t))))
The size of the SinkList entries in sink table in form of octet string that has a format of [<1 byte length>, <n bytes for sink groups>].
52
of file stack/include/gp-types.h
GP_PARAMS#
#define GP_PARAMSValue:
GP parameters list represented as a macro for GP endpoint incoming message handler and callbacks prototypes.
57
of file stack/include/gp-types.h
GP_ARGS#
#define GP_ARGSValue:
GP arguments list represented as a macro while calling GP endpoint incoming message handler and callbacks.
76
of file stack/include/gp-types.h
GP_UNUSED_ARGS#
#define GP_UNUSED_ARGSValue:
GP arguments list with void type cast represented as a macro to be used in callback stubs.
95
of file stack/include/gp-types.h
GP_PROXY_TABLE_OPTIONS_IN_RANGE#
#define GP_PROXY_TABLE_OPTIONS_IN_RANGEValue:
(BIT(10))
Bit mask for the proxy table ebtry option bit representing in-range bit field.
114
of file stack/include/gp-types.h
GP_COMMISSIONING_MAX_BYTES#
#define GP_COMMISSIONING_MAX_BYTESValue:
(55 - 3)
Maximum number of bytes in a green power commissioning frame excluding 3 bytes for device ID, option and application information fields.
119
of file stack/include/gp-types.h
GP_GPD_SRC_ID_FOR_CAHNNEL_CONFIG#
#define GP_GPD_SRC_ID_FOR_CAHNNEL_CONFIGValue:
0x00000000
GPD Source ID when requesting channel request.
124
of file stack/include/gp-types.h
GP_GPD_SRC_ID_WILDCARD#
#define GP_GPD_SRC_ID_WILDCARDValue:
0xFFFFFFFF
GPD wildcard Source ID.
129
of file stack/include/gp-types.h
GP_GPD_SRC_ID_RESERVED_0#
#define GP_GPD_SRC_ID_RESERVED_0Value:
0x00000000
GPD Reserved Source ID. Used in maintenance frame.
134
of file stack/include/gp-types.h
GP_GPD_SRC_ID_RESERVED_FFFFFF9#
#define GP_GPD_SRC_ID_RESERVED_FFFFFF9Value:
0xFFFFFFF9
GPD Reserved Source ID. All addresses between 0xFFFFFFF9 and 0xFFFFFFFE are reserved.
139
of file stack/include/gp-types.h
GP_GPD_SRC_ID_RESERVED_FFFFFFE#
#define GP_GPD_SRC_ID_RESERVED_FFFFFFEValue:
0xFFFFFFFE
GPD Reserved Source ID. All addresses between 0xFFFFFFF9 and 0xFFFFFFFE are reserved.
144
of file stack/include/gp-types.h
GP_DERIVED_GROUP_ALIAS_NOT_USED#
#define GP_DERIVED_GROUP_ALIAS_NOT_USEDValue:
0xffff
Default value for derived group ID when alias is not used.
149
of file stack/include/gp-types.h
GP_DMIN_B#
#define GP_DMIN_BValue:
32
Tunneling delay constant Dmin_b in milliseconds. Ref green power specification for more information on this constant.
154
of file stack/include/gp-types.h
GP_DMIN_U#
#define GP_DMIN_UValue:
5
Tunneling delay constant Dmin_u in milliseconds. Ref green power specification for more information on this constant.
159
of file stack/include/gp-types.h
GP_DMAX#
#define GP_DMAXValue:
100
Tunneling delay constant Dmax in milliseconds. Ref green power specification for more information on this constant.
164
of file stack/include/gp-types.h