NVM#

Functions#

void

Used by the application to execute actions after a set default configuration.

void

Used by the application to execute actions after a application reset.

void

Used by the application to execute actions after a load configuration.

void
zaf_nvm_app_load_configuration_migration(uint32_t current_version, uint32_t saved_version)

Used by the application to execute actions when the current version differs from the saved version.

void

Resets configuration to default values.

void

Resets the NVM file system.

void

Loads the default configuration common for all applications.

bool

Opens file system for ZAF.

bool

Erases application nvm.

ZAF_nvm_erase_object(zpal_nvm_object_key_t key)

Erases an object from application nvm.

ZAF_nvm_read(zpal_nvm_object_key_t key, void *object, size_t object_size)

Reads an object from application nvm.

ZAF_nvm_read_object_part(zpal_nvm_object_key_t key, void *object, size_t offset, size_t size)

Reads part of an object from application nvm.

ZAF_nvm_write(zpal_nvm_object_key_t key, const void *object, size_t object_size)

Writes an object to application nvm.

ZAF_nvm_get_object_size(zpal_nvm_object_key_t key, size_t *len)

Get the object size identified with a given key from NVM.

bool

Opens file system for application.

bool

Erases application nvm.

ZAF_nvm_app_erase_object(zpal_nvm_object_key_t key)

Erases an object from application nvm.

ZAF_nvm_app_read(zpal_nvm_object_key_t key, void *object, size_t object_size)

Reads an object from application nvm.

ZAF_nvm_app_read_object_part(zpal_nvm_object_key_t key, void *object, size_t offset, size_t size)

Reads part of an object from application nvm.

ZAF_nvm_app_write(zpal_nvm_object_key_t key, const void *object, size_t object_size)

Writes an object to application nvm.

ZAF_nvm_app_get_object_size(zpal_nvm_object_key_t key, size_t *len)

Get the object size identified with a given key from NVM.

Function Documentation#

zaf_nvm_app_set_default_configuration#

void zaf_nvm_app_set_default_configuration (void )

Used by the application to execute actions after a set default configuration.

Parameters
N/A

Definition at line 24 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/nvm/zaf_nvm_soc.h

zaf_nvm_app_reset#

void zaf_nvm_app_reset (void )

Used by the application to execute actions after a application reset.

Parameters
N/A

Definition at line 30 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/nvm/zaf_nvm_soc.h

zaf_nvm_app_load_configuration#

void zaf_nvm_app_load_configuration (void )

Used by the application to execute actions after a load configuration.

Parameters
N/A

Definition at line 36 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/nvm/zaf_nvm_soc.h

zaf_nvm_app_load_configuration_migration#

void zaf_nvm_app_load_configuration_migration (uint32_t current_version, uint32_t saved_version)

Used by the application to execute actions when the current version differs from the saved version.

Parameters
N/Acurrent_version

Version returned by zpal_get_app_version

N/Asaved_version

Version stored in ZAF_FILE_ID_APP_VERSION


Definition at line 45 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/nvm/zaf_nvm_soc.h

zafi_nvm_app_set_default_configuration#

void zafi_nvm_app_set_default_configuration (void )

Resets configuration to default values.

Parameters
N/A

Remarks

  • Internal function only

Add application specific functions here to initialize configuration values stored in persistent memory. Will be called at any of the following events:

  • Network Exclusion

  • Network Secure Inclusion (after S2 bootstrapping complete)

  • Device Reset Locally


Definition at line 58 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/nvm/zaf_nvm_soc.h

zafi_nvm_app_reset#

void zafi_nvm_app_reset (void )

Resets the NVM file system.

Parameters
N/A

Remarks

  • Internal function only


Definition at line 66 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/nvm/zaf_nvm_soc.h

zafi_nvm_app_load_configuration#

void zafi_nvm_app_load_configuration (void )

Loads the default configuration common for all applications.

Parameters
N/A

Remarks

  • If no settings are found, the application file system will be erased and default values will be written.

  • Internal function. Don't invoke from application.


Definition at line 77 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/nvm/zaf_nvm_soc.h

ZAF_nvm_init#

bool ZAF_nvm_init (void )

Opens file system for ZAF.

Parameters
N/A

Returns


Definition at line 31 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm.h

ZAF_nvm_erase#

bool ZAF_nvm_erase (void )

Erases application nvm.

Parameters
N/A

(Does nothing on 800s since it has 1 shared nvm for application and protocol.)

Returns

  • true on successful erase


Definition at line 38 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm.h

ZAF_nvm_erase_object#

zpal_status_t ZAF_nvm_erase_object (zpal_nvm_object_key_t key)

Erases an object from application nvm.

Parameters
[in]key

Object key.

Returns

  • status of erase operation


Definition at line 46 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm.h

ZAF_nvm_read#

zpal_status_t ZAF_nvm_read (zpal_nvm_object_key_t key, void * object, size_t object_size)

Reads an object from application nvm.

Parameters
[in]key

Object key.

[out]object

Address of array where object can be written to.

[in]object_size

Size of the stored object.

Returns

  • status of read operation


Definition at line 56 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm.h

ZAF_nvm_read_object_part#

zpal_status_t ZAF_nvm_read_object_part (zpal_nvm_object_key_t key, void * object, size_t offset, size_t size)

Reads part of an object from application nvm.

Parameters
[in]key

Object key.

[out]object

Address of array where part of object can be written to.

[in]offset

The offset in object where part shall be read from.

[in]size

Size of the object part.

Returns

  • status of read operation


Definition at line 67 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm.h

ZAF_nvm_write#

zpal_status_t ZAF_nvm_write (zpal_nvm_object_key_t key, const void * object, size_t object_size)

Writes an object to application nvm.

Parameters
[in]key

Object key.

[out]object

Address of array of object that is written.

[in]object_size

Size of the stored object.

Returns

  • status of write operation


Definition at line 77 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm.h

ZAF_nvm_get_object_size#

zpal_status_t ZAF_nvm_get_object_size (zpal_nvm_object_key_t key, size_t * len)

Get the object size identified with a given key from NVM.

Parameters
[in]key

Object key.

[out]len

Object size.

Returns

  • status of operation


Definition at line 86 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm.h

ZAF_nvm_app_init#

bool ZAF_nvm_app_init (void )

Opens file system for application.

Parameters
N/A

Returns


Definition at line 31 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm_app.h

ZAF_nvm_app_erase#

bool ZAF_nvm_app_erase (void )

Erases application nvm.

Parameters
N/A

(Does nothing on 800s since it has 1 shared nvm for application and protocol.)

Returns

  • true on successful erase


Definition at line 38 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm_app.h

ZAF_nvm_app_erase_object#

zpal_status_t ZAF_nvm_app_erase_object (zpal_nvm_object_key_t key)

Erases an object from application nvm.

Parameters
[in]key

Object key.

Returns

  • status of erase operation


Definition at line 46 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm_app.h

ZAF_nvm_app_read#

zpal_status_t ZAF_nvm_app_read (zpal_nvm_object_key_t key, void * object, size_t object_size)

Reads an object from application nvm.

Parameters
[in]key

Object key.

[out]object

Address of array where object can be written to.

[in]object_size

Size of the stored object.

Returns

  • status of read operation


Definition at line 56 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm_app.h

ZAF_nvm_app_read_object_part#

zpal_status_t ZAF_nvm_app_read_object_part (zpal_nvm_object_key_t key, void * object, size_t offset, size_t size)

Reads part of an object from application nvm.

Parameters
[in]key

Object key.

[out]object

Address of array where part of object can be written to.

[in]offset

The offset in object where part shall be read from.

[in]size

Size of the object part.

Returns

  • status of read operation


Definition at line 67 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm_app.h

ZAF_nvm_app_write#

zpal_status_t ZAF_nvm_app_write (zpal_nvm_object_key_t key, const void * object, size_t object_size)

Writes an object to application nvm.

Parameters
[in]key

Object key.

[out]object

Address of array of object that is written.

[in]object_size

Size of the stored object.

Returns

  • status of write operation


Definition at line 77 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm_app.h

ZAF_nvm_app_get_object_size#

zpal_status_t ZAF_nvm_app_get_object_size (zpal_nvm_object_key_t key, size_t * len)

Get the object size identified with a given key from NVM.

Parameters
[in]key

Object key.

[out]len

Object size.

Returns

  • status of operation


Definition at line 86 of file /mnt/raid/workspaces/ws.H9QSi59DS/overlay/gsdk/protocol/z-wave/ZAF/ApplicationUtilities/ZAF_nvm_app.h