Simple interface for Mbed Cloud Client
M2MTLVDeserializer Class Reference
M2MTLVDeserializer TLV Deserialiser get the object instances and resources as binary data and builds the lwm2m
representation from it.
More...
#include <m2mtlvdeserializer.h>
Static Public Member Functions | |
static bool | is_object_instance (const uint8_t *tlv) |
This method checks whether the given binary encodes an object instance or something else. | |
static bool | is_resource (const uint8_t *tlv) |
This method checks whether the given binary encodes a resource or something else. | |
static bool | is_multiple_resource (const uint8_t *tlv) |
This method checks whether the given binary encodes a multiple resource or something else. | |
static bool | is_resource_instance (const uint8_t *tlv) |
This method checks whether the given binary encodes a resource instance or something else. | |
static M2MTLVDeserializer::Error | deserialise_object_instances (const uint8_t *tlv, uint32_t tlv_size, M2MObject &object, M2MTLVDeserializer::Operation operation) |
Deserialises the given binary that must encode object instances. | |
static M2MTLVDeserializer::Error | deserialize_resources (const uint8_t *tlv, uint32_t tlv_size, M2MObjectInstance &object_instance, M2MTLVDeserializer::Operation operation) |
Deserialises the given binary that must encode resources. | |
static M2MTLVDeserializer::Error | deserialize_resource_instances (const uint8_t *tlv, uint32_t tlv_size, M2MResource &resource, M2MTLVDeserializer::Operation operation) |
Deserialises the given binary that must encode resource instances. | |
static uint16_t | instance_id (const uint8_t *tlv) |
This method return object instance id or resource id. |
Detailed Description
M2MTLVDeserializer TLV Deserialiser get the object instances and resources as binary data and builds the lwm2m
representation from it.
See OMA-LWM2M specification, chapter 6.1 for the resource model and chapter 6.3.3 for the OMA-TLV specification.
Definition at line 28 of file m2mtlvdeserializer.h.
Member Function Documentation
M2MTLVDeserializer::Error deserialise_object_instances | ( | const uint8_t * | tlv, |
uint32_t | tlv_size, | ||
M2MObject & | object, | ||
M2MTLVDeserializer::Operation | operation | ||
) | [static] |
Deserialises the given binary that must encode object instances.
Binary array can be checked before invoking this method with
Definition at line 56 of file m2mtlvdeserializer.cpp.
M2MTLVDeserializer::Error deserialize_resource_instances | ( | const uint8_t * | tlv, |
uint32_t | tlv_size, | ||
M2MResource & | resource, | ||
M2MTLVDeserializer::Operation | operation | ||
) | [static] |
Deserialises the given binary that must encode resource instances.
Binary array can be checked before invoking this method.
Definition at line 95 of file m2mtlvdeserializer.cpp.
M2MTLVDeserializer::Error deserialize_resources | ( | const uint8_t * | tlv, |
uint32_t | tlv_size, | ||
M2MObjectInstance & | object_instance, | ||
M2MTLVDeserializer::Operation | operation | ||
) | [static] |
Deserialises the given binary that must encode resources.
Binary array can be checked before invoking this method.
Definition at line 75 of file m2mtlvdeserializer.cpp.
uint16_t instance_id | ( | const uint8_t * | tlv ) | [static] |
This method return object instance id or resource id.
- Parameters:
-
tlv Binary to be checked
- Returns:
- Object instance id or resource id.
Definition at line 377 of file m2mtlvdeserializer.cpp.
bool is_multiple_resource | ( | const uint8_t * | tlv ) | [static] |
This method checks whether the given binary encodes a multiple resource or something else.
It returns true
if bits 7-6 of the first byte is "10".
- Parameters:
-
tlv Binary to be checked as LWM2M multiple resource.
- Returns:
true
orfalse
.
Definition at line 46 of file m2mtlvdeserializer.cpp.
bool is_object_instance | ( | const uint8_t * | tlv ) | [static] |
This method checks whether the given binary encodes an object instance or something else.
It returns true
if bits 7-6 of the first byte is "00".
- Parameters:
-
tlv Binary to be checked as LWM2M object instance
- Returns:
true
orfalse
.
Definition at line 36 of file m2mtlvdeserializer.cpp.
bool is_resource | ( | const uint8_t * | tlv ) | [static] |
This method checks whether the given binary encodes a resource or something else.
It returns true
if bits 7-6 of the first byte is "11".
- Parameters:
-
tlv Binary to be checked as LWM2M resource.
- Returns:
true
orfalse
.
Definition at line 41 of file m2mtlvdeserializer.cpp.
bool is_resource_instance | ( | const uint8_t * | tlv ) | [static] |
This method checks whether the given binary encodes a resource instance or something else.
It returns true
if bits 7-6 of the first byte is "01".
- Parameters:
-
tlv Binary to be checked as LWM2M resource instance.
- Returns:
true
orfalse
.
Definition at line 51 of file m2mtlvdeserializer.cpp.
Generated on Tue Jul 12 2022 19:01:39 by 1.7.2