Virgil IoT KIT
|
Provision interface structures. More...
Go to the source code of this file.
Data Structures | |
struct | vs_sign_t |
Signature type. More... | |
struct | vs_pubkey_t |
Public key type. More... | |
struct | vs_pubkey_dated_t |
Public key with date information. More... | |
struct | vs_file_version_t |
File version information. More... | |
struct | vs_file_info_t |
File information. More... | |
struct | vs_provision_tl_find_ctx_t |
Find context. More... | |
struct | vs_provision_events_t |
Container of pointers to callback functions for Provision Events. More... | |
Macros | |
#define | HTONL_IN_COMPILE_TIME(val) |
#define | HTONS_IN_COMPILE_TIME(val) (uint16_t)(((uint16_t)val & 0xFF) << 8 | ((uint16_t)val & 0xFF00) >> 8) |
#define | VS_START_EPOCH (1420070400) |
The start time point for UNIX time format. More... | |
#define | VS_DEVICE_SERIAL_SIZE (32) |
Device serial ID size. More... | |
#define | VS_DEVICE_MANUFACTURE_ID_SIZE (16) |
Manufacture ID size. More... | |
#define | VS_DEVICE_TYPE_SIZE (4) |
Device type size. More... | |
Typedefs | |
typedef uint8_t | vs_device_manufacture_id_t[VS_DEVICE_MANUFACTURE_ID_SIZE] |
Manufacture ID type. More... | |
typedef uint8_t | vs_device_type_t[VS_DEVICE_TYPE_SIZE] |
Device type. More... | |
typedef uint8_t | vs_device_serial_t[VS_DEVICE_SERIAL_SIZE] |
Device serial number type. More... | |
typedef void(* | vs_file_ver_info_cb_t) (vs_file_version_t ver) |
Callback function to inform system about current version of file. More... | |
Enumerations | |
enum | vs_prvs_t { VS_PRVS_SERVICE_ID = HTONL_IN_COMPILE_TIME('PRVS') } |
PRVS SNAP service code. More... | |
enum | vs_snap_prvs_element_e { VS_PRVS_DNID = HTONL_IN_COMPILE_TIME('DNID'), VS_PRVS_SGNP = HTONL_IN_COMPILE_TIME('SGNP'), VS_PRVS_PBR1 = HTONL_IN_COMPILE_TIME('PBR1'), VS_PRVS_PBR2 = HTONL_IN_COMPILE_TIME('PBR2'), VS_PRVS_PBA1 = HTONL_IN_COMPILE_TIME('PBA1'), VS_PRVS_PBA2 = HTONL_IN_COMPILE_TIME('PBA2'), VS_PRVS_PBT1 = HTONL_IN_COMPILE_TIME('PBT1'), VS_PRVS_PBT2 = HTONL_IN_COMPILE_TIME('PBT2'), VS_PRVS_PBF1 = HTONL_IN_COMPILE_TIME('PBF1'), VS_PRVS_PBF2 = HTONL_IN_COMPILE_TIME('PBF2'), VS_PRVS_TLH = HTONL_IN_COMPILE_TIME('_TLH'), VS_PRVS_TLC = HTONL_IN_COMPILE_TIME('_TLC'), VS_PRVS_TLF = HTONL_IN_COMPILE_TIME('_TLF'), VS_PRVS_DEVI = HTONL_IN_COMPILE_TIME('DEVI'), VS_PRVS_ASAV = HTONL_IN_COMPILE_TIME('ASAV'), VS_PRVS_ASGN = HTONL_IN_COMPILE_TIME('ASGN') } |
Provision operations. More... | |
enum | vs_provision_element_id_e { VS_PROVISION_SGNP = VS_PRVS_SGNP, VS_PROVISION_PBR1 = VS_PRVS_PBR1, VS_PROVISION_PBR2 = VS_PRVS_PBR2, VS_PROVISION_PBA1 = VS_PRVS_PBA1, VS_PROVISION_PBA2 = VS_PRVS_PBA2, VS_PROVISION_PBT1 = VS_PRVS_PBT1, VS_PROVISION_PBT2 = VS_PRVS_PBT2, VS_PROVISION_PBF1 = VS_PRVS_PBF1, VS_PROVISION_PBF2 = VS_PRVS_PBF2 } |
Element ID. More... | |
enum | vs_key_type_e { VS_KEY_RECOVERY = 0, VS_KEY_AUTH, VS_KEY_TRUSTLIST, VS_KEY_FIRMWARE, VS_KEY_FACTORY, VS_KEY_IOT_DEVICE, VS_KEY_USER_DEVICE, VS_KEY_FIRMWARE_INTERNAL, VS_KEY_AUTH_INTERNAL, VS_KEY_CLOUD, VS_KEY_UNSUPPORTED } |
Key type. More... | |
Provision interface structures.
See Provision Usage for Provision module initialization and call.
Device has 3 identifiers that are used by Cloud and Update interfaces : manufacture ID, device type and device serial number, vs_device_manufacture_id_t, vs_device_type_t and vs_device_serial_t respectively. They must be initialized before any Virgil IoT calls.
Manufacture ID initialization example provided below :
You can use function like this for device type filling and device serial number.
#define HTONL_IN_COMPILE_TIME | ( | val | ) |
#define HTONS_IN_COMPILE_TIME | ( | val | ) | (uint16_t)(((uint16_t)val & 0xFF) << 8 | ((uint16_t)val & 0xFF00) >> 8) |
#define VS_DEVICE_MANUFACTURE_ID_SIZE (16) |
Manufacture ID size.
#define VS_DEVICE_SERIAL_SIZE (32) |
Device serial ID size.
#define VS_DEVICE_TYPE_SIZE (4) |
Device type size.
#define VS_START_EPOCH (1420070400) |
The start time point for UNIX time format.
Timestamps are stored as seconds since January 1, 2015 UTC. This is constant for UNIX time conversions
typedef uint8_t vs_device_manufacture_id_t[VS_DEVICE_MANUFACTURE_ID_SIZE] |
Manufacture ID type.
Manufacture identifier containing ASCII symbols and trailing zeroes.
typedef uint8_t vs_device_serial_t[VS_DEVICE_SERIAL_SIZE] |
Device serial number type.
Device serial number identifier contains ASCII symbols and trailing zeroes.
typedef uint8_t vs_device_type_t[VS_DEVICE_TYPE_SIZE] |
Device type.
Device type identifier contains ASCII symbols and trailing zeroes.
typedef void(* vs_file_ver_info_cb_t) (vs_file_version_t ver) |
Callback function to inform system about current version of file.
[in] | ver | vs_file_version_t Current version of file |
enum vs_key_type_e |
Key type.
enum vs_prvs_t |
Provision operations.