DMS data types. More...
Data Structures | |
struct | zos_dms_file_t |
DMS Cloud File System File. More... | |
struct | zos_dms_list_parameters_t |
DMS File listing parameters. More... | |
Typedefs | |
typedef void * | zos_dms_handle_t |
DMS file handle. | |
typedef void( | zos_dms_telemetry_callback_t) (msgpack_context_t *msgpack_context) |
Callback to be invoked before device posts telemetry to DMS. More... | |
typedef zos_result_t(* | zos_dms_message_callback_t) (msgpack_object_t *root_object, void *data_ptr) |
Callback to be invoked when device receives message from DMS. More... | |
Enumerations | |
enum | zos_update_result_t { ZOS_UPDATE_RESULT_NONE = 0, ZOS_UPDATE_RESULT_SUCCESS = 1, ZOS_UPDATE_RESULT_NO_CHANGE = 2, ZOS_UPDATE_RESULT_FAILURE = 3, ZOS_UPDATE_RESULT_NO_CREDENTIALS = 4, ZOS_UPDATE_RESULT_NETWORK_ERROR = 5, ZOS_UPDATE_RESULT_SERVER_ERROR = 6, ZOS_UPDATE_RESULT_UNAUTHORIZED = 7, ZOS_UPDATE_RESULT_BAD_REQUEST = 8, ZOS_UPDATE_RESULT_NOT_FOUND = 9 } |
DMS update result codes. More... | |
enum | zos_dms_target_t { ZOS_DMS_DEVICE = 1, ZOS_DMS_PRODUCT = 2, ZOS_DMS_INVALID = 0xff } |
Target of DMS operation. More... | |
Detailed Description
DMS data types.
Typedef Documentation
typedef zos_result_t(* zos_dms_message_callback_t) (msgpack_object_t *root_object, void *data_ptr) |
Callback to be invoked when device receives message from DMS.
This callback is registered by zn_dms_set_message_callback()
When this callback executes, the supplied root_object
parameter contains the parsed MsgPack message received from the DMS. Use the MessagePack APIs to access the contents of the object.
The data_ptr
parameter points to the allocated message buffer.
If the callback returns ZOS_PENDING the allocated buffer is NOT de-allocated. It's the responsiblity of the callback to de-allocate the buffer.
If any other zos_result_t is returned the message buffer is automatically de-allocated.
If the message buffer is de-allocated, any strings or binary strings the root_object
parameter referenced will no longer be valid.
- Note
- The
root_object
is always de-allocated upon returning from this callback.
- Parameters
-
root_object
Parsed MsgPack message received from DMS data_ptr
Pointer to allocated message buffer
- Returns
- ZOS_PENDING to NOT de-allocate buffer, any other zos_result_t automatically de-allocates buffer.
typedef void( zos_dms_telemetry_callback_t) (msgpack_context_t *msgpack_context) |
Callback to be invoked before device posts telemetry to DMS.
This callback is registered by zn_dms_set_telemetry_callback()
When this callback executes, the supplied msgpack_context
argument should be populated with custom information using the MessagePack APIs.
When the callback returns, the telemetry information will be posted to the DMS.
Up to ~4KBytes of information may be posted to the DMS.
- Note
- If standard ZentriOS telemetry variables are cleared then the provided msgpack data is directly posted. If one or more of the telemetry variables are set the the provided msgpack data is placed in a sub-directory with the key
user
.
- Parameters
-
msgpack_context
Msgpack context to populate, see msgpack_context_t
Enumeration Type Documentation
enum zos_dms_target_t |
enum zos_update_result_t |
DMS update result codes.
This is the result of a previous update (aka OTA) attempt. These codes are returned by zn_dms_get_update_result()
- Note
- The code is reset after a power-cycle or another update attempt
Refer to the variable documentation for more information: dms.ota_result