Message structure

Asset Tracker Template

tags
Asset Tracker Template

The message structure used by the storage module is defined in storage.h:

struct storage_msg {
    enum storage_msg_type type;           /* Message type */
    enum storage_data_type data_type;     /* Data type for STORAGE_DATA / STORAGE_BATCH_CONSUME */
    union {
        uint8_t buffer[STORAGE_MAX_DATA_SIZE];
        uint32_t session_id;              /* Batch session id */
    };
    uint32_t data_len;                    /* Length or count */
};