
Data Structures | |
| struct | zb_comm_page_header_s |
| Commissioning page structure in NVM. More... | |
Typedefs | |
| typedef struct zb_comm_page_header_s | zb_comm_page_header_t |
| Commissioning page structure in NVM. More... | |
Functions | |
| zb_int16_t | zb_commissioned_index (void) |
| Returns channel index, which was used on the previous commissioning stage. More... | |
| zb_ret_t | zb_commission_prepare (zb_uint32_t seq_number, const gboss_device_config_t *device_config, zb_uint8_t *buffer, zb_uint8_t *buffer_length) |
| Prepares a commissioning packet. More... | |
| zb_uint32_t | zgpd_get_seq_number (void) |
| Retrieves next MAC sequential number for a packet to be sent and saves it to non-volatile memory. More... | |
| zb_uint32_t | zgpd_lookup_seq_number (void) |
| Looks up for the next MAC sequential number for a packet to be sent without persisting to non-volatile memory. More... | |
| typedef struct zb_comm_page_header_s zb_comm_page_header_t |
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_int16_t zb_commissioned_index | ( | void | ) |
Returns channel index, which was used on the previous commissioning stage.
The function should be used by application to determine the channel group, which should be used for communication.
| zb_ret_t zb_commission_prepare | ( | zb_uint32_t | seq_number, |
| const gboss_device_config_t * | device_config, | ||
| zb_uint8_t * | buffer, | ||
| zb_uint8_t * | buffer_length | ||
| ) |
Prepares a commissioning packet.
This function prepares a commissioning packet according to given parameters and device configuration. The function uses it's own statically allocated buffer for the packet. User application should not try to free the returned memory.
| seq_number | Packet's sequence number |
| device_config | GPD configuration block |
| buffer | Buffer to be used for payload |
| buffer_length | Returned buffer length |
References gboss_device_config_s::cluster_cli_cnt, gboss_device_config_s::cluster_list_cli, gboss_device_config_s::cluster_list_srv, gboss_device_config_s::cluster_srv_cnt, gboss_device_config_s::cmd_list, and gboss_device_config_s::cmd_list_count.
| zb_uint32_t zgpd_get_seq_number | ( | void | ) |
Retrieves next MAC sequential number for a packet to be sent and saves it to non-volatile memory.
The function provides generation of a very long sequence of the incrementing numbers. Due to limitations of energy and flash memory characteristics the own data structure is used to minimize memory erasing.
References TRACE_MSG.
Referenced by gboss_unidir_commissioning_step().
| zb_uint32_t zgpd_lookup_seq_number | ( | void | ) |
Looks up for the next MAC sequential number for a packet to be sent without persisting to non-volatile memory.
The function provides generation of a very long sequence of the incrementing numbers. Due to limitations of energy and flash memory characteristics own data structure used to minimize memory erasing.
References TRACE_MSG.