
Commissioning page structure in NVM. More...
#include <zb_nvm.h>
Data Fields | |
| zb_uint32_t | channel_index |
| For unidirectional - index in the tx_cfg->channels[] after commissioning completeness, ~0 if not commissioned. More... | |
| zb_uint32_t | bidir_comm_stage_done [ZGPD_COMM_N_STAGES] |
| If bidir_comm_stage_done[i] is set to the value other than ~0, than bidirectional commissioning stage is successfully passed. More... | |
| zb_uint8_t | gpd_key [ZB_SECURITY_KEY_LEN] |
| GPD key received for GPCB, if GPD is configured to receive a key. More... | |
| zb_uint32_t | key_type |
| Type of GPD key received. More... | |
| zb_uint32_t | pan_id |
| PAN ID saved as 32bit unsigned integer, only lower 16bits are used. More... | |
| zb_uint32_t | channel_idx_bm_start [1] |
| Channels index bitmap (first word). More... | |
Commissioning page structure in NVM.
A single flash page is used to store the commissioning information of the following available types:
The structure of the commissioning page is consistent across all types of commissioning, even if certain parts are unused for a specific commissioning type.
The page consists of a fixed size part and the rest of the page is used to store index in the current channels array.
To forget commissioning info (== decommission) just erase the page. It is supposed that the flash is erased to ~0.
All data structures in the commissioning page are word-aligned. Use 32 bits even where 8 or 16 bits are enough.
| zb_uint32_t zb_comm_page_header_s::channel_index |
For unidirectional - index in the tx_cfg->channels[] after commissioning completeness, ~0 if not commissioned.
For bidirectional - channel number (not index!) when channel is configured by receiving Channel Config.
| zb_uint32_t zb_comm_page_header_s::bidir_comm_stage_done[ZGPD_COMM_N_STAGES] |
If bidir_comm_stage_done[i] is set to the value other than ~0, than bidirectional commissioning stage is successfully passed.
Used for battery-less bidirectional commissioning, ignored in other cases.
| zb_uint8_t zb_comm_page_header_s::gpd_key[ZB_SECURITY_KEY_LEN] |
GPD key received for GPCB, if GPD is configured to receive a key.
Ignored in all other cases.
| zb_uint32_t zb_comm_page_header_s::key_type |
Type of GPD key received.
| zb_uint32_t zb_comm_page_header_s::pan_id |
PAN ID saved as 32bit unsigned integer, only lower 16bits are used.
| zb_uint32_t zb_comm_page_header_s::channel_idx_bm_start[1] |
Channels index bitmap (first word).
The bitmap resides up to end of the page.