Logo
DSR GreenBOSS  1.1.0
Data Structures | Macros | Typedefs | Enumerations | Functions
Network Level

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...
 

Detailed Description

Macro Definition Documentation

§ ZB_NWK_FRAMECTL_GET_PROTOCOL_VERSION

#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.

Parameters
fctlFrame Control Field of NWK header

§ ZB_ZGP_PROTOCOL_VERSION

#define ZB_ZGP_PROTOCOL_VERSION   0x03U

Zigbee protocol version for GPDF frames.

Typedef Documentation

§ gboss_cmd_ids_t

Enum all ZGPD APP Command IDs.

§ zb_zgp_app_id_t

ZGPD application ID.

§ zgpd_comm_reply_t

ZGPD Commissioning reply parameters.

See also
ZGP spec, A.4.2.1.1

Enumeration Type Documentation

§ gboss_cmd_ids_e

Enum all ZGPD APP Command IDs.

§ zb_zgp_app_id_e

ZGPD application ID.

Enumerator
ZB_ZGP_APP_ID_0000 

ApplicationID value 0b000 - usage of the SrcID.

ZB_ZGP_APP_ID_0001 

ApplicationID value 0b001 - LPED.

ZB_ZGP_APP_ID_0010 

ApplicationID value 0b010 - usage of the GPD IEEE address.

ZB_ZGP_APP_ID_INVALID 

Invalid ApplicationID.

§ zb_gpdf_frame_type_e

NWK frame type used with ZB_ZGP_PROTOCOL_VERSION.

See also
ZGP spec, A.1.4.1.2
Enumerator
ZGP_FRAME_TYPE_DATA 

Data frame.

ZGP_FRAME_TYPE_MAINTENANCE 

Maintenance frame.

ZGP_FRAME_TYPE_RESERVED1 

Reserved.

ZGP_FRAME_TYPE_RESERVED2 

Reserved.

§ zb_zgp_security_level_e

ZGP security level type.

See also
ZGP spec, A.1.5.3.2
Enumerator
ZB_ZGP_SEC_LEVEL_NO_SECURITY 

No security.

ZB_ZGP_SEC_LEVEL_REDUCED 

1LSB of frame counter and short (2B) MIC

ZB_ZGP_SEC_LEVEL_FULL_NO_ENC 

Full (4B) frame counter and full (4B) MIC.

ZB_ZGP_SEC_LEVEL_FULL_WITH_ENC 

Encryption & full (4B) frame counter and full (4B) MIC.

Function Documentation

§ gboss_app_send()

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.

Parameters
device_configGPD configuration block
tx_cfgGPD TX configuration block
dataPointer to the APP layer data payload
data_sizeSize of the data
data_sizeSize of the data
Returns
zb_ret_t RET_OK if the packet was successfully sent, RET_ERROR otherwise

References gboss_app_send_rx().

§ 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.

Parameters
device_configGPD configuration block
tx_cfgGPD TX configuration block
dataPointer to the APP layer data payload
data_sizeSize of the data
rx_after_txEnable RX after TX bitfield of NWK Extended header for bidir
Returns
zb_ret_t RET_OK if the packet was successfully sent, RET_ERROR otherwise

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_nwk_frame_prepare()

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.

Parameters
bufferPointer to the area where to put the NWK header
device_configDevice configuration block
security_levelExpected message security level
seq_numberPacket sequential number
rx_after_txRX after TX bit value
Returns
Size of NWK header

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().

§ 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.

Parameters
device_configGPD configuration block
security_levelLevels 0, 2 and 3 are supported now - gboss_security_key_capabilities_t
seq_numberPacket's sequence number
dataPointer to the APP layer data payload
data_sizeSize of the data
channelsPointer to the list of the channels to be used for transmitting
channel_countNumber of items in the channels list
repetitionsNumber of sending repetitions for every channel
Returns
zb_ret_t RET_OK if the packet was successfully sent, RET_ERROR otherwise

References zb_mac_frame_prepare(), and zb_nwk_frame_prepare().

§ zgpd_pkt_send_bidir()

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.

Parameters
device_configGPD configuration block
security_levelLevels 0, 2 and 3 are supported now - gboss_security_key_capabilities_t
seq_numberPacket's sequence number
dataPointer to the APP layer data payload
data_sizeSize of the data
channelChannel to be used
dst_pan_idDestination PAN ID
repetitionsNumber of sending repetitions
rx_after_txEnable RX after TX bitfield of NWK Extended header
Returns
zb_ret_t RET_OK if the packet was successfully sent, RET_ERROR otherwise

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().

§ zgpd_parse_gpdf_nwk_hdr()

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.

Parameters
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
Returns
Number of bytes parsed in ZGP Stub NWK header if parsing successful
0 if parsing has failed
See also
ZGP spec, A.1.4.1