Support class to handle byte order problems with numeric values.
More...
#include <littlebuffer.h>
|
| LittleBuffer (const T &value) |
| Constructor that converts the input values.
|
| LittleBuffer (const std::vector< uint8_t > &buffer, size_t offset) |
| Reads in a byte array and at an offset in that array.
|
| LittleBuffer (const uint8_t *buffer, size_t offset) |
| Reads in a value from a byte array from an offset.
|
auto | cbegin () const |
| Returns an iterator to the first byte.
|
auto | cend () const |
| Returns the an iterator to the last byte.
|
const uint8_t * | data () const |
| Returns a constant pointer to the internal byte array.
|
uint8_t * | data () |
| Returns a pointer to the internal byte array.
|
size_t | size () const |
| Returns size of the value type.
|
T | value () const |
| Returns the value.
|
template<typename T>
class bus::LittleBuffer< T >
- Template Parameters
-
◆ LittleBuffer() [1/3]
◆ LittleBuffer() [2/3]
template<typename T>
bus::LittleBuffer< T >::LittleBuffer |
( |
const std::vector< uint8_t > & | buffer, |
|
|
size_t | offset ) |
- Parameters
-
buffer | Byte array. |
offset | Offset in that array. |
◆ LittleBuffer() [3/3]
- Parameters
-
buffer | Pointer to the byte array. |
offset | Offset in the array. |
◆ cbegin()
- Returns
- Constant iterator to the first byte.
◆ cend()
- Returns
- Const iterator to the last byte.
◆ data() [1/2]
- Returns
- Pointer to the internal byte array.
◆ data() [2/2]
- Returns
- Constant pointer to the internal buffer.
◆ size()
- Returns
- Size of the value type.
◆ value()
- Returns
- Returns the value.
The documentation for this class was generated from the following file: