NCP firmware list cache#
NCP firmware list cache.
These commands can be used to manipulate the Firmware List cache.
This class is only intended for testing and development purposes with an NCP target. The Distributor SoC example application contains a proper implementation of the Firmware List.
The elem_index parameter in all of the commands and events is the element index of the Distribution Server. This class handles firmware deletion automatically as a response to sl_btmesh_evt_fw_dist_server_fw_delete_req and sl_btmesh_evt_fw_dist_server_fw_delete_all_req. Thus, the sl_btmesh_fw_dist_server_delete_rsp and sl_btmesh_fw_dist_server_delete_all_rsp should not be called explicitly. This class handles adding firmware images automatically as a response to sl_btmesh_evt_fw_dist_server_upload_complete. Thus, when an upload completes, sl_btmesh_ncp_fw_list_add_fw does not need to be called.
Modules#
sl_btmesh_evt_ncp_fw_list_fw_deleted
sl_btmesh_evt_ncp_fw_list_fw_all_deleted
sl_btmesh_evt_ncp_fw_list_fw_added
Functions#
Macros#
Function Documentation#
sl_btmesh_ncp_fw_list_init#
sl_status_t sl_btmesh_ncp_fw_list_init (uint16_t elem_index)
[in] | elem_index | Distribution Server model element index |
Initializes the Firmware List. Before initializing the Firmware List, the Distribution Server model must have been initialized.
Returns
SL_STATUS_OK if successful. Error code otherwise.
20351
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_ncp_fw_list_deinit#
sl_status_t sl_btmesh_ncp_fw_list_deinit (uint16_t elem_index)
[in] | elem_index | Distribution Server model element index |
Deinitializes the Firmware List.
Returns
SL_STATUS_OK if successful. Error code otherwise.
20362
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_ncp_fw_list_get_fw_info_by_index#
sl_status_t sl_btmesh_ncp_fw_list_get_fw_info_by_index (uint16_t elem_index, uint16_t index, uint32_t * size, sl_bt_uuid_64_t * blob_id, size_t max_fwid_size, size_t * fwid_len, uint8_t * fwid)
[in] | elem_index | Server model element index |
[in] | index | Firmware list index to check |
[out] | size | Firmware image size |
[out] | blob_id | BLOB ID that will be used to transmit the image |
[in] | max_fwid_size | Size of output buffer passed in |
[out] | fwid_len | On return, set to the length of output data written to |
[out] | fwid | Firmware ID of the image |
Retrieve information about a stored firmware in the Firmware List.
Returns
SL_STATUS_OK if successful. Error code otherwise.
20380
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_ncp_fw_list_get_fw_metadata_by_index#
sl_status_t sl_btmesh_ncp_fw_list_get_fw_metadata_by_index (uint16_t elem_index, uint16_t index, size_t max_metadata_size, size_t * metadata_len, uint8_t * metadata)
[in] | elem_index | Server model element index |
[in] | index | Firmware list index to check |
[in] | max_metadata_size | Size of output buffer passed in |
[out] | metadata_len | On return, set to the length of output data written to |
[out] | metadata | Metadata of firmware image |
Retrieve information about a stored firmware metadata in the Firmware List.
Returns
SL_STATUS_OK if successful. Error code otherwise.
20402
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_ncp_fw_list_add_fw#
sl_status_t sl_btmesh_ncp_fw_list_add_fw (uint16_t elem_index, uint32_t size, sl_bt_uuid_64_t blob_id, size_t fwid_len, const uint8_t * fwid, uint16_t * fw_list_index)
[in] | elem_index | Server model element index |
[in] | size | Size of the image |
[in] | blob_id | BLOB ID that will be used to transmit the image |
[in] | fwid_len | Length of data in |
[in] | fwid | Firmware ID of the image |
[out] | fw_list_index | Firmware List Index that was assigned to the image |
Add a firmware image to the Firmware List. This command is used to inform the stack that a image already exists on the local device. For example, it may have been stored via Upload previously, and the device has been reset.
Returns
SL_STATUS_OK if successful. Error code otherwise.
20424
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_ncp_fw_list_set_fw_metadata#
sl_status_t sl_btmesh_ncp_fw_list_set_fw_metadata (uint16_t elem_index, uint16_t fw_list_index, size_t metadata_len, const uint8_t * metadata)
[in] | elem_index | Server model element index |
[in] | fw_list_index | Firmware List Index for which to set the metadata |
[in] | metadata_len | Length of data in |
[in] | metadata | Metadata of the image. May be zero-length. |
Set the metadata of a image in the Firmware List. This command is used to set the metadata for images added with the add_fw command. NOTE: this should not be used to modify the metadata of images received via Upload!
Returns
SL_STATUS_OK if successful. Error code otherwise.
20445
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
Macro Definition Documentation#
sl_btmesh_cmd_ncp_fw_list_init_id#
#define sl_btmesh_cmd_ncp_fw_list_init_idValue:
0x00610028
20257
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_ncp_fw_list_deinit_id#
#define sl_btmesh_cmd_ncp_fw_list_deinit_idValue:
0x01610028
20258
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_ncp_fw_list_get_fw_info_by_index_id#
#define sl_btmesh_cmd_ncp_fw_list_get_fw_info_by_index_idValue:
0x02610028
20259
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_ncp_fw_list_get_fw_metadata_by_index_id#
#define sl_btmesh_cmd_ncp_fw_list_get_fw_metadata_by_index_idValue:
0x03610028
20260
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_ncp_fw_list_add_fw_id#
#define sl_btmesh_cmd_ncp_fw_list_add_fw_idValue:
0x04610028
20261
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_cmd_ncp_fw_list_set_fw_metadata_id#
#define sl_btmesh_cmd_ncp_fw_list_set_fw_metadata_idValue:
0x05610028
20262
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_ncp_fw_list_init_id#
#define sl_btmesh_rsp_ncp_fw_list_init_idValue:
0x00610028
20263
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_ncp_fw_list_deinit_id#
#define sl_btmesh_rsp_ncp_fw_list_deinit_idValue:
0x01610028
20264
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_ncp_fw_list_get_fw_info_by_index_id#
#define sl_btmesh_rsp_ncp_fw_list_get_fw_info_by_index_idValue:
0x02610028
20265
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_ncp_fw_list_get_fw_metadata_by_index_id#
#define sl_btmesh_rsp_ncp_fw_list_get_fw_metadata_by_index_idValue:
0x03610028
20266
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_ncp_fw_list_add_fw_id#
#define sl_btmesh_rsp_ncp_fw_list_add_fw_idValue:
0x04610028
20267
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h
sl_btmesh_rsp_ncp_fw_list_set_fw_metadata_id#
#define sl_btmesh_rsp_ncp_fw_list_set_fw_metadata_idValue:
0x05610028
20268
of file /mnt/raid/workspaces/ws.cynwT2I6w/overlay/gsdk/protocol/bluetooth/build/native/mesh_app/inc/sl_btmesh_api.h