Z-Wave Protocol Controller Reference

Functions to access storage in a Z-Wave module. More...

Collaboration diagram for Memory API:

Classes

struct  _NVR_FLASH_STRUCT_
 

Macros

#define NVR_SAW_CENTER_FREQ_SIZE   0x03
 
#define NVR_NVM_SIZE_SIZE   0x02
 
#define NVR_NVM_PAGE_SIZE_SIZE   0x02
 
#define NVR_UUID_SIZE   0x10
 
#define NVR_USBID_SIZE   0x02
 
#define NVR_SECURITY_PUBLIC_KEY_SIZE   0x20
 
#define NVR_SECURITY_PRIVATE_KEY_SIZE   0x20
 
#define NVR_CRC16_SIZE   0x02
 

Typedefs

typedef struct _NVR_FLASH_STRUCT_ NVR_FLASH_STRUCT
 

Functions

sl_status_t zwapi_nvr_get_value (uint8_t bOffset, uint8_t bLength, uint8_t *bRetBuffer)
 Get a value from the NVR flash page. More...
 
sl_status_t zwapi_memory_get_ids (zwave_home_id_t *home_id, zwave_node_id_t *node_id)
 Get the Home ID and Node ID of the Z-Wave module. More...
 
sl_status_t zwapi_memory_get_byte (uint16_t offset, uint8_t *byte_value)
 Read one byte from the EEPROM. More...
 
uint8_t zwapi_memory_put_byte (uint16_t offset, uint8_t bData)
 Add one byte to the EEPROM write queue. More...
 
sl_status_t zwapi_memory_get_buffer (uint16_t offset, uint8_t *buffer, uint8_t length)
 Read the number of bytes from the EEPROM. More...
 
uint8_t zwapi_memory_put_buffer (uint16_t offset, const uint8_t *buffer, uint16_t length, void(*callback_function)(void))
 Copy the number of bytes to the EEPROM. More...
 
uint8_t zwapi_memory_put_buffer_blocking (uint16_t offset, uint8_t *buffer, uint16_t length, uint16_t timeout)
 Copy the number of bytes to the EEPROM and waits for Z-Wave module callback before returning. More...
 

Detailed Description

Functions to access storage in a Z-Wave module.

Functions in this module are used to access storage in Z-Wave module.

Macro Definition Documentation

◆ NVR_CRC16_SIZE

#define NVR_CRC16_SIZE   0x02

◆ NVR_NVM_PAGE_SIZE_SIZE

#define NVR_NVM_PAGE_SIZE_SIZE   0x02

◆ NVR_NVM_SIZE_SIZE

#define NVR_NVM_SIZE_SIZE   0x02

◆ NVR_SAW_CENTER_FREQ_SIZE

#define NVR_SAW_CENTER_FREQ_SIZE   0x03

◆ NVR_SECURITY_PRIVATE_KEY_SIZE

#define NVR_SECURITY_PRIVATE_KEY_SIZE   0x20

◆ NVR_SECURITY_PUBLIC_KEY_SIZE

#define NVR_SECURITY_PUBLIC_KEY_SIZE   0x20

◆ NVR_USBID_SIZE

#define NVR_USBID_SIZE   0x02

◆ NVR_UUID_SIZE

#define NVR_UUID_SIZE   0x10

Typedef Documentation

◆ NVR_FLASH_STRUCT

Function Documentation

◆ zwapi_memory_get_buffer()

sl_status_t zwapi_memory_get_buffer ( uint16_t  offset,
uint8_t *  buffer,
uint8_t  length 
)

Read the number of bytes from the EEPROM.

Parameters
offsetApplication area offset
bufferBuffer pointer
lengthNumber of bytes to read
Returns
SL_STATUS_OK on success and SL_STATUS_FAIL if something went wrong

aka MemoryGetBuffer

Here is the call graph for this function:

◆ zwapi_memory_get_byte()

sl_status_t zwapi_memory_get_byte ( uint16_t  offset,
uint8_t *  byte_value 
)

Read one byte from the EEPROM.

Parameters
offsetApplication area offset
byte_valuepointer for the function to store the read byte
Returns
SL_STATUS_OK on success and SL_STATUS_FAIL if something went wrong

aka MemoryGetByte

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwapi_memory_get_ids()

sl_status_t zwapi_memory_get_ids ( zwave_home_id_t home_id,
zwave_node_id_t node_id 
)

Get the Home ID and Node ID of the Z-Wave module.

Parameters
home_idHome ID pointer (stored in host endianness)
node_idNode ID pointer
Returns
SL_STATUS_OK on success and SL_STATUS_FAIL if something went wrong

aka MemoryGetID

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwapi_memory_put_buffer()

uint8_t zwapi_memory_put_buffer ( uint16_t  offset,
const uint8_t *  buffer,
uint16_t  length,
void(*)(void)  callback_function 
)

Copy the number of bytes to the EEPROM.

Parameters
offsetApplication area offset
bufferBuffer pointer. NULL pointer can be passed to zero out an area
lengthNumber of bytes to write
callback_functionWrite completed function pointer
Returns
0 on error, 1 on OK but no change, >=2 represents the number of bytes written +1

aka MemoryPutBuffer

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwapi_memory_put_buffer_blocking()

uint8_t zwapi_memory_put_buffer_blocking ( uint16_t  offset,
uint8_t *  buffer,
uint16_t  length,
uint16_t  timeout 
)

Copy the number of bytes to the EEPROM and waits for Z-Wave module callback before returning.

Parameters
offsetApplication area offset
bufferBuffer pointer. NULL pointer can be passed to zero out an area
lengthNumber of bytes to write
timeoutTime in ms to wait for the Z-Wave Module callback.
Returns
0 on error, 1 on OK but no change, >=2 represents the number of bytes written +1
Here is the call graph for this function:

◆ zwapi_memory_put_byte()

uint8_t zwapi_memory_put_byte ( uint16_t  offset,
uint8_t  bData 
)

Add one byte to the EEPROM write queue.

Parameters
offsetApplication area offset
bDataData to store
Returns
0 on error, 1 on OK but no change, 2 Ok with changes

aka MemoryPutByte

Here is the call graph for this function:
Here is the caller graph for this function:

◆ zwapi_nvr_get_value()

sl_status_t zwapi_nvr_get_value ( uint8_t  bOffset,
uint8_t  bLength,
uint8_t *  bRetBuffer 
)

Get a value from the NVR flash page.

Parameters
bOffsetOffset 0 is the first byte in the protocol NVR area.
bLengthNumber of bytes to read
bRetBufferPointer to buffer to receive value
Returns
SL_STATUS_OK on success and SL_STATUS_FAIL if something went wrong

If the CRC16 field in the protocol area of the NVR is not correct all fields will return the value 0xFF when read with this function.

aka ZW_NVRGetValue

Here is the call graph for this function:
Here is the caller graph for this function: