Green Power Common#

API and Callbacks for the Green Power Common Component.

A component that provides common functionalities between client and server sides of the Green Power components.

API#

uint16_t
sl_zigbee_af_fill_command_green_power_cluster_gp_notification_smart(uint16_t options, uint32_t gpdSrcId, uint8_t *gpdIeee, uint8_t gpdEndpoint, uint32_t gpdSecurityFrameCounter, uint8_t gpdCommandId, uint8_t gpdCommandPayloadLength, const uint8_t *gpdCommandPayload, uint16_t gppShortAddress, uint8_t gppDistance)

Prepare a GP notification command buffer.

uint16_t
sl_zigbee_af_fill_command_green_power_cluster_gp_pairing_search_smart(uint16_t options, uint32_t gpdSrcId, uint8_t *gpdIeee, uint8_t gpdEndpoint)

Prepare a GP pairing search command buffer.

uint16_t
sl_zigbee_af_fill_command_green_power_cluster_gp_tunneling_stop_smart(uint8_t options, uint32_t gpdSrcId, uint8_t *gpdIeee, uint8_t gpdEndpoint, uint32_t gpdSecurityFrameCounter, uint16_t gppShortAddress, int8_t gppDistance)

Prepare a GP tunneling stop command buffer.

uint16_t
sl_zigbee_af_fill_command_green_power_cluster_gp_commissioning_notification_smart(uint16_t options, uint32_t gpdSrcId, uint8_t *gpdIeee, uint8_t gpdEndpoint, uint8_t sequenceNumber, sl_zigbee_gp_security_level_t gpdfSecurityLevel, sl_zigbee_gp_security_frame_counter_t gpdSecurityFrameCounter, uint8_t gpdCommandId, uint8_t gpdCommandPayloadLength, const uint8_t *gpdCommandPayload, sl_802154_short_addr_t gppShortAddress, uint8_t gppLink, sl_zigbee_gp_mic_t mic)

Prepare a GP commissioning notification command buffer.

uint16_t
sl_zigbee_af_fill_command_green_power_cluster_gp_translation_table_update_smart(uint16_t options, uint32_t gpdSrcId, uint8_t *gpdIeee, uint8_t gpdEndpoint, uint8_t translationsLength, sl_zigbee_zcl_gp_translation_table_update_translation_t *translations, sl_zigbee_gp_translation_table_additional_info_block_option_record_field_t *additionnalInfoBlock)

Prepare a GP translation table update command buffer.

uint16_t
sl_zigbee_af_fill_command_green_power_cluster_gp_pairing_configuration_smart(uint8_t actions, uint16_t options, uint32_t gpdSrcId, uint8_t *gpdIeee, uint8_t gpdEndpoint, uint8_t gpdDeviceId, uint8_t groupListCount, uint8_t *groupList, uint16_t gpdAssignedAlias, uint8_t groupcastRadius, uint8_t securityOptions, uint32_t gpdSecurityFrameCounter, uint8_t *gpdSecurityKey, uint8_t numberOfPairedEndpoints, uint8_t *pairedEndpoints, uint8_t applicationInformation, uint16_t manufacturerId, uint16_t modeId, uint8_t numberOfGpdCommands, uint8_t *gpdCommandIdList, uint8_t clusterIdListCount, uint16_t *clusterListServer, uint16_t *clusterListClient, uint8_t switchInformationLength, uint8_t genericSwitchConfiguration, uint8_t currentContactStatus, uint8_t totalNumberOfReports, uint8_t numberOfReports, uint8_t *reportDescriptor)

Prepare a GP pairing configuration command buffer.

uint16_t
sl_zigbee_af_fill_command_green_power_cluster_gp_sink_table_request_smart(uint8_t options, uint32_t gpdSrcId, uint8_t *gpdIeee, uint8_t gpdEndpoint, uint8_t index)

Prepare a GP sink table request command buffer.

uint32_t
sl_zigbee_af_fill_command_green_power_cluster_gp_notification_response_smart(uint8_t options, uint32_t gpdSrcId, uint8_t *gpdIeee, uint8_t gpdEndpoint, uint32_t gpdSecurityFrameCounter)

Prepare a GP notification response command buffer.

uint16_t
sl_zigbee_af_fill_command_green_power_cluster_gp_pairing_smart(uint32_t options, uint32_t gpdSrcId, uint8_t *gpdIeee, uint8_t gpdEndpoint, uint8_t *sinkIeeeAddress, uint16_t sinkNwkAddress, uint16_t sinkGroupId, uint8_t deviceId, uint32_t gpdSecurityFrameCounter, uint8_t *gpdKey, uint16_t assignedAlias, uint8_t groupcastRadius)

Prepare a GP pairing command buffer.

uint16_t
sl_zigbee_af_fill_command_green_power_cluster_gp_proxy_commissioning_mode_smart(uint8_t options, uint16_t commissioningWindow, uint8_t channel)

Prepare a GP proxy commissioning mode command buffer.

uint16_t
sl_zigbee_af_fill_command_green_power_cluster_gp_response_smart(uint8_t options, uint16_t tempMasterShortAddress, uint8_t tempMasterTxChannel, uint32_t gpdSrcId, uint8_t *gpdIeee, uint8_t gpdEndpoint, uint8_t gpdCommandId, uint8_t gpdCommandPayloadLength, uint8_t *gpdCommandPayload)

Prepare a GP response command buffer.

uint16_t
sl_zigbee_af_fill_command_green_power_cluster_gp_proxy_table_request_smart(uint8_t options, uint32_t gpdSrcId, uint8_t *gpdIeee, uint8_t gpdEndpoint, uint8_t index)

Prepare a GP proxy table request command buffer.

bool
sl_zigbee_af_green_power_common_gp_addr_compare(const sl_zigbee_gp_address_t *a1, const sl_zigbee_gp_address_t *a2)

Compare two GP Addresses.

#define
sl_zigbee_af_fill_command_green_power_cluster_gp_proxy_table_response_smart (status, totalNumberOfNonEmptyProxyTableEntries, startIndex, entriesCount)

Prepare a GP proxy commissioning mode command buffer.

#define
sl_zigbee_af_fill_command_green_power_cluster_gp_sink_table_response_smart (status, totalNumberofNonEmptySinkTableEntries, startIndex, sinkTableEntriesCount)

Prepare a GP sink table response command buffer.

#define
sl_zigbee_af_fill_command_green_power_cluster_gp_translation_table_response_smart (status, options, totalNumberOfEntries, startIndex, entriesCount, translationTableList, translationTableListLen)

To provide GPD Command Translation Table content.

Enumerations#

enum
SL_ZIGBEE_ZCL_GP_GPD_GPP_LINK_QUALITY_POOR = 0x00
SL_ZIGBEE_ZCL_GP_GPD_GPP_LINK_QUALITY_MODERATE = 0x01
SL_ZIGBEE_ZCL_GP_GPD_GPP_LINK_QUALITY_HIGH = 0x02
SL_ZIGBEE_ZCL_GP_GPD_GPP_LINK_QUALITY_EXCELLENT = 0x03
}

Green Power link quality.

enum
SL_ZIGBEE_ZCL_GP_UNKNOWN_SWITCH_TYPE = 0x00
SL_ZIGBEE_ZCL_GP_BUTTON_SWITCH_TYPE = 0x01
SL_ZIGBEE_ZCL_GP_ROCKER_SWITCH_TYPE = 0x02
SL_ZIGBEE_ZCL_GP_RESERVED_SWITCH_TYPE = 0x03
}

Green Power switch type.

enum
SL_ZIGBEE_GP_DEVICE_ID_GPD_SIMPLE_GENERIC_ONE_STATE_SWITCH = 0x00
SL_ZIGBEE_GP_DEVICE_ID_GPD_SIMPLE_GENERIC_TWO_STATE_SWITCH = 0x01
SL_ZIGBEE_GP_DEVICE_ID_GPD_ON_OFF_SWITCH = 0x02
SL_ZIGBEE_GP_DEVICE_ID_GPD_LEVEL_CONTROL_SWITCH = 0x03
SL_ZIGBEE_GP_DEVICE_ID_GPD_SIMPLE_SENSOR_SWITCH = 0x04
SL_ZIGBEE_GP_DEVICE_ID_GPD_ADVANCED_GENERIC_ONE_STATE_SWITCH = 0x05
SL_ZIGBEE_GP_DEVICE_ID_GPD_ADVANCED_GENERIC_TWO_STATE_SWITCH = 0x06
SL_ZIGBEE_GP_DEVICE_ID_GPD_GENERIC_SWITCH = 0x07
SL_ZIGBEE_GP_DEVICE_ID_GPD_COLOR_DIMMER_SWITCH = 0x10
SL_ZIGBEE_GP_DEVICE_ID_GPD_LIGHT_SENSOR_SWITCH = 0x11
SL_ZIGBEE_GP_DEVICE_ID_GPD_OCCUPANCY_SENSOR_SWITCH = 0x12
SL_ZIGBEE_GP_DEVICE_ID_GPD_DOOR_LOCK_CONTROLLER_SWITCH = 0x20
SL_ZIGBEE_GP_DEVICE_ID_GPD_TEMPERATURE_SENSOR_SWITCH = 0x30
SL_ZIGBEE_GP_DEVICE_ID_GPD_PRESSURE_SENSOR_SWITCH = 0x31
SL_ZIGBEE_GP_DEVICE_ID_GPD_FLOW_SENSOR_SWITCH = 0x32
SL_ZIGBEE_GP_DEVICE_ID_GPD_INDOOR_ENVIRONMENT_SENSOR = 0x33
SL_ZIGBEE_GP_DEVICE_ID_GPD_SCENCES = 0xFE
SL_ZIGBEE_GP_DEVICE_ID_GPD_UNDEFINED = 0xFE
}

Green Power device ID.

Macros#

#define

If GPD source ID is reserved.

#define
IS_GPD_SRC_ID_ZERO (appId, srcId)

If GPD source ID is 0.

#define

Translation Table command - Options field: "Additional information block present" flag.

#define

Translation Table Update command - Options field: "Additional information block present" flag.

#define

Pairing Configuration command - Options field: "Application information present" flag.

#define

Pairing command - Options field: "Communication Mode" value.

#define

Pairing command - Options field: "Add Sink" value.

#define

Any command - Options field: "Application ID" value.

#define

Proxy table entry - Sequence number capability.

#define

Proxy table entry - Security level.

#define

If GPD has a fixed location during operation.

#define

If GPD does not have a fixed location during operation.

#define

If GPD has a fixed location during operation.

#define

Any command - Options field: "Security key type" value.

API Documentation#

sl_zigbee_af_fill_command_green_power_cluster_gp_notification_smart#

uint16_t sl_zigbee_af_fill_command_green_power_cluster_gp_notification_smart (uint16_t options, uint32_t gpdSrcId, uint8_t * gpdIeee, uint8_t gpdEndpoint, uint32_t gpdSecurityFrameCounter, uint8_t gpdCommandId, uint8_t gpdCommandPayloadLength, const uint8_t * gpdCommandPayload, uint16_t gppShortAddress, uint8_t gppDistance)

Prepare a GP notification command buffer.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]options

Options

uint32_t[in]gpdSrcId

GPD Source Id

uint8_t *[in]gpdIeee

GPD IEEE address

uint8_t[in]gpdEndpoint

GPD endpoint

uint32_t[in]gpdSecurityFrameCounter

GPD security frame counter

uint8_t[in]gpdCommandId

GPD command Id

uint8_t[in]gpdCommandPayloadLength

Command payload length

const uint8_t *[in]gpdCommandPayload

GPD command payload

uint16_t[in]gppShortAddress

GP Proxy short address

uint8_t[in]gppDistance

GP Proxy distance

This function prepares an application framework ZCL command buffer for the GP notification command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_pairing_search_smart#

uint16_t sl_zigbee_af_fill_command_green_power_cluster_gp_pairing_search_smart (uint16_t options, uint32_t gpdSrcId, uint8_t * gpdIeee, uint8_t gpdEndpoint)

Prepare a GP pairing search command buffer.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]options

Options

uint32_t[in]gpdSrcId

GPD Source Id

uint8_t *[in]gpdIeee

GPD IEEE address

uint8_t[in]gpdEndpoint

GPD endpoint

This function prepares an application framework ZCL command buffer for the GP pairing search command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_tunneling_stop_smart#

uint16_t sl_zigbee_af_fill_command_green_power_cluster_gp_tunneling_stop_smart (uint8_t options, uint32_t gpdSrcId, uint8_t * gpdIeee, uint8_t gpdEndpoint, uint32_t gpdSecurityFrameCounter, uint16_t gppShortAddress, int8_t gppDistance)

Prepare a GP tunneling stop command buffer.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]options

Options

uint32_t[in]gpdSrcId

GPD Source Id

uint8_t *[in]gpdIeee

GPD IEEE address

uint8_t[in]gpdEndpoint

GPD endpoint

uint32_t[in]gpdSecurityFrameCounter

GPD security frame counter

uint16_t[in]gppShortAddress

GP Proxy short address

int8_t[in]gppDistance

GP Proxy distance

This function prepares an application framework ZCL command buffer for the GP tunneling stop command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_commissioning_notification_smart#

uint16_t sl_zigbee_af_fill_command_green_power_cluster_gp_commissioning_notification_smart (uint16_t options, uint32_t gpdSrcId, uint8_t * gpdIeee, uint8_t gpdEndpoint, uint8_t sequenceNumber, sl_zigbee_gp_security_level_t gpdfSecurityLevel, sl_zigbee_gp_security_frame_counter_t gpdSecurityFrameCounter, uint8_t gpdCommandId, uint8_t gpdCommandPayloadLength, const uint8_t * gpdCommandPayload, sl_802154_short_addr_t gppShortAddress, uint8_t gppLink, sl_zigbee_gp_mic_t mic)

Prepare a GP commissioning notification command buffer.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]options

Options

uint32_t[in]gpdSrcId

GPD Source Id

uint8_t *[in]gpdIeee

GPD IEEE address

uint8_t[in]gpdEndpoint

GPD endpoint

uint8_t[in]sequenceNumber

MAC Sequence to be used in security counter field for GPD security level 0

sl_zigbee_gp_security_level_t[in]gpdfSecurityLevel

GPD security level

sl_zigbee_gp_security_frame_counter_t[in]gpdSecurityFrameCounter

GPD security frame counter

uint8_t[in]gpdCommandId

GPD command Id

uint8_t[in]gpdCommandPayloadLength

Command payload length

const uint8_t *[in]gpdCommandPayload

GPD command payload

sl_802154_short_addr_t[in]gppShortAddress

GP Proxy short address

uint8_t[in]gppLink

GPD-GP Proxy link

sl_zigbee_gp_mic_t[in]mic

Message Integrity Code when security level is 2 or 3

This function prepares an application framework ZCL command buffer for the GP commissioning notification command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_translation_table_update_smart#

uint16_t sl_zigbee_af_fill_command_green_power_cluster_gp_translation_table_update_smart (uint16_t options, uint32_t gpdSrcId, uint8_t * gpdIeee, uint8_t gpdEndpoint, uint8_t translationsLength, sl_zigbee_zcl_gp_translation_table_update_translation_t * translations, sl_zigbee_gp_translation_table_additional_info_block_option_record_field_t * additionnalInfoBlock)

Prepare a GP translation table update command buffer.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]options

Options

uint32_t[in]gpdSrcId

GPD Source Id

uint8_t *[in]gpdIeee

GPD IEEE address

uint8_t[in]gpdEndpoint

GPD endpoint

uint8_t[in]translationsLength

Length of the translations packet

sl_zigbee_zcl_gp_translation_table_update_translation_t *[in]translations

One or more number of translations

sl_zigbee_gp_translation_table_additional_info_block_option_record_field_t *[in]additionnalInfoBlock

Additional Information block used along with the translations

This function prepares an application framework ZCL command buffer for the GP translation table update command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_pairing_configuration_smart#

uint16_t sl_zigbee_af_fill_command_green_power_cluster_gp_pairing_configuration_smart (uint8_t actions, uint16_t options, uint32_t gpdSrcId, uint8_t * gpdIeee, uint8_t gpdEndpoint, uint8_t gpdDeviceId, uint8_t groupListCount, uint8_t * groupList, uint16_t gpdAssignedAlias, uint8_t groupcastRadius, uint8_t securityOptions, uint32_t gpdSecurityFrameCounter, uint8_t * gpdSecurityKey, uint8_t numberOfPairedEndpoints, uint8_t * pairedEndpoints, uint8_t applicationInformation, uint16_t manufacturerId, uint16_t modeId, uint8_t numberOfGpdCommands, uint8_t * gpdCommandIdList, uint8_t clusterIdListCount, uint16_t * clusterListServer, uint16_t * clusterListClient, uint8_t switchInformationLength, uint8_t genericSwitchConfiguration, uint8_t currentContactStatus, uint8_t totalNumberOfReports, uint8_t numberOfReports, uint8_t * reportDescriptor)

Prepare a GP pairing configuration command buffer.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]actions

GP Pairing actions field

uint16_t[in]options

Options

uint32_t[in]gpdSrcId

GPD Source Id

uint8_t *[in]gpdIeee

GPD IEEE address

uint8_t[in]gpdEndpoint

GPD endpoint

uint8_t[in]gpdDeviceId

GPD Device Id

uint8_t[in]groupListCount

Group list count

uint8_t *[in]groupList

Group list

uint16_t[in]gpdAssignedAlias

GPD assigned alias

uint8_t[in]groupcastRadius

Group cast radius

uint8_t[in]securityOptions

Security options

uint32_t[in]gpdSecurityFrameCounter

Security frame counter

uint8_t *[in]gpdSecurityKey

Security key

uint8_t[in]numberOfPairedEndpoints

Number of paired endpoints

uint8_t *[in]pairedEndpoints

Paired endpoint list

uint8_t[in]applicationInformation

Application information field

uint16_t[in]manufacturerId

GPD Manufacture Id

uint16_t[in]modeId

GPD Model Id

uint8_t[in]numberOfGpdCommands

Number of GPD commands

uint8_t *[in]gpdCommandIdList

GPD commands list

uint8_t[in]clusterIdListCount

Cluster List count

uint16_t *[in]clusterListServer

Server cluster list

uint16_t *[in]clusterListClient

Client cluster list

uint8_t[in]switchInformationLength

Generic switch information length

uint8_t[in]genericSwitchConfiguration

Generic switch configuration

uint8_t[in]currentContactStatus

Current contact status

uint8_t[in]totalNumberOfReports

Total number of reports configured

uint8_t[in]numberOfReports

Number of reports in the report present in descriptor

uint8_t *[in]reportDescriptor

Report descriptors list

This function prepares an application framework ZCL command buffer for the GP pairing configuration command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_sink_table_request_smart#

uint16_t sl_zigbee_af_fill_command_green_power_cluster_gp_sink_table_request_smart (uint8_t options, uint32_t gpdSrcId, uint8_t * gpdIeee, uint8_t gpdEndpoint, uint8_t index)

Prepare a GP sink table request command buffer.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]options

Options

uint32_t[in]gpdSrcId

GPD Source Id

uint8_t *[in]gpdIeee

GPD IEEE address

uint8_t[in]gpdEndpoint

GPD endpoint

uint8_t[in]index

Requested table index to start

This function prepares an application framework ZCL command buffer for the GP sink table request command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_notification_response_smart#

uint32_t sl_zigbee_af_fill_command_green_power_cluster_gp_notification_response_smart (uint8_t options, uint32_t gpdSrcId, uint8_t * gpdIeee, uint8_t gpdEndpoint, uint32_t gpdSecurityFrameCounter)

Prepare a GP notification response command buffer.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]options

Options

uint32_t[in]gpdSrcId

GPD Source Id

uint8_t *[in]gpdIeee

GPD IEEE address

uint8_t[in]gpdEndpoint

GPD endpoint

uint32_t[in]gpdSecurityFrameCounter

GPD security frame counter

This function prepares an application framework ZCL command buffer for the GP notification response command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_pairing_smart#

uint16_t sl_zigbee_af_fill_command_green_power_cluster_gp_pairing_smart (uint32_t options, uint32_t gpdSrcId, uint8_t * gpdIeee, uint8_t gpdEndpoint, uint8_t * sinkIeeeAddress, uint16_t sinkNwkAddress, uint16_t sinkGroupId, uint8_t deviceId, uint32_t gpdSecurityFrameCounter, uint8_t * gpdKey, uint16_t assignedAlias, uint8_t groupcastRadius)

Prepare a GP pairing command buffer.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]options

Options

uint32_t[in]gpdSrcId

GPD Source Id

uint8_t *[in]gpdIeee

GPD IEEE address

uint8_t[in]gpdEndpoint

GPD endpoint

uint8_t *[in]sinkIeeeAddress

Sink IEEE address

uint16_t[in]sinkNwkAddress

Sink network address

uint16_t[in]sinkGroupId

Sink group Id

uint8_t[in]deviceId

GPD Device Id

uint32_t[in]gpdSecurityFrameCounter

GPD security frame counter

uint8_t *[in]gpdKey

GPD security key

uint16_t[in]assignedAlias

GPD assigned alias

uint8_t[in]groupcastRadius

Group cast radius of this message

This function prepares an application framework ZCL command buffer for the GP pairing command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_proxy_commissioning_mode_smart#

uint16_t sl_zigbee_af_fill_command_green_power_cluster_gp_proxy_commissioning_mode_smart (uint8_t options, uint16_t commissioningWindow, uint8_t channel)

Prepare a GP proxy commissioning mode command buffer.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]options

Options

uint16_t[in]commissioningWindow

Commissioning window in seconds

uint8_t[in]channel

Proxy channel field

This function prepares an application framework ZCL command buffer for the GP proxy commissioning mode command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_response_smart#

uint16_t sl_zigbee_af_fill_command_green_power_cluster_gp_response_smart (uint8_t options, uint16_t tempMasterShortAddress, uint8_t tempMasterTxChannel, uint32_t gpdSrcId, uint8_t * gpdIeee, uint8_t gpdEndpoint, uint8_t gpdCommandId, uint8_t gpdCommandPayloadLength, uint8_t * gpdCommandPayload)

Prepare a GP response command buffer.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]options

Options

uint16_t[in]tempMasterShortAddress

Proxy Temp Master short address

uint8_t[in]tempMasterTxChannel

Proxy Temp Master transmit channel

uint32_t[in]gpdSrcId

GPD Source Id

uint8_t *[in]gpdIeee

GPD IEEE address

uint8_t[in]gpdEndpoint

GPD endpoint

uint8_t[in]gpdCommandId

GPD command id

uint8_t[in]gpdCommandPayloadLength

GPD command length

uint8_t *[in]gpdCommandPayload

GPD command payload

This function prepares an application framework ZCL command buffer for the GP response command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_proxy_table_request_smart#

uint16_t sl_zigbee_af_fill_command_green_power_cluster_gp_proxy_table_request_smart (uint8_t options, uint32_t gpdSrcId, uint8_t * gpdIeee, uint8_t gpdEndpoint, uint8_t index)

Prepare a GP proxy table request command buffer.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]options

Options

uint32_t[in]gpdSrcId

GPD Source Id

uint8_t *[in]gpdIeee

GPD IEEE address

uint8_t[in]gpdEndpoint

GPD endpoint

uint8_t[in]index

Requested table index to start

This function prepares an application framework ZCL command buffer for the GP proxy table request command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_green_power_common_gp_addr_compare#

bool sl_zigbee_af_green_power_common_gp_addr_compare (const sl_zigbee_gp_address_t * a1, const sl_zigbee_gp_address_t * a2)

Compare two GP Addresses.

Parameters
TypeDirectionArgument NameDescription
const sl_zigbee_gp_address_t *[in]a1

First address to compare

const sl_zigbee_gp_address_t *[in]a2

Second address to compare

This function compares two GP Addresses and returns true if they are the same.

Returns

  • True if the address are same


sl_zigbee_af_fill_command_green_power_cluster_gp_proxy_table_response_smart#

#define sl_zigbee_af_fill_command_green_power_cluster_gp_proxy_table_response_smart
Value:
sl_zigbee_af_fill_external_buffer((ZCL_CLUSTER_SPECIFIC_COMMAND \
| ZCL_DISABLE_DEFAULT_RESPONSE_MASK \
| ZCL_FRAME_CONTROL_CLIENT_TO_SERVER), \
ZCL_GREEN_POWER_CLUSTER_ID, \
ZCL_GP_PROXY_TABLE_RESPONSE_COMMAND_ID, \
"uuuu", \
status, \
totalNumberOfNonEmptyProxyTableEntries, \
startIndex, \
entriesCount)

Prepare a GP proxy commissioning mode command buffer.

This function prepares an application framework ZCL command buffer for the GP proxy table response command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_sink_table_response_smart#

#define sl_zigbee_af_fill_command_green_power_cluster_gp_sink_table_response_smart
Value:
sl_zigbee_af_fill_external_buffer((ZCL_CLUSTER_SPECIFIC_COMMAND \
| ZCL_DISABLE_DEFAULT_RESPONSE_MASK \
| ZCL_FRAME_CONTROL_SERVER_TO_CLIENT), \
ZCL_GREEN_POWER_CLUSTER_ID, \
ZCL_GP_SINK_TABLE_RESPONSE_COMMAND_ID, \
"uuuu", \
status, \
totalNumberofNonEmptySinkTableEntries, \
startIndex, \
sinkTableEntriesCount)

Prepare a GP sink table response command buffer.

This function prepares an application framework ZCL command buffer for the GP sink table response command with supplied arguments and returns the buffer length.

Returns

  • Length of the constructed command buffer


sl_zigbee_af_fill_command_green_power_cluster_gp_translation_table_response_smart#

#define sl_zigbee_af_fill_command_green_power_cluster_gp_translation_table_response_smart
Value:
sl_zigbee_af_fill_external_buffer((ZCL_CLUSTER_SPECIFIC_COMMAND \
| ZCL_DISABLE_DEFAULT_RESPONSE_MASK \
| ZCL_FRAME_CONTROL_SERVER_TO_CLIENT), \
ZCL_GREEN_POWER_CLUSTER_ID, \
ZCL_GP_TRANSLATION_TABLE_RESPONSE_COMMAND_ID, \
"uuuuub", \
status, \
options, \
totalNumberOfEntries, \
startIndex, \
entriesCount, \
translationTableList, \
translationTableListLen)

To provide GPD Command Translation Table content.

Cluster: Green Power, The Green Power cluster defines the format of the commands exchanged when handling GPDs. Command: GpTranslationTableResponse


Enumeration Documentation#

sl_zigbee_af_g_p_gpd_gpp_link_quality_t#

sl_zigbee_af_g_p_gpd_gpp_link_quality_t

Green Power link quality.

Enumerator
SL_ZIGBEE_ZCL_GP_GPD_GPP_LINK_QUALITY_POOR

Poor link quality

SL_ZIGBEE_ZCL_GP_GPD_GPP_LINK_QUALITY_MODERATE

Moderate link quality

SL_ZIGBEE_ZCL_GP_GPD_GPP_LINK_QUALITY_HIGH

High link quality

SL_ZIGBEE_ZCL_GP_GPD_GPP_LINK_QUALITY_EXCELLENT

Excellent link quality


sl_zigbee_af_g_p_generic_sw_switch_type_t#

sl_zigbee_af_g_p_generic_sw_switch_type_t

Green Power switch type.

Enumerator
SL_ZIGBEE_ZCL_GP_UNKNOWN_SWITCH_TYPE

Unknown switch

SL_ZIGBEE_ZCL_GP_BUTTON_SWITCH_TYPE

Button switch

SL_ZIGBEE_ZCL_GP_ROCKER_SWITCH_TYPE

Rocker switch

SL_ZIGBEE_ZCL_GP_RESERVED_SWITCH_TYPE

Reserved switch


sl_zigbee_af_gp_device_id_gpd_t#

sl_zigbee_af_gp_device_id_gpd_t

Green Power device ID.

Enumerator
SL_ZIGBEE_GP_DEVICE_ID_GPD_SIMPLE_GENERIC_ONE_STATE_SWITCH

Simple generic one-state switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_SIMPLE_GENERIC_TWO_STATE_SWITCH

Simple generic two-state switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_ON_OFF_SWITCH

On-off switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_LEVEL_CONTROL_SWITCH

Level control switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_SIMPLE_SENSOR_SWITCH

Simple sensor switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_ADVANCED_GENERIC_ONE_STATE_SWITCH

Advanced generic one-state switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_ADVANCED_GENERIC_TWO_STATE_SWITCH

Advanced generic two-state switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_GENERIC_SWITCH

Generic switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_COLOR_DIMMER_SWITCH

Color dimmer switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_LIGHT_SENSOR_SWITCH

Light sensor switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_OCCUPANCY_SENSOR_SWITCH

Occupancy sensor switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_DOOR_LOCK_CONTROLLER_SWITCH

Door lock controller switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_TEMPERATURE_SENSOR_SWITCH

Temperature sensor switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_PRESSURE_SENSOR_SWITCH

Pressure sensor switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_FLOW_SENSOR_SWITCH

Flow sensor switch

SL_ZIGBEE_GP_DEVICE_ID_GPD_INDOOR_ENVIRONMENT_SENSOR

Indoor environment sensor

SL_ZIGBEE_GP_DEVICE_ID_GPD_SCENCES

Scenes

SL_ZIGBEE_GP_DEVICE_ID_GPD_UNDEFINED

Undefined


Macro Definition Documentation#

GREEN_POWER_SERVER_NO_PAIRED_ENDPOINTS#

#define GREEN_POWER_SERVER_NO_PAIRED_ENDPOINTS
Value:
0x00

GREEN_POWER_SERVER_RAW_GPD_PROCESS_IN_APP_ENDPOINTS#

#define GREEN_POWER_SERVER_RAW_GPD_PROCESS_IN_APP_ENDPOINTS
Value:
0xFD

GREEN_POWER_SERVER_RESERVED_ENDPOINTS#

#define GREEN_POWER_SERVER_RESERVED_ENDPOINTS
Value:
0xFD

GREEN_POWER_SERVER_SINK_DERIVES_ENDPOINTS#

#define GREEN_POWER_SERVER_SINK_DERIVES_ENDPOINTS
Value:
0xFE

GREEN_POWER_SERVER_ALL_SINK_ENDPOINTS#

#define GREEN_POWER_SERVER_ALL_SINK_ENDPOINTS
Value:
0xFF

GREEN_POWER_SERVER_MIN_VALID_APP_ENDPOINT#

#define GREEN_POWER_SERVER_MIN_VALID_APP_ENDPOINT
Value:
1

GREEN_POWER_SERVER_MAX_VALID_APP_ENDPOINT#

#define GREEN_POWER_SERVER_MAX_VALID_APP_ENDPOINT
Value:
240

SL_ZIGBEE_AF_GP_GPD_CHANNEL_REQUEST_CHANNEL_TOGGLING_BEHAVIOR_RX_CHANNEL_NEXT_ATTEMPT#

#define SL_ZIGBEE_AF_GP_GPD_CHANNEL_REQUEST_CHANNEL_TOGGLING_BEHAVIOR_RX_CHANNEL_NEXT_ATTEMPT
Value:
(0x0F)

SL_ZIGBEE_AF_GP_GPD_CHANNEL_REQUEST_CHANNEL_TOGGLING_BEHAVIOR_RX_CHANNEL_SECOND_NEXT_ATTEMPT#

#define SL_ZIGBEE_AF_GP_GPD_CHANNEL_REQUEST_CHANNEL_TOGGLING_BEHAVIOR_RX_CHANNEL_SECOND_NEXT_ATTEMPT
Value:
(0xF0)

SL_ZIGBEE_AF_GP_GPD_CHANNEL_REQUEST_CHANNEL_TOGGLING_BEHAVIOR_RX_CHANNEL_SECOND_NEXT_ATTEMPT_OFFSET#

#define SL_ZIGBEE_AF_GP_GPD_CHANNEL_REQUEST_CHANNEL_TOGGLING_BEHAVIOR_RX_CHANNEL_SECOND_NEXT_ATTEMPT_OFFSET
Value:
(4)

SL_ZIGBEE_AF_GP_GPD_APPLICATION_DESCRIPTION_COMMAND_REPORT_OPTIONS_TIMEOUT_PERIOD_PRESENT#

#define SL_ZIGBEE_AF_GP_GPD_APPLICATION_DESCRIPTION_COMMAND_REPORT_OPTIONS_TIMEOUT_PERIOD_PRESENT
Value:
(0x01)

SL_ZIGBEE_AF_GP_TRANSLATION_TABLE_ZB_ENDPOINT_PASS_FRAME_TO_APLLICATION#

#define SL_ZIGBEE_AF_GP_TRANSLATION_TABLE_ZB_ENDPOINT_PASS_FRAME_TO_APLLICATION
Value:
(0xFC)

SL_ZIGBEE_AF_GP_SINK_TABLE_ENTRY_OPTIONS_MASK#

#define SL_ZIGBEE_AF_GP_SINK_TABLE_ENTRY_OPTIONS_MASK
Value:
(0x03FF)

GP_TRANSLATION_TABLE_SCAN_LEVEL_GPD_ID#

#define GP_TRANSLATION_TABLE_SCAN_LEVEL_GPD_ID
Value:
(0x01)

GP_TRANSLATION_TABLE_SCAN_LEVEL_GPD_CMD_ID#

#define GP_TRANSLATION_TABLE_SCAN_LEVEL_GPD_CMD_ID
Value:
(0x02)

GP_TRANSLATION_TABLE_SCAN_LEVEL_GPD_PAYLOAD#

#define GP_TRANSLATION_TABLE_SCAN_LEVEL_GPD_PAYLOAD
Value:
(0x04)

GP_TRANSLATION_TABLE_SCAN_LEVEL_ZB_ENDPOINT#

#define GP_TRANSLATION_TABLE_SCAN_LEVEL_ZB_ENDPOINT
Value:
(0x08)

GP_TRANSLATION_TABLE_SCAN_LEVEL_ADDITIONAL_INFO_BLOCK#

#define GP_TRANSLATION_TABLE_SCAN_LEVEL_ADDITIONAL_INFO_BLOCK
Value:
(0x10)

SL_ZIGBEE_GP_NOTIFICATION_COMMISSIONED_GROUPCAST_SEQUENCE_NUMBER_OFFSET#

#define SL_ZIGBEE_GP_NOTIFICATION_COMMISSIONED_GROUPCAST_SEQUENCE_NUMBER_OFFSET
Value:
(9)

SL_ZIGBEE_GP_NOTIFICATION_COMMISSIONED_GROUPCAST_SEQUENCE_NUMBER_OFFSET#

#define SL_ZIGBEE_GP_NOTIFICATION_COMMISSIONED_GROUPCAST_SEQUENCE_NUMBER_OFFSET
Value:
(9)

SL_ZIGBEE_AF_GP_GPP_GPD_LINK_RSSI#

#define SL_ZIGBEE_AF_GP_GPP_GPD_LINK_RSSI
Value:
(0x3F)

SL_ZIGBEE_AF_GP_GPP_GPD_LINK_LINK_QUALITY#

#define SL_ZIGBEE_AF_GP_GPP_GPD_LINK_LINK_QUALITY
Value:
(0xC0)

SL_ZIGBEE_AF_GP_GPP_GPD_LINK_LINK_QUALITY_OFFSET#

#define SL_ZIGBEE_AF_GP_GPP_GPD_LINK_LINK_QUALITY_OFFSET
Value:
(6)

SL_ZIGBEE_AF_GP_PAIRING_CONFIGURATION_ACTIONS_MASK#

#define SL_ZIGBEE_AF_GP_PAIRING_CONFIGURATION_ACTIONS_MASK
Value:
(0x0F)

SL_ZIGBEE_AF_GP_PAIRING_CONFIGURATION_OPTION_MASK#

#define SL_ZIGBEE_AF_GP_PAIRING_CONFIGURATION_OPTION_MASK
Value:
(0x07FF)

SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_CLUSTER_LIST_NUMBER_OF_SERVER_CLUSTER_MASK#

#define SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_CLUSTER_LIST_NUMBER_OF_SERVER_CLUSTER_MASK
Value:
(0x0F)

SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_CLUSTER_LIST_NUMBER_OF_CLIENT_CLUSTER_MASK#

#define SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_CLUSTER_LIST_NUMBER_OF_CLIENT_CLUSTER_MASK
Value:
(0xF0)

SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_CLUSTER_LIST_NUMBER_OF_CLIENT_CLUSTER_MASK_OFFSET#

#define SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_CLUSTER_LIST_NUMBER_OF_CLIENT_CLUSTER_MASK_OFFSET
Value:
(4)

SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_GPD_APPLICATION_DESCRIPTION_COMMAND_FOLLOWS#

#define SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_GPD_APPLICATION_DESCRIPTION_COMMAND_FOLLOWS
Value:
(0x20)

SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_GPD_APPLICATION_DESCRIPTION_COMMAND_FOLLOWS_OFFSET#

#define SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_GPD_APPLICATION_DESCRIPTION_COMMAND_FOLLOWS_OFFSET
Value:
(5)

SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_SWITCH_INFORMATION_CONFIGURATION_NB_OF_CONTACT#

#define SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_SWITCH_INFORMATION_CONFIGURATION_NB_OF_CONTACT
Value:
(0x0F)

SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_SWITCH_INFORMATION_CONFIGURATION_SWITCH_TYPE#

#define SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_SWITCH_INFORMATION_CONFIGURATION_SWITCH_TYPE
Value:
(0x30)

SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_SWITCH_INFORMATION_CONFIGURATION_SWITCH_TYPE_OFFSET#

#define SL_ZIGBEE_AF_GP_APPLICATION_INFORMATION_SWITCH_INFORMATION_CONFIGURATION_SWITCH_TYPE_OFFSET
Value:
(4)

GP_COMMISSIONING_SECURITY_LEVEL_TO_OPTIONS_SHIFT#

#define GP_COMMISSIONING_SECURITY_LEVEL_TO_OPTIONS_SHIFT
Value:
(4)

GP_COMMISSIONING_SECURITY_KEY_TYPE_TO_OPTIONS_SHIFT#

#define GP_COMMISSIONING_SECURITY_KEY_TYPE_TO_OPTIONS_SHIFT
Value:
(6)

SL_ZIGBEE_GP_COMMISSIONING_NOTIFICATION_SEQUENCE_NUMBER_OFFSET#

#define SL_ZIGBEE_GP_COMMISSIONING_NOTIFICATION_SEQUENCE_NUMBER_OFFSET
Value:
(12)

SL_ZIGBEE_AF_GREEN_POWER_SERVER_GPDF_SCENE_DERIVED_GROUP_ID#

#define SL_ZIGBEE_AF_GREEN_POWER_SERVER_GPDF_SCENE_DERIVED_GROUP_ID
Value:
(0xFFFF)

GP_DEVICE_ANNOUNCE_SPOOF_MSG_SIZE#

#define GP_DEVICE_ANNOUNCE_SPOOF_MSG_SIZE
Value:
12

IS_RESERVED_GPD_SRC_ID#

#define IS_RESERVED_GPD_SRC_ID
Value:
(((srcId) >= GP_GPD_SRC_ID_RESERVED_FFFFFF9) \
&& ((srcId) <= GP_GPD_SRC_ID_RESERVED_FFFFFFE))

If GPD source ID is reserved.


IS_GPD_SRC_ID_ZERO#

#define IS_GPD_SRC_ID_ZERO
Value:
(((appId) == SL_ZIGBEE_GP_APPLICATION_SOURCE_ID) \
&& ((srcId) == GP_GPD_SRC_ID_RESERVED_0))

If GPD source ID is 0.


sl_zigbee_af_green_power_t_t_get_additional_info_block_present#

#define sl_zigbee_af_green_power_t_t_get_additional_info_block_present
Value:
(options)

Translation Table command - Options field: "Additional information block present" flag.


sl_zigbee_af_green_power_t_t_update_get_additional_info_block_present#

#define sl_zigbee_af_green_power_t_t_update_get_additional_info_block_present
Value:
(options)

Translation Table Update command - Options field: "Additional information block present" flag.


sl_zigbee_af_green_power_pairing_config_get_application_info_present#

#define sl_zigbee_af_green_power_pairing_config_get_application_info_present
Value:
(options)

Pairing Configuration command - Options field: "Application information present" flag.


sl_zigbee_af_green_power_pairing_options_get_comm_mode#

#define sl_zigbee_af_green_power_pairing_options_get_comm_mode
Value:
(options)

Pairing command - Options field: "Communication Mode" value.


sl_zigbee_af_green_power_pairing_options_get_add_sink#

#define sl_zigbee_af_green_power_pairing_options_get_add_sink
Value:
(options)

Pairing command - Options field: "Add Sink" value.


sl_zigbee_af_green_power_get_application_id#

#define sl_zigbee_af_green_power_get_application_id
Value:
(options)

Any command - Options field: "Application ID" value.


sl_zigbee_af_green_power_gpd_seq_num_cap#

#define sl_zigbee_af_green_power_gpd_seq_num_cap
Value:
(entry)

Proxy table entry - Sequence number capability.


sl_zigbee_af_green_power_security_level#

#define sl_zigbee_af_green_power_security_level
Value:
(entry)

Proxy table entry - Security level.


sl_zigbee_af_green_power_fixed_during_operation#

#define sl_zigbee_af_green_power_fixed_during_operation
Value:
(options)

If GPD has a fixed location during operation.


sl_zigbee_af_green_power_mobile_cap#

#define sl_zigbee_af_green_power_mobile_cap
Value:
(options)

If GPD does not have a fixed location during operation.


sl_zigbee_af_green_power_portable_cap#

#define sl_zigbee_af_green_power_portable_cap
Value:
(options)

If GPD has a fixed location during operation.


sl_zigbee_af_green_power_security_key_type#

#define sl_zigbee_af_green_power_security_key_type
Value:
(options)

Any command - Options field: "Security key type" value.


sl_zigbee_af_green_power_check_return_of_put_data_in_response#

#define sl_zigbee_af_green_power_check_return_of_put_data_in_response
Value:
({ if ((ret) == NULL) { \
return 0; \
} \
}) \