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#

EmberAfGreenPowerServerCommissioningState

GpDeviceIdAndCommandMap

GpDeviceIdAndClusterMap

ZigbeeCluster

GpCommDataSaved

Green Power Server

API#

Get a GPD commissioning instance in a multiple GPD commissioning session.

void

Delete a GPD commissioning instance in a multiple GPD commissioning session.

void

Extend the commissioning window of a commissioning session.

Get the commissioning state of the green power server.

emberAfGreenPowerServerDeriveSharedKeyFromSinkAttribute(uint8_t *gpsSecurityKeyTypeAtrribute, EmberKeyData *gpSharedKeyAttribute, EmberGpAddress *gpdAddr)

Derive the shared key from the sink attributes.

void

Clears the entry for a GPD in sink table.

Enumerations#

enum
GREEN_POWER_SERVER_GPS_NODE_STATE_NOT_IN_NETWORK
GREEN_POWER_SERVER_GPS_NODE_STATE_IN_NETWORK
}
enum
GREEN_POWER_SERVER_SINK_TABLE_ACCESS_TYPE_REMOVE_GPD
GREEN_POWER_SERVER_SINK_TABLE_ACCESS_TYPE_ADD_GPD
GREEN_POWER_SERVER_SINK_TABLE_ACCESS_TYPE_UNKNOWN
}
enum
GP_SINK_COMM_STATE_IDLE
GP_SINK_COMM_STATE_COLLECT_REPORTS
GP_SINK_COMM_STATE_SEND_COMM_REPLY
GP_SINK_COMM_STATE_WAIT_FOR_SUCCESS
GP_SINK_COMM_STATE_FINALISE_PAIRING
GP_SINK_COMM_STATE_PAIRING_DONE
}
enum
COMMISSIONING_TIMEOUT_TYPE_GENERIC_SWITCH = 0
COMMISSIONING_TIMEOUT_TYPE_MULTI_SENSOR = 1
COMMISSIONING_TIMEOUT_TYPE_COMMISSIONING_WINDOW_TIMEOUT = 2
}
enum
SINK_PAIRING_STATUS_SUCCESS = 0
SINK_PAIRING_STATUS_FAILURE = 1
SINK_PAIRING_STATUS_IN_PROGRESS = 2
SINK_PAIRING_STATUS_FAIL_NO_MATCHING_FUNCTIONALITY = 3
SINK_PAIRING_STATUS_FAIL_ADDING_TRANSLATION = 4
SINK_PAIRING_STATUS_FAIL_NO_SPACE_IN_SINK_TABLE = 5
SINK_PAIRING_STATUS_FAIL_ENTRY_CORRUPTED = 6
}
enum
GP_PRE_SINK_PAIRING_CALLBACK_SOURCE_UNKNOWN = 0
GP_PRE_SINK_PAIRING_CALLBACK_COMMISSONING_FINALIZE = 1
GP_PRE_SINK_PAIRING_CALLBACK_PAIRING_CONFIGURATION = 2
}

Macros#

#define
#define
GP_DEFAULT_LINK_KEY { 0x5A, 0x69, 0x67, 0x42, 0x65, 0x65, 0x41, 0x6C, 0x6C, 0x69, 0x61, 0x6E, 0x63, 0x65, 0x30, 0x39 }
#define
genericSwitchCommissioningTimeout (&emberAfPluginGreenPowerServerGenericSwitchCommissioningTimeoutEvent)
#define
multiSensorCommissioningTimeout (&emberAfPluginGreenPowerServerMultiSensorCommissioningTimeoutEvent)
#define
commissioningWindowTimeout (&emberAfPluginGreenPowerServerCommissioningWindowTimeoutEvent)

API Documentation#

emberAfGreenPowerServerFindCommissioningGpdInstance#

EmberCommissioningGpd * emberAfGreenPowerServerFindCommissioningGpdInstance (EmberGpAddress *gpdAddr)

Get a GPD commissioning instance in a multiple GPD commissioning session.

Parameters
N/AgpdAddr

GPD address Ver.: always

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 GpCommDataSaved type about the GPD.


Definition at line 232 of file app/framework/plugin/green-power-server/green-power-server.h

emberAfGreenPowerServerDeleteCommissioningGpdInstance#

void emberAfGreenPowerServerDeleteCommissioningGpdInstance (EmberGpAddress *gpdAddr)

Delete a GPD commissioning instance in a multiple GPD commissioning session.

Parameters
N/AgpdAddr

GPD address Ver.: always

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.


Definition at line 245 of file app/framework/plugin/green-power-server/green-power-server.h

emberAfGreenPowerClusterGpSinkCommissioningWindowExtend#

void emberAfGreenPowerClusterGpSinkCommissioningWindowExtend (uint16_t commissioningWindow)

Extend the commissioning window of a commissioning session.

Parameters
N/AcommissioningWindow

Commissioning window to be extended from this point in time in seconds Ver.: always

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.


Definition at line 257 of file app/framework/plugin/green-power-server/green-power-server.h

emberAfGreenPowerClusterGetServerCommissioningSate#

EmberAfGreenPowerServerCommissioningState * emberAfGreenPowerClusterGetServerCommissioningSate (void)

Get the commissioning state of the green power server.

Parameters
N/A

This function gets the commissioning state of the green power server.

Returns


Definition at line 267 of file app/framework/plugin/green-power-server/green-power-server.h

emberAfGreenPowerServerDeriveSharedKeyFromSinkAttribute#

EmberAfStatus emberAfGreenPowerServerDeriveSharedKeyFromSinkAttribute (uint8_t *gpsSecurityKeyTypeAtrribute, EmberKeyData *gpSharedKeyAttribute, EmberGpAddress *gpdAddr)

Derive the shared key from the sink attributes.

Parameters
N/AgpsSecurityKeyTypeAtrribute

Security key type attribute as input

N/AgpSharedKeyAttribute

Security key attribute as output

N/AgpdAddr

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 Ver.: always


Definition at line 281 of file app/framework/plugin/green-power-server/green-power-server.h

emberAfGreenPowerServerRemoveSinkEntry#

void emberAfGreenPowerServerRemoveSinkEntry (EmberGpAddress *gpdAddr)

Clears the entry for a GPD in sink table.

Parameters
N/AgpdAddr

GPD address Ver.: always

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.


Definition at line 299 of file app/framework/plugin/green-power-server/green-power-server.h

Enumeration Documentation#

GreenPowerServerGPSNodeState#

GreenPowerServerGPSNodeState
Enumerator
GREEN_POWER_SERVER_GPS_NODE_STATE_NOT_IN_NETWORK
GREEN_POWER_SERVER_GPS_NODE_STATE_IN_NETWORK

Definition at line 61 of file app/framework/plugin/green-power-server/green-power-server.h

GreenPowerServerSinkTableAccessType#

GreenPowerServerSinkTableAccessType
Enumerator
GREEN_POWER_SERVER_SINK_TABLE_ACCESS_TYPE_REMOVE_GPD
GREEN_POWER_SERVER_SINK_TABLE_ACCESS_TYPE_ADD_GPD
GREEN_POWER_SERVER_SINK_TABLE_ACCESS_TYPE_UNKNOWN

Definition at line 72 of file app/framework/plugin/green-power-server/green-power-server.h

GPSinkCommState#

GPSinkCommState
Enumerator
GP_SINK_COMM_STATE_IDLE
GP_SINK_COMM_STATE_COLLECT_REPORTS
GP_SINK_COMM_STATE_SEND_COMM_REPLY
GP_SINK_COMM_STATE_WAIT_FOR_SUCCESS
GP_SINK_COMM_STATE_FINALISE_PAIRING
GP_SINK_COMM_STATE_PAIRING_DONE

Definition at line 85 of file app/framework/plugin/green-power-server/green-power-server.h

CommissioningTimeoutType#

CommissioningTimeoutType
Enumerator
COMMISSIONING_TIMEOUT_TYPE_GENERIC_SWITCH
COMMISSIONING_TIMEOUT_TYPE_MULTI_SENSOR
COMMISSIONING_TIMEOUT_TYPE_COMMISSIONING_WINDOW_TIMEOUT

Definition at line 100 of file app/framework/plugin/green-power-server/green-power-server.h

PairingStatus#

PairingStatus
Enumerator
SINK_PAIRING_STATUS_SUCCESS
SINK_PAIRING_STATUS_FAILURE
SINK_PAIRING_STATUS_IN_PROGRESS
SINK_PAIRING_STATUS_FAIL_NO_MATCHING_FUNCTIONALITY
SINK_PAIRING_STATUS_FAIL_ADDING_TRANSLATION
SINK_PAIRING_STATUS_FAIL_NO_SPACE_IN_SINK_TABLE
SINK_PAIRING_STATUS_FAIL_ENTRY_CORRUPTED

Definition at line 112 of file app/framework/plugin/green-power-server/green-power-server.h

PreSinkPairingCallbackSource#

PreSinkPairingCallbackSource
Enumerator
GP_PRE_SINK_PAIRING_CALLBACK_SOURCE_UNKNOWN
GP_PRE_SINK_PAIRING_CALLBACK_COMMISSONING_FINALIZE
GP_PRE_SINK_PAIRING_CALLBACK_PAIRING_CONFIGURATION

Definition at line 128 of file app/framework/plugin/green-power-server/green-power-server.h

Typedef Documentation#

GpsNetworkState#

typedef uint8_t GpsNetworkState

Definition at line 59 of file app/framework/plugin/green-power-server/green-power-server.h

EmberAfGpServerSinkTableAccessType#

typedef uint8_t EmberAfGpServerSinkTableAccessType

Definition at line 70 of file app/framework/plugin/green-power-server/green-power-server.h

EmberSinkCommissionState#

typedef uint8_t EmberSinkCommissionState

Definition at line 83 of file app/framework/plugin/green-power-server/green-power-server.h

EmberSinkCommissioningTimeoutType#

typedef uint8_t EmberSinkCommissioningTimeoutType

Definition at line 98 of file app/framework/plugin/green-power-server/green-power-server.h

EmberSinkPairingStatus#

typedef uint8_t EmberSinkPairingStatus

Definition at line 110 of file app/framework/plugin/green-power-server/green-power-server.h

EmberPreSinkPairingCallbackSource#

typedef uint8_t EmberPreSinkPairingCallbackSource

Definition at line 126 of file app/framework/plugin/green-power-server/green-power-server.h

EmberCommissioningGpd#

typedef GpCommDataSaved EmberCommissioningGpd

Definition at line 201 of file app/framework/plugin/green-power-server/green-power-server.h

Variable Documentation#

emberAfPluginGreenPowerServerGenericSwitchCommissioningTimeoutEvent#

sl_zigbee_event_t emberAfPluginGreenPowerServerGenericSwitchCommissioningTimeoutEvent

Definition at line 203 of file app/framework/plugin/green-power-server/green-power-server.h

emberAfPluginGreenPowerServerMultiSensorCommissioningTimeoutEvent#

sl_zigbee_event_t emberAfPluginGreenPowerServerMultiSensorCommissioningTimeoutEvent

Definition at line 205 of file app/framework/plugin/green-power-server/green-power-server.h

emberAfPluginGreenPowerServerCommissioningWindowTimeoutEvent#

sl_zigbee_event_t emberAfPluginGreenPowerServerCommissioningWindowTimeoutEvent

Definition at line 207 of file app/framework/plugin/green-power-server/green-power-server.h

Function Documentation#

emberAfPluginGreenPowerServerGenericSwitchCommissioningTimeoutEventHandler#

void emberAfPluginGreenPowerServerGenericSwitchCommissioningTimeoutEventHandler (sl_zigbee_event_t *event)
Parameters
N/Aevent

Definition at line 204 of file app/framework/plugin/green-power-server/green-power-server.h

emberAfPluginGreenPowerServerMultiSensorCommissioningTimeoutEventHandler#

void emberAfPluginGreenPowerServerMultiSensorCommissioningTimeoutEventHandler (sl_zigbee_event_t *event)
Parameters
N/Aevent

Definition at line 206 of file app/framework/plugin/green-power-server/green-power-server.h

emberAfPluginGreenPowerServerCommissioningWindowTimeoutEventHandler#

void emberAfPluginGreenPowerServerCommissioningWindowTimeoutEventHandler (sl_zigbee_event_t *event)
Parameters
N/Aevent

Definition at line 208 of file app/framework/plugin/green-power-server/green-power-server.h

Macro Definition Documentation#

EMBER_AF_GREEN_POWER_GP_SHARED_KEY#

#define EMBER_AF_GREEN_POWER_GP_SHARED_KEY
Value:
0

Definition at line 36 of file app/framework/plugin/green-power-server/green-power-server.h

EMBER_AF_GREEN_POWER_GP_INDIVIDUAL_KEY#

#define EMBER_AF_GREEN_POWER_GP_INDIVIDUAL_KEY
Value:
1

Definition at line 37 of file app/framework/plugin/green-power-server/green-power-server.h

GREEN_POWER_SERVER_GPS_SECURITY_LEVEL_ATTRIBUTE_FIELD_INVOLVE_TC#

#define GREEN_POWER_SERVER_GPS_SECURITY_LEVEL_ATTRIBUTE_FIELD_INVOLVE_TC
Value:
0x08

Definition at line 39 of file app/framework/plugin/green-power-server/green-power-server.h

GP_DEVICE_ANNOUNCE_SIZE#

#define GP_DEVICE_ANNOUNCE_SIZE
Value:
12

Definition at line 41 of file app/framework/plugin/green-power-server/green-power-server.h

SIZE_OF_REPORT_STORAGE#

#define SIZE_OF_REPORT_STORAGE
Value:
82

Definition at line 43 of file app/framework/plugin/green-power-server/green-power-server.h

COMM_REPLY_PAYLOAD_SIZE#

#define COMM_REPLY_PAYLOAD_SIZE
Value:
30

Definition at line 44 of file app/framework/plugin/green-power-server/green-power-server.h

GP_SINK_TABLE_RESPONSE_ENTRIES_OFFSET#

#define GP_SINK_TABLE_RESPONSE_ENTRIES_OFFSET
Value:
(3)

Definition at line 45 of file app/framework/plugin/green-power-server/green-power-server.h

EMBER_AF_ZCL_CLUSTER_GP_GPS_COMMISSIONING_WINDOWS_DEFAULT_TIME_S#

#define EMBER_AF_ZCL_CLUSTER_GP_GPS_COMMISSIONING_WINDOWS_DEFAULT_TIME_S
Value:
(180)

Definition at line 46 of file app/framework/plugin/green-power-server/green-power-server.h

GP_ADDR_SRC_ID_WILDCARD#

#define GP_ADDR_SRC_ID_WILDCARD
Value:
(0xFFFFFFFF)

Definition at line 47 of file app/framework/plugin/green-power-server/green-power-server.h

GPS_ATTRIBUTE_KEY_TYPE_MASK#

#define GPS_ATTRIBUTE_KEY_TYPE_MASK
Value:
(0x07)

Definition at line 48 of file app/framework/plugin/green-power-server/green-power-server.h

GP_PAIRING_CONFIGURATION_FIXED_FLAG#

#define GP_PAIRING_CONFIGURATION_FIXED_FLAG
Value:
(0x230)

Definition at line 49 of file app/framework/plugin/green-power-server/green-power-server.h

GREEN_POWER_SERVER_MIN_REPORT_LENGTH#

#define GREEN_POWER_SERVER_MIN_REPORT_LENGTH
Value:
(10)

Definition at line 51 of file app/framework/plugin/green-power-server/green-power-server.h

FIX_SHIFT_REPORTING_DATA_POSITION_CONVERT_TO_PAYLOAD_INDEX#

#define FIX_SHIFT_REPORTING_DATA_POSITION_CONVERT_TO_PAYLOAD_INDEX
Value:
(3)

Definition at line 54 of file app/framework/plugin/green-power-server/green-power-server.h

CAR_DATA_POINT_OFFSET#

#define CAR_DATA_POINT_OFFSET
Value:
1

Definition at line 56 of file app/framework/plugin/green-power-server/green-power-server.h

GP_DEFAULT_LINK_KEY#

#define GP_DEFAULT_LINK_KEY
Value:
{ 0x5A, 0x69, 0x67, 0x42, 0x65, 0x65, 0x41, 0x6C, 0x6C, 0x69, 0x61, 0x6E, 0x63, 0x65, 0x30, 0x39 }

Definition at line 57 of file app/framework/plugin/green-power-server/green-power-server.h

genericSwitchCommissioningTimeout#

#define genericSwitchCommissioningTimeout
Value:
(&emberAfPluginGreenPowerServerGenericSwitchCommissioningTimeoutEvent)

Definition at line 209 of file app/framework/plugin/green-power-server/green-power-server.h

multiSensorCommissioningTimeout#

#define multiSensorCommissioningTimeout
Value:
(&emberAfPluginGreenPowerServerMultiSensorCommissioningTimeoutEvent)

Definition at line 210 of file app/framework/plugin/green-power-server/green-power-server.h

commissioningWindowTimeout#

#define commissioningWindowTimeout
Value:
(&emberAfPluginGreenPowerServerCommissioningWindowTimeoutEvent)

Definition at line 211 of file app/framework/plugin/green-power-server/green-power-server.h