Mayank Gupta / Mbed OS pelion-example-frdm

Dependencies:   FXAS21002 FXOS8700Q

Embed: (wiki syntax)

« Back to documentation index

update-lwm2m-mbed-apis.h File Reference

update-lwm2m-mbed-apis.h File Reference

This file contains forward declarations for all functions used as APIS for the update client. More...

Go to the source code of this file.

Functions

uint32_t ARM_UCS_LWM2M_MONITOR_GetVersion (void)
 Get driver version.
ARM_MONITOR_CAPABILITIES ARM_UCS_LWM2M_MONITOR_GetCapabilities (void)
 Get Source capabilities.
arm_uc_error_t ARM_UCS_LWM2M_MONITOR_Initialize (void(*notification_handler)(void))
 Initialize Monitor.
arm_uc_error_t ARM_UCS_LWM2M_MONITOR_Uninitialize (void)
 Uninitialized Monitor.
arm_uc_error_t ARM_UCS_LWM2M_MONITOR_SendState (arm_uc_monitor_state_t state)
 Send Update Client state.
arm_uc_error_t ARM_UCS_LWM2M_MONITOR_SendUpdateResult (arm_uc_monitor_result_t updateResult)
 Send update result.
arm_uc_error_t ARM_UCS_LWM2M_MONITOR_SendName (arm_uc_buffer_t *name)
 Send current firmware name.
arm_uc_error_t ARM_UCS_LWM2M_MONITOR_SendVersion (uint64_t version)
 Send current firmware version.
arm_uc_error_t ARM_UCS_LWM2M_MONITOR_SetBootloaderHash (arm_uc_buffer_t *hash)
 Set the bootloader hash.
arm_uc_error_t ARM_UCS_LWM2M_MONITOR_SetOEMBootloaderHash (arm_uc_buffer_t *hash)
 Set the OEM bootloader hash.
uint32_t ARM_UCS_LWM2M_SOURCE_GetVersion (void)
 Get driver version.
ARM_SOURCE_CAPABILITIES ARM_UCS_LWM2M_SOURCE_GetCapabilities (void)
 Get Source capabilities.
arm_uc_error_t ARM_UCS_LWM2M_SOURCE_Initialize (ARM_SOURCE_SignalEvent_t cb_event)
 Initialize Source.
arm_uc_error_t ARM_UCS_LWM2M_SOURCE_Uninitialize (void)
 Uninitialized Source.
arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetManifestDefaultCost (uint32_t *cost)
 Cost estimation for retrieving manifest from the default location.
arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetManifestDefault (arm_uc_buffer_t *buffer, uint32_t offset)
 Retrieve manifest from the default location.
arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetManifestURLCost (arm_uc_uri_t *uri, uint32_t *cost)
 Cost estimation for retrieving manifest from URL.
arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetFirmwareURLCost (arm_uc_uri_t *uri, uint32_t *cost)
 Cost estimation for retrieving firmware from URL.
arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetKeytableURLCost (arm_uc_uri_t *uri, uint32_t *cost)
 Cost estimation for retrieving key table from URL.
arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetManifestURL (arm_uc_uri_t *uri, arm_uc_buffer_t *buffer, uint32_t offset)
 Retrieve manifest from URL.
arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetFirmwareFragment (arm_uc_uri_t *uri, arm_uc_buffer_t *buffer, uint32_t offset)
 Retrieve firmware fragment.
arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetKeytableURL (arm_uc_uri_t *uri, arm_uc_buffer_t *buffer)
 Retrieve a key table from a URL.

Detailed Description

This file contains forward declarations for all functions used as APIS for the update client.

Because C++ does not support designated initialisers, this file is used to provide linkage from C++ to C structure initialisers. This pattern is necessary to ensure that the APIs are not brittle and prone to breakage if APIs are added or the API structure is changed.

Definition in file update-lwm2m-mbed-apis.h.


Function Documentation

ARM_MONITOR_CAPABILITIES ARM_UCS_LWM2M_MONITOR_GetCapabilities ( void   )

Get Source capabilities.

Returns:
Struct containing capabilites. See definition above.

Definition at line 37 of file lwm2m-monitor.cpp.

uint32_t ARM_UCS_LWM2M_MONITOR_GetVersion ( void   )

Get driver version.

Returns:
Driver version.

Definition at line 28 of file lwm2m-monitor.cpp.

arm_uc_error_t ARM_UCS_LWM2M_MONITOR_Initialize ( void(*)(void)  notification_handler )

Initialize Monitor.

Returns:
Error code.

Definition at line 51 of file lwm2m-monitor.cpp.

arm_uc_error_t ARM_UCS_LWM2M_MONITOR_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 133 of file lwm2m-monitor.cpp.

arm_uc_error_t ARM_UCS_LWM2M_MONITOR_SendState ( arm_uc_monitor_state_t  an_update_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 in accordance with state and arm_uc_monitor_state_t type.

Returns:
Error code.

Definition at line 83 of file lwm2m-monitor.cpp.

arm_uc_error_t ARM_UCS_LWM2M_MONITOR_SendUpdateResult ( arm_uc_monitor_result_t  an_update_result )

Send update result.

From the OMA LWM2M Technical Specification: Contains the result of downloading or updating the firmware This Resource MAY be reported by sending Observe operation.

Returns:
Error code.

Definition at line 109 of file lwm2m-monitor.cpp.

arm_uc_error_t ARM_UCS_LWM2M_MONITOR_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 151 of file lwm2m-monitor.cpp.

arm_uc_error_t ARM_UCS_LWM2M_MONITOR_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 167 of file lwm2m-monitor.cpp.

arm_uc_error_t ARM_UCS_LWM2M_MONITOR_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 183 of file lwm2m-monitor.cpp.

arm_uc_error_t ARM_UCS_LWM2M_MONITOR_Uninitialize ( void   )

Uninitialized Monitor.

Returns:
Error code.

Definition at line 67 of file lwm2m-monitor.cpp.

ARM_SOURCE_CAPABILITIES ARM_UCS_LWM2M_SOURCE_GetCapabilities ( void   )

Get Source capabilities.

Returns:
Struct containing capabilites. See definition above.

Definition at line 104 of file lwm2m-source.cpp.

arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetFirmwareFragment ( arm_uc_uri_t *  uri,
arm_uc_buffer_t *  buffer,
uint32_t  offset 
)

Retrieve firmware fragment.

Firmware fragment is stored in supplied buffer. Event is generated once fragment is in buffer.

Parameters:
uriURI struct with firmware location.
bufferStruct containing byte array, maximum size, and actual size.
offsetFirmware offset to retrieve fragment from.
Returns:
Error code.

Definition at line 351 of file lwm2m-source.cpp.

arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetFirmwareURLCost ( arm_uc_uri_t *  uri,
uint32_t *  cost 
)

Cost estimation for retrieving firmware from URL.

The estimation can vary over time and should not be cached too long. 0x00000000 - The firmware is already downloaded. 0xFFFFFFFF - Cannot retrieve firmware from this Source.

Parameters:
uriURI struct with firmware location.
costPointer to variable for the return value.
Returns:
Error code.

Definition at line 312 of file lwm2m-source.cpp.

arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetKeytableURL ( arm_uc_uri_t *  uri,
arm_uc_buffer_t *  buffer 
)

Retrieve a key table from a URL.

Key table is stored in supplied buffer. Event is generated once fragment is in buffer.

Parameters:
uriURI struct with keytable location.
bufferStruct containing byte array, maximum size, and actual size.
Returns:
Error code.

Definition at line 714 of file lwm2m-source.cpp.

arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetKeytableURLCost ( arm_uc_uri_t *  uri,
uint32_t *  cost 
)

Cost estimation for retrieving key table from URL.

The estimation can vary over time and should not be cached too long. 0x00000000 - The firmware is already downloaded. 0xFFFFFFFF - Cannot retrieve firmware from this Source.

Parameters:
uriURI struct with keytable location.
costPointer to variable for the return value.
Returns:
Error code.

Definition at line 659 of file lwm2m-source.cpp.

arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetManifestDefault ( arm_uc_buffer_t *  buffer,
uint32_t  offset 
)

Retrieve manifest from the default location.

Manifest is stored in supplied buffer. Event is generated once manifest is in buffer.

Parameters:
bufferStruct containing byte array, maximum size, and actual size.
Returns:
Error code.

Definition at line 221 of file lwm2m-source.cpp.

arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetManifestDefaultCost ( uint32_t *  cost )

Cost estimation for retrieving manifest from the default location.

The estimation can vary over time and should not be cached too long. 0x00000000 - The manifest is already downloaded. 0xFFFFFFFF - Cannot retrieve manifest from this Source.

Parameters:
costPointer to variable for the return value.
Returns:
Error code.

Definition at line 190 of file lwm2m-source.cpp.

arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetManifestURL ( arm_uc_uri_t *  uri,
arm_uc_buffer_t *  buffer,
uint32_t  offset 
)

Retrieve manifest from URL.

Manifest is stored in supplied buffer. Event is generated once manifest is in buffer.

Parameters:
uriURI struct with manifest location.
bufferStruct containing byte array, maximum size, and actual size.
Returns:
Error code.

Definition at line 689 of file lwm2m-source.cpp.

arm_uc_error_t ARM_UCS_LWM2M_SOURCE_GetManifestURLCost ( arm_uc_uri_t *  uri,
uint32_t *  cost 
)

Cost estimation for retrieving manifest from URL.

The estimation can vary over time and should not be cached too long. 0x00000000 - The manifest is already downloaded. 0xFFFFFFFF - Cannot retrieve manifest from this Source.

Parameters:
uriURI struct with manifest location.
costPointer to variable for the return value.
Returns:
Error code.

Definition at line 629 of file lwm2m-source.cpp.

uint32_t ARM_UCS_LWM2M_SOURCE_GetVersion ( void   )

Get driver version.

Returns:
Driver version.

Definition at line 95 of file lwm2m-source.cpp.

arm_uc_error_t ARM_UCS_LWM2M_SOURCE_Initialize ( ARM_SOURCE_SignalEvent_t  cb_event )

Initialize Source.

Function pointer to event handler is passed as argument.

Parameters:
cb_eventFunction pointer to event handler. See events above.
Returns:
Error code.

Definition at line 136 of file lwm2m-source.cpp.

arm_uc_error_t ARM_UCS_LWM2M_SOURCE_Uninitialize ( void   )

Uninitialized Source.

Returns:
Error code.

Definition at line 172 of file lwm2m-source.cpp.