|
| POctets (const lb_endian_t byte_order) noexcept |
| Zero sized POctets instance. More...
|
|
| POctets (const nsize_t capacity_, const nsize_t size_, const lb_endian_t byte_order) |
| New buffer (malloc(capacity), free) More...
|
|
| POctets (const nsize_t size, const lb_endian_t byte_order) |
| New buffer (malloc, free) More...
|
|
| POctets (const POctets &source) |
| Copy constructor. More...
|
|
| POctets (const POctets &source, const nsize_t capacity_) |
| Copy constructor (explicit), allowing to set a higher capacity than source.size() in contrast to the copy-constructor. More...
|
|
| POctets (const TOctetSlice &_source) |
| Makes a persistent POctets by copying the data from TOctetSlice. More...
|
|
| POctets (const TROOctets &_source) |
| Makes a persistent POctets by copying the data from TROOctets. More...
|
|
| POctets (const uint8_t *source_, const nsize_t size_, const lb_endian_t byte_order) |
| Takes ownership (malloc(size) and copy, free) . More...
|
|
| POctets (POctets &&o) noexcept |
| Move constructor. More...
|
|
| POctets (std::initializer_list< uint8_t > sourcelist, const lb_endian_t byte_order) |
| Takes ownership (malloc(size) and copy, free) . More...
|
|
| ~POctets () noexcept override |
|
constexpr nsize_t | capacity () const noexcept |
| Returns the memory capacity, never zero, greater or equal size(). More...
|
|
POctets & | operator+= (const TOctetSlice &b) |
| Append and assign operator. More...
|
|
POctets & | operator+= (const TROOctets &b) |
| Append and assign operator. More...
|
|
POctets & | operator= (const POctets &_source) |
| Assignment operator. More...
|
|
POctets & | operator= (const TOctetSlice &_source) |
| Assignment operator for TOctetSlice. More...
|
|
POctets & | operator= (const TROOctets &_source) |
| Assignment operator for TROOctets. More...
|
|
POctets & | operator= (POctets &&o) noexcept |
| Move assignment operator. More...
|
|
POctets & | recapacity (const nsize_t newCapacity) |
| Changes the capacity. More...
|
|
constexpr nsize_t | remaining () const noexcept |
| Returns the remaining octets for put left, i.e. More...
|
|
POctets & | resize (const nsize_t newCapacity, const nsize_t newSize) |
| Resizes this instance, including its capacity. More...
|
|
POctets & | resize (const nsize_t newSize) |
| Sets a new size for this instance. More...
|
|
std::string | toString () const |
|
| TOctets (const TOctets &o) noexcept=default |
|
| TOctets (TOctets &&o) noexcept=default |
|
| TOctets (uint8_t *source, const nsize_t len, const lb_endian_t byte_order) noexcept |
| Transient passthrough r/w memory, w/o ownership . More...
|
|
| ~TOctets () noexcept override=default |
|
void | bzero () noexcept |
|
void | bzero (const nsize_t i, const nsize_t byte_count) |
|
void | bzero_nc (const nsize_t i, const nsize_t byte_count) noexcept |
|
uint8_t * | get_wptr () noexcept |
|
uint8_t * | get_wptr (const nsize_t i) |
|
uint8_t * | get_wptr_nc (const nsize_t i) noexcept |
|
void | memmove (const nsize_t i, const uint8_t *source, const nsize_t byte_count) |
|
void | memmove_nc (const nsize_t i, const uint8_t *source, const nsize_t byte_count) noexcept |
|
void | memset (const nsize_t i, const uint8_t c, const nsize_t byte_count) |
|
void | memset_nc (const nsize_t i, const uint8_t c, const nsize_t byte_count) noexcept |
|
TOctets & | operator= (const TOctets &o) noexcept=default |
|
TOctets & | operator= (TOctets &&o) noexcept=default |
|
void | put_bytes (const nsize_t i, const uint8_t *source, const nsize_t byte_count) |
|
void | put_bytes_nc (const nsize_t i, const uint8_t *source, const nsize_t byte_count) noexcept |
|
void | put_eui48 (const nsize_t i, const EUI48 &v) |
|
void | put_eui48_nc (const nsize_t i, const EUI48 &v) noexcept |
|
void | put_int8 (const nsize_t i, const int8_t v) |
|
constexpr void | put_int8_nc (const nsize_t i, const int8_t v) noexcept |
|
void | put_octets (const nsize_t i, const TROOctets &v) |
|
void | put_octets (const nsize_t i, const TROOctets &v, const nsize_t v_off, const nsize_t v_len) noexcept |
|
void | put_octets_nc (const nsize_t i, const TROOctets &v) noexcept |
|
void | put_octets_nc (const nsize_t i, const TROOctets &v, const nsize_t v_off, const nsize_t v_len) noexcept |
|
void | put_string (const nsize_t i, const std::string &v, const nsize_t max_len, const bool includeEOS) |
|
void | put_string_nc (const nsize_t i, const std::string &v, const nsize_t max_len, const bool includeEOS) noexcept |
|
void | put_uint128 (const nsize_t i, const uint128dp_t &v) |
|
constexpr void | put_uint128_nc (const nsize_t i, const uint128dp_t &v) noexcept |
|
void | put_uint16 (const nsize_t i, const uint16_t v) |
|
constexpr void | put_uint16_nc (const nsize_t i, const uint16_t v) noexcept |
|
void | put_uint192 (const nsize_t i, const uint192dp_t &v) |
|
constexpr void | put_uint192_nc (const nsize_t i, const uint192dp_t &v) noexcept |
|
void | put_uint256 (const nsize_t i, const uint256dp_t &v) |
|
constexpr void | put_uint256_nc (const nsize_t i, const uint256dp_t &v) noexcept |
|
void | put_uint32 (const nsize_t i, const uint32_t v) |
|
constexpr void | put_uint32_nc (const nsize_t i, const uint32_t v) noexcept |
|
void | put_uint64 (const nsize_t i, const uint64_t &v) |
|
constexpr void | put_uint64_nc (const nsize_t i, const uint64_t &v) noexcept |
|
void | put_uint8 (const nsize_t i, const uint8_t v) |
|
constexpr void | put_uint8_nc (const nsize_t i, const uint8_t v) noexcept |
|
void | put_uuid (const nsize_t i, const uuid_t &v) |
|
void | put_uuid_nc (const nsize_t i, const uuid_t &v) noexcept |
|
std::string | toString () const noexcept |
|
| TROOctets () noexcept |
| Default constructor with nullptr memory, zero size and lb_endian::native byte order. More...
|
|
| TROOctets (const TROOctets &o) noexcept=default |
|
| TROOctets (const uint8_t *source, const nsize_t len, const lb_endian_t byte_order_val) noexcept |
| Transient passthrough read-only memory, w/o ownership . More...
|
|
| TROOctets (TROOctets &&o) noexcept=default |
|
virtual | ~TROOctets () noexcept=default |
|
constexpr lb_endian_t | byte_order () const noexcept |
| Returns byte order of this octet store. More...
|
|
void | check_range (const nsize_t i, const nsize_t count, const char *file, int line) const |
|
EUI48 | get_eui48 (const nsize_t i) const |
|
EUI48 | get_eui48_nc (const nsize_t i) const noexcept |
|
int8_t | get_int8 (const nsize_t i) const |
|
constexpr int8_t | get_int8_nc (const nsize_t i) const noexcept |
|
constexpr uint8_t const * | get_ptr () const noexcept |
|
uint8_t const * | get_ptr (const nsize_t i) const |
|
constexpr uint8_t const * | get_ptr_nc (const nsize_t i) const noexcept |
|
std::string | get_string (const nsize_t i) const |
| Assumes a null terminated string. More...
|
|
std::string | get_string (const nsize_t i, const nsize_t length) const |
| Assumes a string with defined length, not necessarily null terminated. More...
|
|
std::string | get_string_nc (const nsize_t i) const noexcept |
| Assumes a null terminated string. More...
|
|
uint128dp_t | get_uint128 (const nsize_t i) const |
|
constexpr uint128dp_t | get_uint128_nc (const nsize_t i) const noexcept |
|
uint16_t | get_uint16 (const nsize_t i) const |
|
constexpr uint16_t | get_uint16_nc (const nsize_t i) const noexcept |
|
uint192dp_t | get_uint192 (const nsize_t i) const |
|
constexpr uint192dp_t | get_uint192_nc (const nsize_t i) const noexcept |
|
uint256dp_t | get_uint256 (const nsize_t i) const |
|
constexpr uint256dp_t | get_uint256_nc (const nsize_t i) const noexcept |
|
uint32_t | get_uint32 (const nsize_t i) const |
|
constexpr uint32_t | get_uint32_nc (const nsize_t i) const noexcept |
|
uint64_t | get_uint64 (const nsize_t i) const |
|
constexpr uint64_t | get_uint64_nc (const nsize_t i) const noexcept |
|
uint8_t | get_uint8 (const nsize_t i) const |
|
constexpr uint8_t | get_uint8_nc (const nsize_t i) const noexcept |
|
std::unique_ptr< const uuid_t > | get_uuid (const nsize_t i, const uuid_t::TypeSize tsize) const |
|
uuid128_t | get_uuid128 (const nsize_t i) const |
|
uuid128_t | get_uuid128_nc (const nsize_t i) const noexcept |
|
uuid16_t | get_uuid16 (const nsize_t i) const |
|
uuid16_t | get_uuid16_nc (const nsize_t i) const noexcept |
|
constexpr bool | is_range_valid (const nsize_t i, const nsize_t count) const noexcept |
|
bool | operator!= (const TROOctets &rhs) const noexcept |
|
TROOctets & | operator= (const TROOctets &o) noexcept=default |
|
TROOctets & | operator= (TROOctets &&o) noexcept=default |
|
bool | operator== (const TROOctets &rhs) const noexcept |
|
constexpr nsize_t | size () const noexcept |
| Returns the used memory size for read and write operations, may be zero. More...
|
|
std::string | toString () const noexcept |
|
Persistent endian aware octet data, i.e.
owned memory allocation.
Endian byte order is passed at construction.
Constructor and assignment operations are not completely noexcept
and may throw exceptions. This is a design choice based on dynamic resource allocation performed by this class.
- Examples
- dbt_peripheral00.cpp, and dbt_scanner10.cpp.
Definition at line 559 of file octets.hpp.