
Data Structures | |
| union | zb_zgpd_addr_u |
| ZGPD address. More... | |
| struct | zb_zgpd_id_s |
| ZGPD identification info (ZGPD ID). More... | |
| struct | zb_gpdf_info_s |
| Parsed values of GPDF frame. More... | |
| struct | zb_gpdf_comm_reply_s |
| ZGPD Commissioning reply parameters. More... | |
Macros | |
| #define | ZB_NWK_FRAMECTL_GET_PROTOCOL_VERSION(fctl) (((fctl)[ZB_PKT_16B_ZERO_BYTE] >> 2U) & 0xfU) |
| Gets protocol version from the NWK header Frame Control field. More... | |
| #define | ZB_ZGP_PROTOCOL_VERSION 0x03U |
| Zigbee protocol version for GPDF frames. More... | |
Typedefs | |
| typedef enum gboss_cmd_ids_e | gboss_cmd_ids_t |
| Enum all ZGPD APP Command IDs. More... | |
| typedef enum zb_zgp_app_id_e | zb_zgp_app_id_t |
| ZGPD application ID. More... | |
| typedef struct zb_gpdf_comm_reply_s | zgpd_comm_reply_t |
| ZGPD Commissioning reply parameters. More... | |
Enumerations | |
| enum | gboss_cmd_ids_e |
| Enum all ZGPD APP Command IDs. More... | |
| 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_gpdf_frame_type_e { ZGP_FRAME_TYPE_DATA = 0x00, ZGP_FRAME_TYPE_MAINTENANCE = 0x01, ZGP_FRAME_TYPE_RESERVED1 = 0x02, ZGP_FRAME_TYPE_RESERVED2 = 0x03 } |
| NWK frame type used with ZB_ZGP_PROTOCOL_VERSION. More... | |
| 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... | |
Functions | |
| zb_ret_t | gboss_app_send (const gboss_device_config_t *device_config, const gboss_tx_cfg_t *tx_cfg, const zb_uint8_t *data, zb_uint8_t data_size) |
| Sends one data packet over the air when GPD is already commissioned. More... | |
| zb_ret_t | gboss_app_send_rx (const gboss_device_config_t *device_config, const gboss_tx_cfg_t *tx_cfg, const zb_uint8_t *data, zb_uint8_t data_size, zb_uint8_t rx_after_tx) |
| Sends one data packet over the air when GPD is already commissioned. More... | |
| zb_uint8_t | zb_nwk_frame_prepare (zb_uint8_t *buffer, const gboss_device_config_t *device_config, zb_uint8_t security_level, zb_uint32_t seq_number, zb_uint8_t rx_after_tx) |
| Prepares NWK header in the packet to be sent. More... | |
| zb_ret_t | zgpd_pkt_send_unidir (const gboss_device_config_t *device_config, zb_uint8_t security_level, zb_uint32_t seq_number, const zb_uint8_t *data, zb_uint8_t data_size, const zb_uint8_t *channels, zb_uint8_t channel_count, zb_uint8_t repetitions) |
| Sends one data packet over the air. More... | |
| zb_ret_t | zgpd_pkt_send_bidir (const gboss_device_config_t *device_config, zb_uint8_t security_level, zb_uint32_t seq_number, const zb_uint8_t *data, zb_uint8_t data_size, zb_uint8_t channel, zb_uint16_t dst_pan_id, zb_uint8_t repetitions, zb_uint8_t rx_after_tx) |
| Sends one data packet over the air with RX after TX bitfield control. More... | |
| zb_uint8_t | zgpd_parse_gpdf_nwk_hdr (zb_uint8_t *gpdf, zb_uint8_t gpdf_len, zb_gpdf_info_t *gpdf_info) |
| Parses ZGP Stub NWK header of GPDF. More... | |
| #define ZB_NWK_FRAMECTL_GET_PROTOCOL_VERSION | ( | fctl | ) | (((fctl)[ZB_PKT_16B_ZERO_BYTE] >> 2U) & 0xfU) |
Gets protocol version from the NWK header Frame Control field.
| fctl | Frame Control Field of NWK header |
| #define ZB_ZGP_PROTOCOL_VERSION 0x03U |
Zigbee protocol version for GPDF frames.
| typedef enum gboss_cmd_ids_e gboss_cmd_ids_t |
Enum all ZGPD APP Command IDs.
| typedef enum zb_zgp_app_id_e zb_zgp_app_id_t |
ZGPD application ID.
| typedef struct zb_gpdf_comm_reply_s zgpd_comm_reply_t |
ZGPD Commissioning reply parameters.
| enum gboss_cmd_ids_e |
Enum all ZGPD APP Command IDs.
| enum zb_zgp_app_id_e |
| enum zb_gpdf_frame_type_e |
NWK frame type used with ZB_ZGP_PROTOCOL_VERSION.
| Enumerator | |
|---|---|
| ZGP_FRAME_TYPE_DATA | Data frame. |
| ZGP_FRAME_TYPE_MAINTENANCE | Maintenance frame. |
| ZGP_FRAME_TYPE_RESERVED1 | Reserved. |
| ZGP_FRAME_TYPE_RESERVED2 | Reserved. |
ZGP security level type.
| zb_ret_t gboss_app_send | ( | const gboss_device_config_t * | device_config, |
| const gboss_tx_cfg_t * | tx_cfg, | ||
| const zb_uint8_t * | data, | ||
| zb_uint8_t | data_size | ||
| ) |
Sends one data packet over the air when GPD is already commissioned.
The function sends an application layer payload. It automatically adds all necessary low-level headers and performs encryption if necessary.
Once a packet built in the internal memory it can be sent several times over multiple channels if necessary.
| device_config | GPD configuration block |
| tx_cfg | GPD TX configuration block |
| data | Pointer to the APP layer data payload |
| data_size | Size of the data |
| data_size | Size of the data |
References gboss_app_send_rx().
| zb_ret_t gboss_app_send_rx | ( | const gboss_device_config_t * | device_config, |
| const gboss_tx_cfg_t * | tx_cfg, | ||
| const zb_uint8_t * | data, | ||
| zb_uint8_t | data_size, | ||
| zb_uint8_t | rx_after_tx | ||
| ) |
Sends one data packet over the air when GPD is already commissioned.
The function sends an application layer payload. It automatically adds all necessary low-level headers and performs encryption if necessary.
Once a packet built in the internal memory it can be sent several times over multiple channels if necessary.
| device_config | GPD configuration block |
| tx_cfg | GPD TX configuration block |
| data | Pointer to the APP layer data payload |
| data_size | Size of the data |
| rx_after_tx | Enable RX after TX bitfield of NWK Extended header for bidir |
Sends one data packet over the air when GPD is already commissioned.
Same interface for unidirectional and bidirectional devices.
Referenced by gboss_app_send().
| zb_uint8_t zb_nwk_frame_prepare | ( | zb_uint8_t * | buffer, |
| const gboss_device_config_t * | device_config, | ||
| zb_uint8_t | security_level, | ||
| zb_uint32_t | seq_number, | ||
| zb_uint8_t | rx_after_tx | ||
| ) |
Prepares NWK header in the packet to be sent.
| buffer | Pointer to the area where to put the NWK header |
| device_config | Device configuration block |
| security_level | Expected message security level |
| seq_number | Packet sequential number |
| rx_after_tx | RX after TX bit value |
References gboss_device_config_s::application_id, GBOSS_KEY_TYPE_INDIVIDUAL_PRE_CONFIG_KEY, GBOSS_SECURITY_KEY_CAP_L0, ZB_FALSE, zb_security_get_key_type(), and ZB_TRUE.
Referenced by zgpd_pkt_send_bidir(), and zgpd_pkt_send_unidir().
| zb_ret_t zgpd_pkt_send_unidir | ( | const gboss_device_config_t * | device_config, |
| zb_uint8_t | security_level, | ||
| zb_uint32_t | seq_number, | ||
| const zb_uint8_t * | data, | ||
| zb_uint8_t | data_size, | ||
| const zb_uint8_t * | channels, | ||
| zb_uint8_t | channel_count, | ||
| zb_uint8_t | repetitions | ||
| ) |
Sends one data packet over the air.
The function sends an application layer payload. It automatically adds all necessary low-level headers and performs encryption if necessary.
Once a packet is built in the internal memory it can be sent several times over multiple channels if necessary.
| device_config | GPD configuration block |
| security_level | Levels 0, 2 and 3 are supported now - gboss_security_key_capabilities_t |
| seq_number | Packet's sequence number |
| data | Pointer to the APP layer data payload |
| data_size | Size of the data |
| channels | Pointer to the list of the channels to be used for transmitting |
| channel_count | Number of items in the channels list |
| repetitions | Number of sending repetitions for every channel |
References zb_mac_frame_prepare(), and zb_nwk_frame_prepare().
| zb_ret_t zgpd_pkt_send_bidir | ( | const gboss_device_config_t * | device_config, |
| zb_uint8_t | security_level, | ||
| zb_uint32_t | seq_number, | ||
| const zb_uint8_t * | data, | ||
| zb_uint8_t | data_size, | ||
| zb_uint8_t | channel, | ||
| zb_uint16_t | dst_pan_id, | ||
| zb_uint8_t | repetitions, | ||
| zb_uint8_t | rx_after_tx | ||
| ) |
Sends one data packet over the air with RX after TX bitfield control.
The function sends an application layer payload. It automatically adds all necessary low-level headers and performs encryption if necessary.
Once a packet is built in the internal memory it can be sent several times over multiple channels if necessary.
| device_config | GPD configuration block |
| security_level | Levels 0, 2 and 3 are supported now - gboss_security_key_capabilities_t |
| seq_number | Packet's sequence number |
| data | Pointer to the APP layer data payload |
| data_size | Size of the data |
| channel | Channel to be used |
| dst_pan_id | Destination PAN ID |
| repetitions | Number of sending repetitions |
| rx_after_tx | Enable RX after TX bitfield of NWK Extended header |
References GBOSS_SECURITY_KEY_CAP_L0, zb_mac_frame_prepare(), zb_mac_send(), zb_mac_set_tx_channel(), zb_nwk_frame_prepare(), and zb_security_encode().
| zb_uint8_t zgpd_parse_gpdf_nwk_hdr | ( | zb_uint8_t * | gpdf, |
| zb_uint8_t | gpdf_len, | ||
| zb_gpdf_info_t * | gpdf_info | ||
| ) |
Parses ZGP Stub NWK header of GPDF.
| gpdf | [in] Pointer to the beginning of ZGP Stub NWK header |
| gpdf_len | [in] Length from beginning of ZGP Stub NWK header to the end of MIC field |
| gpdf_info | [out] GPDF info structure |