Struct anjay_fw_update_initial_state_t
Defined in File fw_update.h
Struct Documentation
-
struct anjay_fw_update_initial_state_t
Information about the state to initialize the Firmware Update object in.
Public Members
-
anjay_fw_update_initial_result_t result
Controls initialization of the State and Update Result resources. It is intended to be used after a reboot caused by a firmware update attempt, to report the update result.
-
const char *persisted_uri
Value to initialize the Package URI resource with. The passed string is copied, so the pointer is allowed to become invalid after return from anjay_fw_update_install .
Required when
result == ANJAY_FW_UPDATE_INITIAL_DOWNLOADING; if it is not provided (NULL) in such case, anjay_fw_update_reset_t handler will be called from anjay_fw_update_install to reset the Firmware Update object into the Idle state.Optional when
result == ANJAY_FW_UPDATE_INITIAL_DOWNLOADED; in this case it signals that the firmware was downloaded using the Pull mechanism.In all other cases it is ignored.
-
size_t resume_offset
Number of bytes that has been already successfully downloaded and are available at the time of calling anjay_fw_update_install .
It is ignored unless
result == ANJAY_FW_UPDATE_INITIAL_DOWNLOADING, in which case the following call to anjay_fw_update_stream_write_t shall append the passed chunk of data at the offset set here. If resumption from the set offset is impossible, the library will call anjay_fw_update_reset_t and anjay_fw_update_stream_open_t to restart the download process.
-
const struct anjay_etag *resume_etag
ETag of the download process to resume. The passed value is copied, so the pointer is allowed to become invalid after return from anjay_fw_update_install .
Required when
result == ANJAY_FW_UPDATE_INITIAL_DOWNLOADINGandresume_offset > 0; if it is not provided (NULL) in such case, anjay_fw_update_reset_t handler will be called from anjay_fw_update_install to reset the Firmware Update object into the Idle state.
-
bool prefer_same_socket_downloads
Informs the module to try reusing sockets of existing LwM2M Servers to download the firmware image if the download URI matches any of the LwM2M Servers.
-
bool use_lwm2m_send
Enables using LwM2M Send to report State, Update Result and Firmware Version to the LwM2M Server (if LwM2M Send is enabled) during firmware update.
-
anjay_fw_update_severity_t persisted_severity
Value to initialize the Severity resource with.
-
avs_time_real_t persisted_last_state_change_time
Value to initialize the Last State Change Time resource with.
-
avs_time_real_t persisted_update_deadline
Update deadline based on Maximum Defer Period resource value and time of executing Update resource.
-
anjay_fw_update_initial_result_t result