Modules#
EmberGpTranslationTableAdditionalInfoBlockOptionRecordField
Green Power Data Types#
This file defines data types relevant to the Green Power implementation.
See gp-types.h for source code.
GP Types#
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.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of maximum option record entries in translation table.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
Number of GP sink list entries. Minimum is 2 sink list entries.
API#
DGp Send.
Process Gp Pairing.
Proxy table look up.
Get Proxy table entry.
Get Sink table entry.
Sink table look up.
Clear sink table.
Get Sink table entry.
Allocates an entry in sink able.
Remove an entry in sink table.
Initialize sink table.
Sets security frame counter in sink table entry.
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 EMBER_NULL_MESSAGE_BUFFER if not found.
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#
GP Types Documentation#
EmberGpSecurityLevel#
EmberGpSecurityLevel
Green Power Security Level.
Enumerator | |
---|---|
EMBER_GP_SECURITY_LEVEL_NONE | No Security |
EMBER_GP_SECURITY_LEVEL_RESERVED | Reserved |
EMBER_GP_SECURITY_LEVEL_FC_MIC | 4 Byte Frame Counter and 4 Byte MIC |
EMBER_GP_SECURITY_LEVEL_FC_MIC_ENCRYPTED | 4 Byte Frame Counter and 4 Byte MIC with encryption |
51
of file stack/include/gp-types.h
EmberGpKeyType#
EmberGpKeyType
Green Power Security Security Key Type.
Enumerator | |
---|---|
EMBER_GP_SECURITY_KEY_NONE | No Key |
EMBER_GP_SECURITY_KEY_NWK | GP Security Key Type is Zigbee Network Key |
EMBER_GP_SECURITY_KEY_GPD_GROUP | GP Security Key Type is Group Key |
EMBER_GP_SECURITY_KEY_NWK_DERIVED | GP Security Key Type is Derived Network Key |
EMBER_GP_SECURITY_KEY_GPD_OOB | GP Security Key Type is Out Of Box Key |
EMBER_GP_SECURITY_KEY_GPD_DERIVED | GP Security Key Type is GPD Derived Key |
70
of file stack/include/gp-types.h
EmberGpApplicationId#
EmberGpApplicationId
Green Power Application Id.
Enumerator | |
---|---|
EMBER_GP_APPLICATION_SOURCE_ID | Source identifier. |
EMBER_GP_APPLICATION_IEEE_ADDRESS | IEEE address. |
93
of file stack/include/gp-types.h
EmberGpProxyTableEntryStatus#
EmberGpProxyTableEntryStatus
GP proxy table entry status.
Enumerator | |
---|---|
EMBER_GP_PROXY_TABLE_ENTRY_STATUS_ACTIVE | The GP table entry is in use for a Proxy Table Entry. |
EMBER_GP_PROXY_TABLE_ENTRY_STATUS_UNUSED | The proxy table entry is not in use. |
110
of file stack/include/gp-types.h
EmberGpSinkTableEntryStatus#
EmberGpSinkTableEntryStatus
GP sink table entry status.
Enumerator | |
---|---|
EMBER_GP_SINK_TABLE_ENTRY_STATUS_ACTIVE | The GP table entry is in use for a Sink Table Entry. |
EMBER_GP_SINK_TABLE_ENTRY_STATUS_UNUSED | The proxy table entry is not in use. |
130
of file stack/include/gp-types.h
EmberGpSinkType#
EmberGpSinkType
GP Sink Type.
Enumerator | |
---|---|
EMBER_GP_SINK_TYPE_FULL_UNICAST | Sink Type is Full Unicast |
EMBER_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. |
EMBER_GP_SINK_TYPE_GROUPCAST | Sink type EMBER_GP_SINK_TYPE_GROUPCAST, the groupId can be obtained from the APS group table or from the sink table. |
EMBER_GP_SINK_TYPE_LW_UNICAST | Sink Type is Light Weight Unicast. |
EMBER_GP_SINK_TYPE_UNUSED | Unused sink type |
171
of file stack/include/gp-types.h
EmberCGpTxOption#
EmberCGpTxOption
CGp Transmit options.
Enumerator | |
---|---|
EMBER_CGP_TX_OPTION_NONE | No options. |
EMBER_CGP_TX_OPTION_USE_CSMA_CA | Use CSMA/CA. |
EMBER_CGP_TX_OPTION_USE_MAC_ACK | Use MAC ACK. |
EMBER_CGP_TX_OPTION_RESERVED | Reserved. |
326
of file stack/include/gp-types.h
EmberCGpAddressMode#
EmberCGpAddressMode
Addressing modes for CGp messages.
Enumerator | |
---|---|
EMBER_CGP_ADDRESS_MODE_NONE | No address (PAN identifier and address omitted). |
EMBER_CGP_ADDRESS_MODE_RESERVED | Reserved. |
EMBER_CGP_ADDRESS_MODE_SHORT | 16-bit short address. |
EMBER_CGP_ADDRESS_MODE_EXTENDED | 64-bit extended address. |
346
of file stack/include/gp-types.h
EmberDGpTxOption#
EmberDGpTxOption
Transmit options for DGp messages.
Enumerator | |
---|---|
EMBER_DGP_TX_OPTION_NONE | No options. |
EMBER_DGP_TX_OPTION_USE_GP_TX_QUEUE | Use gpTxQueue. |
EMBER_DGP_TX_OPTION_USE_CSMA_CA | Use CSMA/CA. |
EMBER_DGP_TX_OPTION_USE_MAC_ACK | Use MAC ACK. |
EMBER_DGP_TX_OPTION_FRAME_TYPE_DATA | Data frame. |
EMBER_DGP_TX_OPTION_FRAME_TYPE_MAINTENANCE | Maintenance frame. |
EMBER_DGP_TX_OPTION_RESERVED | Reserved. |
388
of file stack/include/gp-types.h
EmberGpSourceId#
typedef uint32_t EmberGpSourceId
32-bit GPD source identifier
41
of file stack/include/gp-types.h
EmberGpSecurityFrameCounter#
typedef uint32_t EmberGpSecurityFrameCounter
32-bit security frame counter
43
of file stack/include/gp-types.h
EmberGpMic#
typedef uint32_t EmberGpMic
32-bit MIC code
45
of file stack/include/gp-types.h
EMBER_GP_APPLICATION_ID_MASK#
#define EMBER_GP_APPLICATION_ID_MASKValue:
0x03
Number of GP sink list entries. Minimum is 2 sink list entries.
105
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.
225
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(EmberGpSinkGroup))))
Number of GP sink list entries. Minimum is 2 sink list entries.
228
of file stack/include/gp-types.h
GP_PARAMS#
#define GP_PARAMSValue:
Number of GP sink list entries. Minimum is 2 sink list entries.
434
of file stack/include/gp-types.h
GP_ARGS#
#define GP_ARGSValue:
Number of GP sink list entries. Minimum is 2 sink list entries.
450
of file stack/include/gp-types.h
GP_UNUSED_ARGS#
#define GP_UNUSED_ARGSValue:
Number of GP sink list entries. Minimum is 2 sink list entries.
466
of file stack/include/gp-types.h
GP_PROXY_TABLE_OPTIONS_IN_RANGE#
#define GP_PROXY_TABLE_OPTIONS_IN_RANGEValue:
(BIT(10))
Number of GP sink list entries. Minimum is 2 sink list entries.
482
of file stack/include/gp-types.h
GP_COMMISSIONING_MAX_BYTES#
#define GP_COMMISSIONING_MAX_BYTESValue:
(55 - 3)
Number of GP sink list entries. Minimum is 2 sink list entries.
485
of file stack/include/gp-types.h
TT_NB_MAX_OPTION_RECORD#
#define TT_NB_MAX_OPTION_RECORDValue:
(8)
Number of maximum option record entries in translation table.
610
of file stack/include/gp-types.h
GP_GPD_SRC_ID_FOR_CAHNNEL_CONFIG#
#define GP_GPD_SRC_ID_FOR_CAHNNEL_CONFIGValue:
0x00000000
Number of GP sink list entries. Minimum is 2 sink list entries.
659
of file stack/include/gp-types.h
GP_GPD_SRC_ID_WILDCARD#
#define GP_GPD_SRC_ID_WILDCARDValue:
0xFFFFFFFF
Number of GP sink list entries. Minimum is 2 sink list entries.
660
of file stack/include/gp-types.h
GP_GPD_SRC_ID_RESERVED_0#
#define GP_GPD_SRC_ID_RESERVED_0Value:
0x00000000
Number of GP sink list entries. Minimum is 2 sink list entries.
663
of file stack/include/gp-types.h
GP_GPD_SRC_ID_RESERVED_FFFFFF9#
#define GP_GPD_SRC_ID_RESERVED_FFFFFF9Value:
0xFFFFFFF9
Number of GP sink list entries. Minimum is 2 sink list entries.
664
of file stack/include/gp-types.h
GP_GPD_SRC_ID_RESERVED_FFFFFFA#
#define GP_GPD_SRC_ID_RESERVED_FFFFFFAValue:
0xFFFFFFFA
Number of GP sink list entries. Minimum is 2 sink list entries.
665
of file stack/include/gp-types.h
GP_GPD_SRC_ID_RESERVED_FFFFFFB#
#define GP_GPD_SRC_ID_RESERVED_FFFFFFBValue:
0xFFFFFFFB
Number of GP sink list entries. Minimum is 2 sink list entries.
666
of file stack/include/gp-types.h
GP_GPD_SRC_ID_RESERVED_FFFFFFC#
#define GP_GPD_SRC_ID_RESERVED_FFFFFFCValue:
0xFFFFFFFC
Number of GP sink list entries. Minimum is 2 sink list entries.
667
of file stack/include/gp-types.h
GP_GPD_SRC_ID_RESERVED_FFFFFFD#
#define GP_GPD_SRC_ID_RESERVED_FFFFFFDValue:
0xFFFFFFFD
Number of GP sink list entries. Minimum is 2 sink list entries.
668
of file stack/include/gp-types.h
GP_GPD_SRC_ID_RESERVED_FFFFFFE#
#define GP_GPD_SRC_ID_RESERVED_FFFFFFEValue:
0xFFFFFFFE
Number of GP sink list entries. Minimum is 2 sink list entries.
669
of file stack/include/gp-types.h
GP_DERIVED_GROUP_ALIAS_NOT_USED#
#define GP_DERIVED_GROUP_ALIAS_NOT_USEDValue:
0xffff
Number of GP sink list entries. Minimum is 2 sink list entries.
671
of file stack/include/gp-types.h
GP_DMIN_B#
#define GP_DMIN_BValue:
32
Number of GP sink list entries. Minimum is 2 sink list entries.
673
of file stack/include/gp-types.h
GP_DMIN_U#
#define GP_DMIN_UValue:
5
Number of GP sink list entries. Minimum is 2 sink list entries.
674
of file stack/include/gp-types.h
GP_DMAX#
#define GP_DMAXValue:
100
Number of GP sink list entries. Minimum is 2 sink list entries.
675
of file stack/include/gp-types.h
API Documentation#
emberDGpSend#
EmberStatus emberDGpSend (bool action, bool useCca, EmberGpAddress * 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 EmberGpAddress. |
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 EmberStatus as status.
704
of file stack/include/gp-types.h
emberGpProxyTableProcessGpPairing#
bool emberGpProxyTableProcessGpPairing (uint32_t options, EmberGpAddress * addr, uint8_t commMode, uint16_t sinkNwkAddress, uint16_t sinkGroupId, uint16_t assignedAlias, uint8_t * sinkIeeeAddress, EmberKeyData * gpdKey, uint32_t gpdSecurityFrameCounter, uint8_t forwardingRadius)
Process Gp Pairing.
N/A | options | option field of the Gp Pairing command, this holds the validity of other inputs. |
N/A | addr | The gpd address EmberGpAddress. |
N/A | commMode | Communication mode as supplied in the Gp Pairing command. |
N/A | sinkNwkAddress | Network address of the sink. |
N/A | sinkGroupId | Group Id of the sink. |
N/A | assignedAlias | Assigned alias for the GPD under commissioning. |
N/A | sinkIeeeAddress | sink EUI64 address |
N/A | gpdKey | GPD key |
N/A | gpdSecurityFrameCounter | security frame counter from GPD. |
N/A | forwardingRadius | forwarding radius |
This function adds or updates the entry in the proxy table as part of Gp Pairing command processing. All the input arguments for this API is derived directly from the incoming GP Pairing command
Returns
true on success and false for failure.
731
of file stack/include/gp-types.h
emberGpProxyTableLookup#
uint8_t emberGpProxyTableLookup (EmberGpAddress * addr)
Proxy table look up.
N/A | addr | The gpd address EmberGpAddress to look up. |
This function looks up a gpd address in the Gp Proxy Table and returns index of the entry.
Returns
a valid index to the entry in proxy table and 0xFF in case of not found.
749
of file stack/include/gp-types.h
emberGpProxyTableGetEntry#
EmberStatus emberGpProxyTableGetEntry (uint8_t proxyIndex, EmberGpProxyTableEntry * entry)
Get Proxy table entry.
N/A | proxyIndex | a valid index to proxy table. |
N/A | entry | proxy table entry |
This function gets an entry from proxy table at the supplied index.
Returns
An EmberStatus as status.
760
of file stack/include/gp-types.h
emberGpSinkTableGetEntry#
EmberStatus emberGpSinkTableGetEntry (uint8_t sinkIndex, EmberGpSinkTableEntry * entry)
Get Sink table entry.
N/A | sinkIndex | a valid index to sink table. |
N/A | entry | sink table entry |
This function gets an entry from sink table at the supplied index.
Returns
An EmberStatus as status.
772
of file stack/include/gp-types.h
emberGpSinkTableLookup#
uint8_t emberGpSinkTableLookup (EmberGpAddress * addr)
Sink table look up.
N/A | addr | The gpd address EmberGpAddress to look up. |
This function looks up a gpd address in the Gp Sink Table and returns index of the entry.
Returns
a valid index to the entry in proxy table and 0xFF in case of not found.
782
of file stack/include/gp-types.h
emberGpSinkTableClearAll#
void emberGpSinkTableClearAll (void )
Clear sink table.
N/A |
This function clears all entries in the sink table.
789
of file stack/include/gp-types.h
emberGpSinkTableSetEntry#
EmberStatus emberGpSinkTableSetEntry (uint8_t sinkTableIndex, EmberGpSinkTableEntry * entry)
Get Sink table entry.
N/A | sinkTableIndex | a valid index to sink table. |
N/A | entry | sink table entry |
This function gets an entry from sink table at the supplied index.
Returns
An EmberStatus as status.
800
of file stack/include/gp-types.h
emberGpSinkTableFindOrAllocateEntry#
uint8_t emberGpSinkTableFindOrAllocateEntry (EmberGpAddress * addr)
Allocates an entry in sink able.
N/A | addr | The gpd address EmberGpAddress to look up. |
This function looks up a gpd address in sink table. Returns the index of the entry if exists. If the entry is not found but there are space available in the table, allocates an entry and returns the index. If no space available returns 0xFF.
Returns
a valid index to the entry in proxy table and 0xFF in case of no space.
813
of file stack/include/gp-types.h
emberGpSinkTableRemoveEntry#
void emberGpSinkTableRemoveEntry (uint8_t index)
Remove an entry in sink table.
N/A | index |
This function removes an entry at the index provided.
820
of file stack/include/gp-types.h
emberGpSinkTableInit#
void emberGpSinkTableInit (void )
Initialize sink table.
N/A |
This function initializes the sink table in RAM. It copies the non-volatile sink table entries to a RAM table which is used during operation. By design,the non-volatile token entry for the sink table are compressed and does not hold the data that can be derived. This function is only called during initialization of the green power stack to initialize the entire table with derived data.
830
of file stack/include/gp-types.h
emberGpSinkTableSetSecurityFrameCounter#
void emberGpSinkTableSetSecurityFrameCounter (uint8_t index, uint32_t sfc)
Sets security frame counter in sink table entry.
N/A | index | Valid sink table entry index |
N/A | sfc | byte security frame counter |
This function sets the security frame counter for a sink table entry at an index.
839
of file stack/include/gp-types.h
emberGpGetTxQueueHead#
MessageBufferQueue * emberGpGetTxQueueHead (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 MessageBufferQueue
850
of file stack/include/gp-types.h
emberGpSetMaxTxQueueEntry#
void emberGpSetMaxTxQueueEntry (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.
856
of file stack/include/gp-types.h
emberGetGpMaxTxQListCount#
uint16_t emberGetGpMaxTxQListCount (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.
864
of file stack/include/gp-types.h
emberGetGpTxQListCount#
uint16_t emberGetGpTxQListCount (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.
872
of file stack/include/gp-types.h
emberGpGetTxQueueEntryFromQueue#
EmberMessageBuffer emberGpGetTxQueueEntryFromQueue (EmberGpTxQueueEntry * 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 EMBER_NULL_MESSAGE_BUFFER if not found.
N/A | txQueue | EmberGpTxQueueEntry 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 EmberMessageBuffer that holds the entry if found, null message buffer if not found.
887
of file stack/include/gp-types.h
emberGpAddGpTxQueueEntryWithPayload#
EmberMessageBuffer emberGpAddGpTxQueueEntryWithPayload (EmberGpTxQueueEntry * 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 | EmberGpTxQueueEntry 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 EmberMessageBuffer that holds the entry upon success else null message buffer.
900
of file stack/include/gp-types.h
emberGpRemoveFromTxQueue#
bool emberGpRemoveFromTxQueue (EmberGpTxQueueEntry * txQueue)
Remove an entry from Tx Queue This function searches and removes the entry provided.
N/A | txQueue | EmberGpTxQueueEntry 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.
910
of file stack/include/gp-types.h
emberGpClearTxQueue#
void emberGpClearTxQueue (void )
Purges Tx Queue This function purges the tx queue.
N/A |
916
of file stack/include/gp-types.h
Macro Definition Documentation#
EMBER_GP_BIDIRECTION_INFO_RX_AFTER_TX_MASK#
#define EMBER_GP_BIDIRECTION_INFO_RX_AFTER_TX_MASKValue:
0x01
33
of file stack/include/gp-types.h
EMBER_GP_BIDIRECTION_INFO_TX_QUEUE_AVAILABLE_MASK#
#define EMBER_GP_BIDIRECTION_INFO_TX_QUEUE_AVAILABLE_MASKValue:
0x02
35
of file stack/include/gp-types.h