Utility functions for the ProsecCoAP library. More...
#include <string.h>#include <stdint.h>#include <stddef.h>Go to the source code of this file.
Namespaces | |
| namespace | Coap |
| Namespace for the library. | |
| namespace | Coap::Utils |
| Utilities. | |
Functions | |
| template<typename T > | |
| void | Coap::Utils::toNetworkByteOrder (T value, uint8_t *result) |
| Convert an integer-like value to network byte order (i.e. big-endian). | |
| void | Coap::Utils::toNetworkByteOrder (float value, uint8_t *result) |
| Overload to convert a 32-bit float to network byte order. | |
| void | Coap::Utils::toNetworkByteOrder (double value, uint8_t *result) |
| Overload to convert a 64-bit double to network byte order. | |
| constexpr uint16_t | Coap::Utils::read_uint16 (const uint8_t *bytes) |
| Reads a 16-bit unsigned integer from a Big-Endian byte stream. | |
| constexpr uint32_t | Coap::Utils::read_uint32 (const uint8_t *bytes) |
| Reads a 32-bit unsigned integer from a Big-Endian byte stream. | |
| constexpr uint64_t | Coap::Utils::read_uint64 (const uint8_t *bytes) |
| Reads a 64-bit unsigned integer from a Big-Endian byte stream. | |
| constexpr int16_t | Coap::Utils::read_int16 (const uint8_t *bytes) |
| Reads a 16-bit signed integer from a Big-Endian byte stream. | |
| constexpr int32_t | Coap::Utils::read_int32 (const uint8_t *bytes) |
| Reads a 32-bit signed integer from a Big-Endian byte stream. | |
| constexpr int64_t | Coap::Utils::read_int64 (const uint8_t *bytes) |
| Reads a 64-bit signed integer from a Big-Endian byte stream. | |
| float | Coap::Utils::read_float (const uint8_t *bytes) |
| Reads a 32-bit float from a Big-Endian byte stream. | |
| template<typename T = double> | |
| T | Coap::Utils::read_double (const uint8_t *bytes) |
| Reads a 64-bit double from a Big-Endian byte stream. | |
Utility functions for the ProsecCoAP library.