Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MAX44000 PWM_Tone_Library nexpaq_mdk
Fork of LED_Demo by
M2MTLVSerializer Class Reference
M2MTLVSerializer TLV Serialiser constructs the binary representation of object instances, resources and resource instances (see OMA-LWM2M specification, chapter 6.1 for resource model) as OMA-TLV according described in chapter 6.3.3. More...
#include <m2mtlvserializer.h>
Public Member Functions | |
M2MTLVSerializer () | |
Constructor. | |
virtual | ~M2MTLVSerializer () |
Destructor. | |
uint8_t * | serialize (M2MObjectInstanceList object_instance_list, uint32_t &size) |
Serialises given objects instances that contain resources or multiple resources. | |
uint8_t * | serialize (M2MResourceList resource_list, uint32_t &size) |
Serialises given resources with no information about the parent object instance. |
Detailed Description
M2MTLVSerializer TLV Serialiser constructs the binary representation of object instances, resources and resource instances (see OMA-LWM2M specification, chapter 6.1 for resource model) as OMA-TLV according described in chapter 6.3.3.
Definition at line 28 of file m2mtlvserializer.h.
Constructor & Destructor Documentation
M2MTLVSerializer | ( | ) |
Constructor.
Definition at line 23 of file m2mtlvserializer.cpp.
~M2MTLVSerializer | ( | ) | [virtual] |
Destructor.
Definition at line 27 of file m2mtlvserializer.cpp.
Member Function Documentation
uint8_t * serialize | ( | M2MObjectInstanceList | object_instance_list, |
uint32_t & | size | ||
) |
Serialises given objects instances that contain resources or multiple resources.
Object instance IDs are also encoded. This method must be used when an operation targets an object with (potential) multiple instances like "GET /1". In that case the generated TLV will contain the following data:
- ./0
- ./0/0
- ./0/1
- ...
- ./1
- ./1/0
- ./1/1
- ...
- Parameters:
-
objects List of object instances.
- Returns:
- Object instances encoded binary as OMA-TLV
- See also:
- serializeObjectInstances(List)
Definition at line 31 of file m2mtlvserializer.cpp.
uint8_t * serialize | ( | M2MResourceList | resource_list, |
uint32_t & | size | ||
) |
Serialises given resources with no information about the parent object instance.
This method must be used when an operation targets an object instance like "GET /1/0" or a single-instance object like "GET /3//". Resources may have single or multiple instances. The generated TLV will contain the following data as response to "GET /3//":
- ./0
- ./1
- ./2
- ./6/0 (1st instance of a multiple resource)
- ./6/1 (2nd instance of a multiple resource)
- ...
- Parameters:
-
resources Array of resources and resource instances.
- Returns:
- Resources encoded binary as OMA-TLV
- See also:
- serializeResources(List)
Definition at line 36 of file m2mtlvserializer.cpp.
Generated on Tue Jul 12 2022 12:29:08 by
