joey shelton / LED_Demo

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by Maxim nexpaq

Embed: (wiki syntax)

« Back to documentation index

net_nvm_api.h File Reference

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.

Client NVM API

nw_nvm.c use already this API and the application can just use net_nvm_api.h.

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:
PANA_SERVER_MATERIAL_UPDATE 

PANA server security material update.

PANA_SERVER_CLIENT_SESSION_UPDATE 

PANA client session update.

PANA_SERVER_CLIENT_SESSION_SEQ_UPDATE 

PANA client session sequence number update.

PANA_SERVER_CLIENT_SESSION_REMOVE_UPDATE 

PANA client session remove.

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_bufferA 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_bufferA pointer to data with encrypted PANA session 70 bytes.
session_addressA 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_bufferA 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_fptrA function pointer to NVM update process.
nvm_static_bufferA 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_fptrA function pointer to NVM update process.
nvm_static_bufferA 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_dataA 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_dataA pointer to encrypted PANA server base data.
Returns:
0, Restore OK.
-1, Memory allocation fail.