Developing with ZBOSS for Zigbee
|
Data Structures | |
union | zb_zgpd_addr_u |
ZGPD address. More... | |
struct | zb_zgpd_id_s |
ZGPD identification info (ZGPD ID) More... | |
struct | zgp_attr_record_s |
struct | zgp_data_point_desc_options_s |
struct | zgp_data_point_desc_s |
struct | zgp_report_desc_options_s |
struct | zgp_report_desc_s |
struct | zgp_report_desc_pairing_config_s |
struct | zb_zgp_gpd_cmds_list_s |
GPD CommandID list. More... | |
struct | zb_zgp_cluster_list_s |
GPD Cluster List. More... | |
Macros | |
#define | ZGP_ENDPOINT 242 |
#define | ZGP_ATTR_OPT_GET_REMAINING_LEN(opt) ((opt) & 0xFU) |
#define | ZGP_ATTR_OPT_GET_REPORTED(opt) (((opt) >> 4U) & 0x1U) |
#define | ZGP_ATTR_OPT_GET_VAL_PRESENT(opt) (((opt) >> 5U) & 0x1U) |
#define | ZB_APP_DESCR_ATTR_VAL_SIZE 8U |
#define | ZB_APP_DESCR_ATTR_REC_SIZE 4U |
#define | SIZE_BY_APP_ID(app_id) (((app_id) == ZB_ZGP_APP_ID_0000) ? 4U : 8U) |
#define | ZGPD_ID_SIZE(zgpd_id) SIZE_BY_APP_ID((zgpd_id)->app_id) |
#define | ZB_ZGPD_IDS_ARE_EQUAL(id1, id2) |
#define | ZB_ZGP_SRC_ID_UNSPECIFIED 0x00000000U |
#define | ZB_ZGP_SRC_ID_ALL (zb_uint32_t)(~0u) |
#define | ZB_INIT_ZGPD_ID(zgpd_id) |
#define | ZB_ZGPD_IS_SPECIFIED(zgpd_id) |
#define | ZB_MAKE_ZGPD_ID(zgpd_id, s_app_id, s_endpoint, s_addr) |
#define | ZB_GPDF_CMD_IS_SCENE_CMD(_cmd_id) |
#define | ZB_GPDF_CMD_IS_RECALL_SCENE(_cmd_id) |
#define | ZB_GPDF_CMD_IS_STORE_SCENE(_cmd_id) |
Typedefs | |
typedef enum zb_zgp_app_id_e | zb_zgp_app_id_t |
ZGPD application ID. | |
typedef union zb_zgpd_addr_u | zb_zgpd_addr_t |
ZGPD address. More... | |
typedef struct zb_zgpd_id_s | zb_zgpd_id_t |
ZGPD identification info (ZGPD ID) More... | |
typedef struct zgp_attr_record_s | zgp_attr_record_t |
typedef struct zgp_data_point_desc_options_s | zgp_data_point_desc_options_t |
typedef struct zgp_data_point_desc_s | zgp_data_point_desc_t |
typedef struct zgp_report_desc_options_s | zgp_report_desc_options_t |
typedef struct zgp_report_desc_s | zgp_report_desc_t |
typedef struct zgp_report_desc_pairing_config_s | zgp_report_desc_pairing_config_t |
typedef enum zb_zgpd_dev_id_e | zb_zgpd_dev_id_t |
Possible ZGPD device identifiers. More... | |
typedef enum zb_zgpd_manuf_specific_dev_id_e | zb_zgpd_manuf_specific_dev_id_t |
Manufacturer-specific device identifiers for GreanPeak. More... | |
typedef enum zgp_communication_mode_e | zgp_communication_mode_t |
typedef enum zgp_commissioning_exit_mode_e | zgp_commissioning_exit_mode_t |
typedef enum zb_zgp_comm_status_e | zb_zgp_comm_status_t |
Possible commissioning result. | |
typedef enum zb_zgp_mode_change_reason_e | zb_zgp_mode_change_reason_t |
GP Sink mode change reason. | |
typedef enum zb_zgp_mode_e | zb_zgp_mode_t |
Current mode of ZGP endpoint. | |
typedef struct zb_zgp_gpd_cmds_list_s | zb_zgp_gpd_cmds_list_t |
GPD CommandID list. | |
typedef struct zb_zgp_cluster_list_s | zb_zgp_cluster_list_t |
GPD Cluster List. | |
typedef void(* | zb_zgp_comm_req_cb_t) (zb_zgpd_id_t *zgpd_id, zb_uint8_t device_id, zb_uint16_t manuf_id, zb_uint16_t manuf_model_id, zb_ieee_addr_t ieee_addr) |
Commissioning request callback type. More... | |
Enumerations | |
enum | zb_zgp_app_id_e { ZB_ZGP_APP_ID_0000 = 0x00, ZB_ZGP_APP_ID_0001 = 0x01, ZB_ZGP_APP_ID_0010 = 0x02, ZB_ZGP_APP_ID_INVALID = 0x07 } |
ZGPD application ID. More... | |
enum | zb_zgp_endpoint_e { ZB_ZGP_COMMUNICATION_ENDPOINT, ZB_ZGP_ALL_ENDPOINTS = 255 } |
enum | zb_zgp_security_level_e { ZB_ZGP_SEC_LEVEL_NO_SECURITY = 0x00, ZB_ZGP_SEC_LEVEL_REDUCED = 0x01, ZB_ZGP_SEC_LEVEL_FULL_NO_ENC = 0x02, ZB_ZGP_SEC_LEVEL_FULL_WITH_ENC = 0x03 } |
ZGP security level type. More... | |
enum | zb_zgp_security_level_protection_with_gp_link_key_e { ZB_ZGP_SEC_LEVEL_PROTECTION_WITHOUT_GP_LINK_KEY = 0x00, ZB_ZGP_SEC_LEVEL_PROTECTION_WITH_GP_LINK_KEY = 0x01 } |
ZGP gpsSecurityLevel attribute. More... | |
enum | zb_zgp_security_level_involve_tc_e { ZB_ZGP_SEC_LEVEL_PROTECTION_DO_NOT_INVOLVE_TC = 0x00, ZB_ZGP_SEC_LEVEL_PROTECTION_INVOLVE_TC = 0x01 } |
ZGP gpsSecurityLevel attribute. More... | |
enum | zb_zgp_security_key_type_e { ZB_ZGP_SEC_KEY_TYPE_NO_KEY = 0x00, ZB_ZGP_SEC_KEY_TYPE_NWK = 0x01, ZB_ZGP_SEC_KEY_TYPE_GROUP = 0x02, ZB_ZGP_SEC_KEY_TYPE_GROUP_NWK_DERIVED = 0x03, ZB_ZGP_SEC_KEY_TYPE_ZGPD_INDIVIDUAL = 0x04, ZB_ZGP_SEC_KEY_TYPE_DERIVED_INDIVIDUAL = 0x07 } |
enum | zb_zgpd_dev_id_e { ZB_ZGP_SIMPLE_GEN_1_STATE_SWITCH_DEV_ID = 0x00, ZB_ZGP_SIMPLE_GEN_2_STATE_SWITCH_DEV_ID = 0x01, ZB_ZGP_ON_OFF_SWITCH_DEV_ID = 0x02, ZB_ZGP_LEVEL_CONTROL_SWITCH_DEV_ID = 0x03, ZB_ZGP_SIMPLE_SENSOR_DEV_ID = 0x04, ZB_ZGP_ADVANCED_GEN_1_STATE_SWITCH_DEV_ID = 0x05, ZB_ZGP_ADVANCED_GEN_2_STATE_SWITCH_DEV_ID = 0x06, ZB_ZGP_GEN_8_CONT_SWITCH_DEV_ID = 0x07, ZB_ZGP_COLOR_DIMMER_SWITCH_DEV_ID = 0x10, ZB_ZGP_LIGHT_SENSOR_DEV_ID = 0x11, ZB_ZGP_OCCUPANCY_SENSOR_DEV_ID = 0x12, ZB_ZGP_DOOR_LOCK_CONTROLLER_DEV_ID = 0x20, ZB_ZGP_TEMPERATURE_SENSOR_DEV_ID = 0x30, ZB_ZGP_PRESSURE_SENSOR_DEV_ID = 0x31, ZB_ZGP_FLOW_SENSOR_DEV_ID = 0x32, ZB_ZGP_ENVIRONMENT_SENSOR_DEV_ID = 0x33, ZB_ZGP_MANUF_SPECIFIC_DEV_ID = 0xfe, ZB_ZGP_UNDEFINED_DEV_ID = 0xff } |
Possible ZGPD device identifiers. More... | |
enum | zb_zgpd_manuf_specific_dev_id_e { ZB_ZGP_MS_DOOR_SENSOR_DEV_ID = 0x00, ZB_ZGP_MS_DOOR_WINDOW_SENSOR_DEV_ID = 0x01, ZB_ZGP_MS_LEAKAGE_SENSOR_DEV_ID = 0x02, ZB_ZGP_MS_HUMIDITY_SENSOR_DEV_ID = 0x03, ZB_ZGP_MS_MOTION_SENSOR_DEV_ID = 0x05, ZB_ZGP_MS_MOVEMENT_SENSOR_DEV_ID = 0x07, ZB_ZGP_MS_SMART_PLUG_DEV_ID = 0X08, ZB_ZGP_MS_KEY_FOB_DEV_ID = 0x0A, ZB_ZGP_MS_SMOKE_DETECTOR_DEV_ID = 0x0b, ZB_ZGP_MS_BED_SENSOR_DEV_ID = 0x0c, ZB_ZGP_MS_PARKING_SENSOR_DEV_ID = 0xc0 } |
Manufacturer-specific device identifiers for GreanPeak. More... | |
enum | zgp_communication_mode_e { ZGP_COMMUNICATION_MODE_FULL_UNICAST = 0, ZGP_COMMUNICATION_MODE_GROUPCAST_DERIVED = 1, ZGP_COMMUNICATION_MODE_GROUPCAST_PRECOMMISSIONED = 2, ZGP_COMMUNICATION_MODE_LIGHTWEIGHT_UNICAST = 3 } |
enum | zgp_commissioning_exit_mode_e { ZGP_COMMISSIONING_EXIT_MODE_ON_COMMISSIONING_WINDOW_EXPIRATION = (1<<0), ZGP_COMMISSIONING_EXIT_MODE_ON_PAIRING_SUCCESS = (1<<1), ZGP_COMMISSIONING_EXIT_MODE_ON_GP_PROXY_COMMISSIONING_MODE_EXIT = (1<<2), ZGP_COMMISSIONING_EXIT_MODE_ON_CWE_OR_PS, ZGP_COMMISSIONING_EXIT_MODE_ON_CWE_OR_PCM, ZGP_COMMISSIONING_EXIT_MODE_ALL } |
enum | zb_zgp_comm_status_e { ZB_ZGP_COMMISSIONING_COMPLETED, ZB_ZGP_COMMISSIONING_FAILED, ZB_ZGP_COMMISSIONING_TIMED_OUT, ZB_ZGP_COMMISSIONING_NO_MATCH_ERROR, ZB_ZGP_COMMISSIONING_INTERNAL_ERROR, ZB_ZGP_COMMISSIONING_EXTERNAL_ERROR, ZB_ZGP_COMMISSIONING_CANCELLED_BY_USER, ZB_ZGP_ZGPD_DECOMMISSIONED } |
Possible commissioning result. More... | |
enum | zb_zgp_mode_change_reason_e { ZB_ZGP_MODE_CHANGE_TRIGGERED_BY_COMMAND = 1, ZB_ZGP_MODE_CHANGE_TRIGGERED_BY_USER, ZB_ZGP_MODE_CHANGE_ON_FIRST_PARING_EXIT, ZB_ZGP_MODE_CHANGE_TIMEOUT } |
GP Sink mode change reason. | |
enum | zb_zgp_mode_e { ZB_ZGP_OPERATIONAL_MODE, ZB_ZGP_COMMISSIONING_MODE } |
Current mode of ZGP endpoint. More... | |
enum | zb_zgpd_switch_type_e { ZB_GPD_SWITCH_TYPE_BUTTON = 0x01, ZB_GPD_SWITCH_TYPE_ROCKER = 0x02 } |
enum | zb_zgpd_cmd_id_e { ZB_GPDF_CMD_IDENTIFY = 0x00, ZB_GPDF_CMD_RECALL_SCENE0 = 0x10, ZB_GPDF_CMD_RECALL_SCENE1 = 0x11, ZB_GPDF_CMD_RECALL_SCENE2 = 0x12, ZB_GPDF_CMD_RECALL_SCENE3 = 0x13, ZB_GPDF_CMD_RECALL_SCENE4 = 0x14, ZB_GPDF_CMD_RECALL_SCENE5 = 0x15, ZB_GPDF_CMD_RECALL_SCENE6 = 0x16, ZB_GPDF_CMD_RECALL_SCENE7 = 0x17, ZB_GPDF_CMD_RECALL_SCENE8 = 0x18, ZB_GPDF_CMD_RECALL_SCENE9 = 0x19, ZB_GPDF_CMD_RECALL_SCENE10 = 0x1A, ZB_GPDF_CMD_RECALL_SCENE11 = 0x1B, ZB_GPDF_CMD_STORE_SCENE4 = 0x1C, ZB_GPDF_CMD_STORE_SCENE5 = 0x1D, ZB_GPDF_CMD_STORE_SCENE6 = 0x1E, ZB_GPDF_CMD_STORE_SCENE7 = 0x1F, ZB_GPDF_CMD_OFF = 0x20, ZB_GPDF_CMD_ON = 0x21, ZB_GPDF_CMD_TOGGLE = 0x22, ZB_GPDF_CMD_RELEASE = 0x23, ZB_GPDF_CMD_MOVE_UP = 0x30, ZB_GPDF_CMD_MOVE_DOWN = 0x31, ZB_GPDF_CMD_STEP_UP = 0x32, ZB_GPDF_CMD_STEP_DOWN = 0x33, ZB_GPDF_CMD_LC_STOP = 0x34, ZB_GPDF_CMD_MOVE_UP_W_ONOFF = 0x35, ZB_GPDF_CMD_MOVE_DOWN_W_ONOFF = 0x36, ZB_GPDF_CMD_STEP_UP_W_ONOFF = 0x37, ZB_GPDF_CMD_STEP_DOWN_W_ONOFF = 0x38, ZB_GPDF_CMD_MOVE_HUE_STOP = 0x40, ZB_GPDF_CMD_MOVE_HUE_UP = 0x41, ZB_GPDF_CMD_MOVE_HUE_DOWN = 0x42, ZB_GPDF_CMD_STEP_HUE_UP = 0x43, ZB_GPDF_CMD_STEP_HUE_DOWN = 0x44, ZB_GPDF_CMD_MOVE_SATURATION_STOP = 0x45, ZB_GPDF_CMD_MOVE_SATURATION_UP = 0x46, ZB_GPDF_CMD_MOVE_SATURATION_DOWN = 0x47, ZB_GPDF_CMD_STEP_SATURATION_UP = 0x48, ZB_GPDF_CMD_STEP_SATURATION_DOWN = 0x49, ZB_GPDF_CMD_MOVE_COLOR = 0x4A, ZB_GPDF_CMD_STEP_COLOR = 0x4B, ZB_GPDF_CMD_LOCK_DOOR = 0x50, ZB_GPDF_CMD_UNLOCK_DOOR = 0x51, ZB_GPDF_CMD_PRESS_1_OF_1 = 0x60, ZB_GPDF_CMD_RELEASE_1_OF_1 = 0x61, ZB_GPDF_CMD_PRESS_1_OF_2 = 0x62, ZB_GPDF_CMD_RELEASE_1_OF_2 = 0x63, ZB_GPDF_CMD_PRESS_2_OF_2 = 0x64, ZB_GPDF_CMD_RELEASE_2_OF_2 = 0x65, ZB_GPDF_CMD_SHORT_PRESS_1_OF_1 = 0x66, ZB_GPDF_CMD_SHORT_PRESS_1_OF_2 = 0x67, ZB_GPDF_CMD_SHORT_PRESS_2_OF_2 = 0x68, ZB_GPDF_CMD_8BIT_VECTOR_PRESS = 0x69, ZB_GPDF_CMD_8BIT_VECTOR_RELEASE = 0x6A, ZB_GPDF_CMD_ATTR_REPORT = 0xA0, ZB_GPDF_CMD_MANUF_SPEC_ATTR_REPORT = 0xA1, ZB_GPDF_CMD_MULTI_CLUSTER_ATTR_REPORT = 0xA2, ZB_GPDF_CMD_MANUF_SPEC_MULTI_CLUSTER_ATTR_REPORT = 0xA3, ZB_GPDF_CMD_REQUEST_ATTRIBUTES = 0xA4, ZB_GPDF_CMD_READ_ATTR_RESP = 0xA5, ZB_GPDF_CMD_ZCL_TUNNELING_FROM_ZGPD = 0xA6, ZB_GPDF_CMD_COMPACT_ATTR_REPORTING = 0xA8, ZB_GPDF_CMD_ATTR_REPORT_ANY = 0xAF, ZB_GPDF_CMD_MANUF_DEFINED_B0 = 0xB0, ZB_GPDF_CMD_MANUF_DEFINED_BF = 0xBF, ZB_GPDF_CMD_COMMISSIONING = 0xE0, ZB_GPDF_CMD_DECOMMISSIONING = 0xE1, ZB_GPDF_CMD_SUCCESS = 0xE2, ZB_GPDF_CMD_CHANNEL_REQUEST = 0xE3, ZB_GPDF_CMD_APPLICATION_DESCR = 0xE4, ZB_GPDF_CMD_COMMISSIONING_REPLY = 0xF0, ZB_GPDF_CMD_WRITE_ATTRIBUTES = 0xF1, ZB_GPDF_CMD_READ_ATTRIBUTES = 0xF2, ZB_GPDF_CMD_CHANNEL_CONFIGURATION = 0xF3, ZB_GPDF_CMD_ZCL_TUNNELING_TO_ZGPD = 0xF6 } |
Command identifiers sent from or to ZGPD. | |
#define ZB_GPDF_CMD_IS_RECALL_SCENE | ( | _cmd_id | ) |
#define ZB_GPDF_CMD_IS_SCENE_CMD | ( | _cmd_id | ) |
#define ZB_GPDF_CMD_IS_STORE_SCENE | ( | _cmd_id | ) |
#define ZB_INIT_ZGPD_ID | ( | zgpd_id | ) |
#define ZB_MAKE_ZGPD_ID | ( | zgpd_id, | |
s_app_id, | |||
s_endpoint, | |||
s_addr | |||
) |
#define ZB_ZGPD_IDS_ARE_EQUAL | ( | id1, | |
id2 | |||
) |
#define ZB_ZGPD_IS_SPECIFIED | ( | zgpd_id | ) |
typedef void( * zb_zgp_comm_req_cb_t) (zb_zgpd_id_t *zgpd_id, zb_uint8_t device_id, zb_uint16_t manuf_id, zb_uint16_t manuf_model_id, zb_ieee_addr_t ieee_addr) |
Commissioning request callback type.
Commissioning request callback notifies application about commissioning attempt from ZGPD. Callback is called when ZGPD sends commissioning frame. Callback provides to user ZGPD ID and ZGPD Device ID. Based on these parameters user application should decide whether commissioning procedure should be continued or not.
Commissioning request callback should be set during ZGP initialization using ZB_ZGP_REGISTER_COMM_REQ_CB macro. If callback is not registered, then ZBOSS accepts all incoming commissioning attempts.
zgpd_id | [in] ZGPD ID |
device_id | [in] ZGPD device ID |
manuf_id | [in] Manufacturer ID (meaningful if device_id = 0xFE or 0xFF) |
manuf_model_id | [in] Manufacturer model ID (meaningful if device_id = 0xFE or 0xFF) |
ieee_addr | [in] ZGPD long IEEE address if available, otherwise filled with zeroes |
typedef union zb_zgpd_addr_u zb_zgpd_addr_t |
ZGPD address.
ZGPD is identified in network whether by SrcId or its IEEE address.
typedef enum zb_zgpd_dev_id_e zb_zgpd_dev_id_t |
Possible ZGPD device identifiers.
typedef struct zb_zgpd_id_s zb_zgpd_id_t |
ZGPD identification info (ZGPD ID)
ZGPD is identified by SrcId if ApplicationID is ZB_ZGP_APP_ID_0000. Otherwise, ZGPD is identified by its IEEE address.
Manufacturer-specific device identifiers for GreanPeak.
typedef enum zgp_communication_mode_e zgp_communication_mode_t |
Values of gpsCommunicationMode attribute Table 27
enum zb_zgp_app_id_e |
enum zb_zgp_comm_status_e |
Possible commissioning result.
Enumerator | |
---|---|
ZB_ZGP_COMMISSIONING_COMPLETED | Commissioning with some device completed successfully |
ZB_ZGP_COMMISSIONING_FAILED | Commissioning failed. The reason can be:
|
ZB_ZGP_COMMISSIONING_TIMED_OUT | Commissioning failed, because of timeout |
ZB_ZGP_COMMISSIONING_NO_MATCH_ERROR | No functionality match with commissioning device is found. Maybe matching table is not provided by user application |
ZB_ZGP_COMMISSIONING_INTERNAL_ERROR | Commissioning failed, because some internal error occurred in stack. This type of error is recoverable, so next commissioning attempt can be successful |
ZB_ZGP_COMMISSIONING_EXTERNAL_ERROR | Commissioning failed, because some external error has occurred. Normal functioning of ZGP subsystem is not possible (e.g. physical operational channel can't be obtained) |
ZB_ZGP_COMMISSIONING_CANCELLED_BY_USER | User cancelled commissioning by calling zb_zgps_stop_commissioning() |
ZB_ZGP_ZGPD_DECOMMISSIONED | ZGPD sent Decommissioning command |
enum zb_zgp_mode_e |
The gpSharedSecurityKeyType attribute can take the following values from Table 48: Table 48 - Values of gpSecurityKeyType
See also Table 12 - Mapping between the gpSecurityKeyType and the SecurityKey sub-field of the Extended NWK Frame Control field
ZGP security level type.
enum zb_zgpd_dev_id_e |
Possible ZGPD device identifiers.
Manufacturer-specific device identifiers for GreanPeak.
Values of gpsCommunicationMode attribute Table 27