A helper class to serialize packages. Contains methods for serializing all relevant datatypes.
More...
#include <package_serializer.h>
|
template<typename T > |
static size_t | serialize (uint8_t *buffer, T val) |
| A generalized serialization method for arbitrary datatypes. More...
|
|
static size_t | serialize (uint8_t *buffer, double val) |
| A serialization method for double values. More...
|
|
static size_t | serialize (uint8_t *buffer, std::string val) |
| A serialization method for strings. More...
|
|
|
template<typename T > |
static T | encode (T val) |
|
static uint16_t | encode (uint16_t val) |
|
static uint32_t | encode (uint32_t val) |
|
static uint64_t | encode (uint64_t val) |
|
static int16_t | encode (int16_t val) |
|
static int32_t | encode (int32_t val) |
|
static int64_t | encode (int64_t val) |
|
A helper class to serialize packages. Contains methods for serializing all relevant datatypes.
Definition at line 42 of file package_serializer.h.
template<typename T >
static T urcl::comm::PackageSerializer::encode |
( |
T |
val | ) |
|
|
inlinestaticprivate |
static uint16_t urcl::comm::PackageSerializer::encode |
( |
uint16_t |
val | ) |
|
|
inlinestaticprivate |
static uint32_t urcl::comm::PackageSerializer::encode |
( |
uint32_t |
val | ) |
|
|
inlinestaticprivate |
static uint64_t urcl::comm::PackageSerializer::encode |
( |
uint64_t |
val | ) |
|
|
inlinestaticprivate |
static int16_t urcl::comm::PackageSerializer::encode |
( |
int16_t |
val | ) |
|
|
inlinestaticprivate |
static int32_t urcl::comm::PackageSerializer::encode |
( |
int32_t |
val | ) |
|
|
inlinestaticprivate |
static int64_t urcl::comm::PackageSerializer::encode |
( |
int64_t |
val | ) |
|
|
inlinestaticprivate |
template<typename T >
static size_t urcl::comm::PackageSerializer::serialize |
( |
uint8_t * |
buffer, |
|
|
T |
val |
|
) |
| |
|
inlinestatic |
A generalized serialization method for arbitrary datatypes.
- Template Parameters
-
- Parameters
-
buffer | The buffer to write the serialization into |
val | The value to serialize |
- Returns
- Size in byte of the serialization
Definition at line 55 of file package_serializer.h.
static size_t urcl::comm::PackageSerializer::serialize |
( |
uint8_t * |
buffer, |
|
|
double |
val |
|
) |
| |
|
inlinestatic |
A serialization method for double values.
- Parameters
-
buffer | The buffer to write the serialization into. |
val | The value to serialize. |
- Returns
- Size in byte of the serialization.
Definition at line 71 of file package_serializer.h.
static size_t urcl::comm::PackageSerializer::serialize |
( |
uint8_t * |
buffer, |
|
|
std::string |
val |
|
) |
| |
|
inlinestatic |
A serialization method for strings.
- Parameters
-
buffer | The buffer to write the serialization into. |
val | The string to serialize. |
- Returns
- Size in byte of the serialization.
Definition at line 89 of file package_serializer.h.
The documentation for this class was generated from the following file:
ur_client_library
Author(s): Thomas Timm Andersen, Simon Rasmussen, Felix Exner, Lea Steffen, Tristan Schnell
autogenerated on Sun May 9 2021 02:16:26