Helper functions namespace for conversion from/to byte vector. More...
Functions | |
| template<typename T > | |
| void | ToByteVector (T unsignedInteger, std::vector< uint8_t > &vector) |
| Convert the given unsigned integer to a byte vector. More... | |
| template<typename T > | |
| T | ToUnsignedInteger (const std::vector< uint8_t > &vector, std::size_t &offset) |
| Convert the given byte vector to an unsigned integer. More... | |
| template<typename T > | |
| T | ToEnum (const std::vector< uint8_t > &vector, std::size_t &offset) |
| Convert the given byte vector to an enum. More... | |
| template<std::size_t N> | |
| std::array< uint8_t, N > | ToByteArray (const std::vector< uint8_t > &vector, std::size_t &offset) |
| Convert the given byte vector to a byte array. More... | |
| template<std::size_t N> | |
| std::string | ToString (const std::vector< uint8_t > &vector, std::size_t &offset) |
| Convert the given byte vector to a string. More... | |
Helper functions namespace for conversion from/to byte vector.
| std::array< uint8_t, N > DoipLib::Convert::ToByteArray | ( | const std::vector< uint8_t > & | vector, |
| std::size_t & | offset | ||
| ) |
Convert the given byte vector to a byte array.
| N | Byte array size |
| vector | Byte vector to be converted | |
| [in,out] | offset | Offset within the byte vector |
| void DoipLib::Convert::ToByteVector | ( | T | unsignedInteger, |
| std::vector< uint8_t > & | vector | ||
| ) |
Convert the given unsigned integer to a byte vector.
| T | Unsigned integer type |
| [in] | unsignedInteger | Unsigned integer to be converted |
| [out] | vector | Byte vector as the unsigned integer conversion result |
| T DoipLib::Convert::ToEnum | ( | const std::vector< uint8_t > & | vector, |
| std::size_t & | offset | ||
| ) |
Convert the given byte vector to an enum.
| T | Enum with underlying unsigned integer type |
| vector | Byte vector to be converted | |
| [in,out] | offset | Offset within the byte vector |
| std::string DoipLib::Convert::ToString | ( | const std::vector< uint8_t > & | vector, |
| std::size_t & | offset | ||
| ) |
Convert the given byte vector to a string.
| N | String size |
| vector | Byte vector to be converted | |
| [in,out] | offset | Offset within the byte vector |
| T DoipLib::Convert::ToUnsignedInteger | ( | const std::vector< uint8_t > & | vector, |
| std::size_t & | offset | ||
| ) |
Convert the given byte vector to an unsigned integer.
| T | Unsigned integer type |
| vector | Byte vector to be converted | |
| [in,out] | offset | Offset within the byte vector |