Go to the source code of this file.
|
| void | img_mgmt_client_init (struct img_mgmt_client *client, struct smp_client_object *smp_client, int image_list_size, struct mcumgr_image_data *image_list) |
| | Inilialize image group client.
|
| |
| int | img_mgmt_client_upload_init (struct img_mgmt_client *client, size_t image_size, uint32_t image_num, const char *image_hash) |
| | Initialize image upload.
|
| |
| int | img_mgmt_client_upload (struct img_mgmt_client *client, const uint8_t *data, size_t length, struct mcumgr_image_upload *res_buf) |
| | Upload part of image.
|
| |
| int | img_mgmt_client_state_write (struct img_mgmt_client *client, char *hash, bool confirm, struct mcumgr_image_state *res_buf) |
| | Write image state.
|
| |
| int | img_mgmt_client_state_read (struct img_mgmt_client *client, struct mcumgr_image_state *res_buf) |
| | Read image state.
|
| |
| int | img_mgmt_client_erase (struct img_mgmt_client *client, uint32_t slot) |
| | Erase selected Image Slot.
|
| |
◆ img_mgmt_client_erase()
Erase selected Image Slot.
- Parameters
-
| client | IMG mgmt client object |
| slot | Slot number |
- Returns
- 0 on success.
-
mcumgr_err_t code on failure.
◆ img_mgmt_client_init()
Inilialize image group client.
Function initializes image group client for given SMP client using supplied image data.
- Parameters
-
| client | IMG mgmt client object |
| smp_client | SMP client object |
| image_list_size | Length of image_list buffer. |
| image_list | Image list buffer pointer. |
◆ img_mgmt_client_state_read()
Read image state.
- Parameters
-
| client | IMG mgmt client object |
| res_buf | Pointer for command response structure. |
- Returns
- 0 on success.
-
mcumgr_err_t code on failure.
◆ img_mgmt_client_state_write()
Write image state.
- Parameters
-
| client | IMG mgmt client object |
| hash | Pointer to Hash (Needed for test). |
| confirm | Set false for test and true for confirmation. |
| res_buf | Pointer for command response structure. |
- Returns
- 0 on success.
-
mcumgr_err_t code on failure.
◆ img_mgmt_client_upload()
Upload part of image.
- Parameters
-
| client | IMG mgmt client object |
| data | Pointer to data. |
| length | Length of data |
| res_buf | Pointer for command response structure. |
- Returns
- 0 on success.
-
mcumgr_err_t code on failure.
◆ img_mgmt_client_upload_init()
Initialize image upload.
- Parameters
-
| client | IMG mgmt client object |
| image_size | Size of image in bytes. |
| image_num | Image slot Num. |
| image_hash | Pointer to HASH for image must be SHA256 hash of entire upload if present (32 bytes). Use NULL when HASH from image is not available. |
- Returns
- 0 on success.
-
mcumgr_err_t code on failure.