![]() |
VSM C++ SDK
Vehicle Specific Modules SDK
|
Helper class for byte-order-dependent value representation. More...
#include <endian.h>
Public Member Functions | |
Bo_value (T value=0) | |
Construct value. More... | |
Bo_value & | operator= (T value) |
Assign new value. More... | |
operator T () const | |
Cast to underlying type. More... | |
T | Get () const |
Get the value of underlying type. More... | |
Static Public Member Functions | |
static T | Get (const void *buffer) |
Interpret byte buffer as a storage for underlying type and return host byte order value. More... | |
static void | Set (void *buffer, const T value) |
Save value given in host order to byte buffer. More... | |
Helper class for byte-order-dependent value representation.
|
inline |
Construct value.
value | Value in host byte order. |
|
inline |
Get the value of underlying type.
|
inlinestatic |
Interpret byte buffer as a storage for underlying type and return host byte order value.
Caller is responsible for the size of the input buffer.
buffer | Input buffer with original value. |
|
inline |
Cast to underlying type.
|
inline |
Assign new value.
value | Value in host byte order. |
|
inlinestatic |
Save value given in host order to byte buffer.
Caller is responsible for the size of the buffer.
buffer | Output buffer to save value to. |
value | value in host byte order. |