Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo by
net_nvm_api.h File Reference
Library PANA NVM API for Client and Server. More...
Go to the source code of this file.
Enumerations | |
enum | pana_nvm_update_process_t { PANA_SERVER_MATERIAL_UPDATE, PANA_SERVER_CLIENT_SESSION_UPDATE, PANA_SERVER_CLIENT_SESSION_SEQ_UPDATE, PANA_SERVER_CLIENT_SESSION_REMOVE_UPDATE } |
PANA server NVM update states. More... | |
enum | pana_client_nvm_update_process_t { PANA_CLIENT_SESSION_UPDATE, PANA_CLIENT_SESSION_SEQ_UPDATE } |
PANA client NVM update states. More... | |
Functions | |
int8_t | pana_server_nvm_callback_set (uint16_t(*passed_fptr)(pana_nvm_update_process_t), uint8_t *nvm_static_buffer) |
PANA server NVM functionality initialization. | |
int8_t | pana_server_restore_from_nvm (uint8_t *nvm_data, int8_t interface_id) |
PANA server base restore from NVM. | |
int8_t | pana_server_nvm_client_session_load (uint8_t *nvm_pointer) |
PANA client session load from NVM API. | |
int8_t | pana_client_nvm_callback_set (void(*passed_fptr)(pana_client_nvm_update_process_t), uint8_t *nvm_static_buffer) |
PANA client NVM functionality init. | |
int8_t | net_read_persistent_data (uint8_t *data_buffer, int8_t interface_id) |
Read network persistent data. | |
int8_t | net_nvm_data_load (uint8_t *data_buffer, int8_t interface_id) |
Load ZigBeeIP node persistent data to stack for re-use. | |
int8_t | net_pana_client_session_nvm_data_load (uint8_t *data_buffer, uint8_t *session_address, int8_t interface_id) |
Load PANA client session data to the stack for re-use. | |
int8_t | net_nvm_data_clean (int8_t interface_id) |
Clean node persistent data and all PANA client sessions from the stack. |
Detailed Description
Library PANA NVM API for Client and Server.
Server NVM API
PANA server security material is crypted always and if you change the border router RF module decrypt does not work properly.
- pana_server_nvm_callback_set(), Initialize PANA server NVM functionality.
- pana_server_restore_from_nvm(), Load crypted PANA server base and security material from NVM.
- pana_server_nvm_client_session_load(), Load crypted client session from NVM.
Client NVM API
nw_nvm.c use already this API and the application can just use net_nvm_api.h.
- pana_client_nvm_callback_set(), Initialize PANA session NVM.
- net_read_persistent_data(), Read NWK ID & MAC 16-bit address.
- net_nvm_data_load(), Load PANA session, NWK-ID and short address to stack for re-use.
- net_pana_client_session_nvm_data_load(), Load saved PANA session with specific address or not.
Definition in file net_nvm_api.h.
Enumeration Type Documentation
PANA client NVM update states.
- Enumerator:
PANA_CLIENT_SESSION_UPDATE PANA session information fully update.
PANA_CLIENT_SESSION_SEQ_UPDATE PANA key pull or push operation update REQ and RES sequence number.
Definition at line 72 of file net_nvm_api.h.
PANA server NVM update states.
- Enumerator:
Definition at line 61 of file net_nvm_api.h.
Function Documentation
int8_t net_nvm_data_clean | ( | int8_t | interface_id ) |
Clean node persistent data and all PANA client sessions from the stack.
This function disables the network ID filter, sets EUID-16 to 0xffff and removes PANA client sessions. It is only for client purposes.
- Returns:
- 0, Clean OK.
- -1, Stack is active.
int8_t net_nvm_data_load | ( | uint8_t * | data_buffer, |
int8_t | interface_id | ||
) |
Load ZigBeeIP node persistent data to stack for re-use.
- Parameters:
-
data_buffer A pointer to data with 88 bytes [NWK-ID 16bytes, Short Address 2bytes, Pana 70 bytes].
- Returns:
- 0, Read OK.
- -1, Null parameter detected.
- -2, Stack is active.
- <-2 Memory allocation fail.
int8_t net_pana_client_session_nvm_data_load | ( | uint8_t * | data_buffer, |
uint8_t * | session_address, | ||
int8_t | interface_id | ||
) |
Load PANA client session data to the stack for re-use.
- Parameters:
-
data_buffer A pointer to data with encrypted PANA session 70 bytes. session_address A pointer to a session-specific address. Give the address if you want to re-use the session with specific parent, otherwise give NULL.
- Returns:
- 0, Read OK.
- -1, Null parameter detected.
- -2, Stack is active.
- <-2 Memory allocation fail.
int8_t net_read_persistent_data | ( | uint8_t * | data_buffer, |
int8_t | interface_id | ||
) |
Read network persistent data.
- Parameters:
-
data_buffer A pointer to location where the stack saves 18 bytes [NWK-ID 16bytes, Short Address 2bytes].
- Returns:
- 0, Read OK.
- -1, Null parameter detected.
- -2 Bootstrap not ready yet.
This function should call when network bootstrap is ready.
int8_t pana_client_nvm_callback_set | ( | void(*)(pana_client_nvm_update_process_t) | passed_fptr, |
uint8_t * | nvm_static_buffer | ||
) |
PANA client NVM functionality init.
- Parameters:
-
passed_fptr A function pointer to NVM update process. nvm_static_buffer A pointer to application allocated static memory, minimum size 88 bytes.
Reference callback function structure using EEPROM:
- nvm_static_buffer Application allocated static buffer.
- Returns:
- 0, Init OK.
- -1, Null parameter detect.
int8_t pana_server_nvm_callback_set | ( | uint16_t(*)(pana_nvm_update_process_t) | passed_fptr, |
uint8_t * | nvm_static_buffer | ||
) |
PANA server NVM functionality initialization.
- Parameters:
-
passed_fptr A function pointer to NVM update process. nvm_static_buffer A pointer to application allocated static memory, minimum size 115 bytes.
Reference callback function structure using EEPROM:
- nvm_static_buffer Application is allocated a static buffer.
- Returns:
- 0, Init OK.
- -1, Null parameter detect.
int8_t pana_server_nvm_client_session_load | ( | uint8_t * | nvm_pointer ) |
PANA client session load from NVM API.
- Parameters:
-
nvm_data A pointer to encrypted PANA client session.
- Returns:
- 0, Restore OK.
- -1, Memory allocation fail.
int8_t pana_server_restore_from_nvm | ( | uint8_t * | nvm_data, |
int8_t | interface_id | ||
) |
PANA server base restore from NVM.
- Parameters:
-
nvm_data A pointer to encrypted PANA server base data.
- Returns:
- 0, Restore OK.
- -1, Memory allocation fail.
Generated on Tue Jul 12 2022 12:29:02 by
