#include <BytesAccumulator.h>
An accumulator of bytes to be used for the reception of an arbitrary bytes payload.
◆ appendBytes()
bool BytesAccumulator::appendBytes |
( |
uint8_t * |
bytes, |
|
|
uint16_t |
length, |
|
|
uint32_t |
packetNumber |
|
) |
| |
Append some bytes to reconstruct the payload from many packets
- Parameters
-
bytes | The bytes from a packet |
length | The length of the packet's payload |
packetNumber | The number of the packet number |
- Returns
- false if the packet number does not follow strictly the last packet to have been appended. Returns true if the operation succeded.
◆ getBytes()
std::vector< uint8_t > * BytesAccumulator::getBytes |
( |
| ) |
|
Returns the assembled bytes
◆ getLastPacketNumber()
uint32_t BytesAccumulator::getLastPacketNumber |
( |
| ) |
const |
Returns the number of the last packet that was appended to the accumulator.
◆ m_bytes
std::vector<uint8_t> BytesAccumulator::m_bytes |
|
private |
◆ m_lastPacketNumber
uint32_t BytesAccumulator::m_lastPacketNumber = -1 |
|
private |
The documentation for this class was generated from the following files: