Simple interface for Mbed Cloud Client

Dependents:  

Embed: (wiki syntax)

« Back to documentation index

_ARM_UPDATE_MONITOR Struct Reference

_ARM_UPDATE_MONITOR Struct Reference

Structure definition holding API function pointers. More...

#include <arm_uc_monitor.h>

Data Fields

uint32_t(* GetVersion )(void)
 Get driver version.
ARM_MONITOR_CAPABILITIES(* GetCapabilities )(void)
 Get Source capabilities.
arm_uc_error_t(* Initialize )(void(*notification_handler)(void))
 Initialize Monitor.
arm_uc_error_t(* Uninitialize )(void)
 Uninitialized Monitor.
arm_uc_error_t(* SendState )(arm_uc_monitor_state_t state)
 Send Update Client state.
arm_uc_error_t(* SendUpdateResult )(arm_uc_monitor_result_t updateResult)
 Send update result.
arm_uc_error_t(* SendName )(arm_uc_buffer_t *name)
 Send current firmware name.
arm_uc_error_t(* SendVersion )(uint64_t version)
 Send current firmware version.
arm_uc_error_t(* SetBootloaderHash )(arm_uc_buffer_t *hash)
 Set the bootloader hash.
arm_uc_error_t(* SetOEMBootloaderHash )(arm_uc_buffer_t *hash)
 Set the OEM bootloader hash.

Detailed Description

Structure definition holding API function pointers.

Definition at line 69 of file arm_uc_monitor.h.


Field Documentation

Get Source capabilities.

Returns:
Struct containing capabilites. See definition above.

Definition at line 81 of file arm_uc_monitor.h.

uint32_t(* GetVersion)(void)

Get driver version.

Returns:
Driver version.

Definition at line 75 of file arm_uc_monitor.h.

arm_uc_error_t(* Initialize)(void(*notification_handler)(void))

Initialize Monitor.

Returns:
Error code.

Definition at line 87 of file arm_uc_monitor.h.

arm_uc_error_t(* SendName)(arm_uc_buffer_t *name)

Send current firmware name.

The firmware name is the SHA256 hash.

Parameters:
namePointer to buffer struct. Hash is stored as byte array.
Returns:
Error code.

Definition at line 170 of file arm_uc_monitor.h.

arm_uc_error_t(* SendState)(arm_uc_monitor_state_t state)

Send Update Client state.

From the OMA LWM2M Technical Specification:

Indicates current state with respect to this firmware update. This value is set by the LWM2M Client. 0: Idle (before downloading or after successful updating) 1: Downloading (The data sequence is on the way) 2: Downloaded 3: Updating

If writing the firmware package to Package Resource is done, or, if the device has downloaded the firmware package from the Package URI the state changes to Downloaded.

If writing an empty string to Package Resource is done or writing an empty string to Package URI is done, the state changes to Idle.

When in Downloaded state, and the executable Resource Update is triggered, the state changes to Updating. If the Update Resource failed, the state returns at Downloaded. If performing the Update Resource was successful, the state changes from Updating to Idle.

Parameters:
stateValid states: ARM_UC_MONITOR_STATE_IDLE ARM_UC_MONITOR_STATE_DOWNLOADING ARM_UC_MONITOR_STATE_DOWNLOADED ARM_UC_MONITOR_STATE_UPDATING
Returns:
Error code.

Definition at line 127 of file arm_uc_monitor.h.

arm_uc_error_t(* SendUpdateResult)(arm_uc_monitor_result_t updateResult)

Send update result.

From the OMA LWM2M Technical Specification:

Contains the result of downloading or updating the firmware 0: Initial value. Once the updating process is initiated (Download /Update), this Resource MUST be reset to Initial value. 1: Firmware updated successfully, 2: Not enough storage for the new firmware package. 3. Out of memory during downloading process. 4: Connection lost during downloading process. 5: CRC check failure for new downloaded package. 6: Unsupported package type. 7: Invalid URI 8: Firmware update failed

This Resource MAY be reported by sending Observe operation.

Parameters:
resultValid results: ARM_UC_MONITOR_RESULT_INITIAL ARM_UC_MONITOR_RESULT_SUCCESS ARM_UC_MONITOR_RESULT_ERROR_STORAGE ARM_UC_MONITOR_RESULT_ERROR_MEMORY ARM_UC_MONITOR_RESULT_ERROR_CONNECTION ARM_UC_MONITOR_RESULT_ERROR_CRC ARM_UC_MONITOR_RESULT_ERROR_TYPE ARM_UC_MONITOR_RESULT_ERROR_URI ARM_UC_MONITOR_RESULT_ERROR_UPDATE ARM_UC_MONITOR_RESULT_ERROR_HASH
Returns:
Error code.

Definition at line 161 of file arm_uc_monitor.h.

arm_uc_error_t(* SendVersion)(uint64_t version)

Send current firmware version.

The firmware version is the timestamp from the manifest that authorized the firmware.

Parameters:
versionTimestamp, 64 bit unsigned integer.
Returns:
Error code.

Definition at line 180 of file arm_uc_monitor.h.

arm_uc_error_t(* SetBootloaderHash)(arm_uc_buffer_t *hash)

Set the bootloader hash.

The bootloader hash is a hash of the bootloader. This is used for tracking the version of the bootloader used.

Parameters:
namePointer to buffer struct. Hash is stored as byte array.
Returns:
Error code.

Definition at line 190 of file arm_uc_monitor.h.

arm_uc_error_t(* SetOEMBootloaderHash)(arm_uc_buffer_t *hash)

Set the OEM bootloader hash.

If the end-user has modified the bootloader the hash of the modified bootloader can be set here.

Parameters:
namePointer to buffer struct. Hash is stored as byte array.
Returns:
Error code.

Definition at line 200 of file arm_uc_monitor.h.

arm_uc_error_t(* Uninitialize)(void)

Uninitialized Monitor.

Returns:
Error code.

Definition at line 93 of file arm_uc_monitor.h.