Soletta™ Framework
|
Struct that represents TLV data. More...
#include <sol-lwm2m.h>
Data Fields | |
uint16_t | api_version |
API version. More... | |
struct sol_buffer | content |
The TLV content. More... | |
uint16_t | id |
The id of the object/instance/resource. More... | |
enum sol_lwm2m_tlv_type | type |
The TLV type. More... | |
Struct that represents TLV data.
The binary format TLV (Type-Length-Value) is used to represent an array of values or a singular value, using a compact binary representation.
It is needed by "Read" and "Write" operations on Object Instance(s) or on a Resource which supports multiple instances (Resource Instances).
The format is an array of the following byte sequence, where each array entry represents an Object Instance, Resource or Resource Instance:
Field | Format and Length | Description | Implemented as |
---|---|---|---|
Type | 8-bits masked field | Bits 7-6: Indicates the type of identifier. Bits 5-0: All have special meanings as well. | enum sol_lwm2m_tlv.type |
Identifier | 8-bit or 16-bit unsigned integer as indicated by Bit 5 from Type | Object Instance, Resource or Resource Instance ID | uint16_t sol_lwm2m_tlv.id |
Length | 0-24bits unsigned integer as indicated by Bits 4-3 from Type | Length of the following field in bytes | size_t sol_buffer.capacity |
Value | Sequence of bytes of size=Length | Value of the tag. The actual format depends on the Resource's data type
| void * sol_lwm2m_tlv.content->data |
uint16_t sol_lwm2m_tlv::api_version |
API version.
struct sol_buffer sol_lwm2m_tlv::content |
The TLV content.
Referenced by write_access_control_tlv(), write_security_tlv(), and write_server_tlv().
uint16_t sol_lwm2m_tlv::id |
The id of the object/instance/resource.
Referenced by create_access_control_obj(), create_location_obj(), create_security_obj(), create_server_obj(), location_changed_cb(), write_access_control_tlv(), write_or_create_acl(), write_security_tlv(), and write_server_tlv().
enum sol_lwm2m_tlv_type sol_lwm2m_tlv::type |
The TLV type.
Referenced by create_access_control_obj(), write_access_control_tlv(), write_or_create_acl(), write_security_tlv(), and write_server_tlv().