FIFO generic container.
More...
◆ Packet()
ElemUtils::Packet::Packet |
( |
| ) |
|
◆ ~Packet()
ElemUtils::Packet::~Packet |
( |
| ) |
|
|
virtual |
◆ append()
void ElemUtils::Packet::append |
( |
const void * |
data, |
|
|
std::size_t |
sizeInBytes |
|
) |
| |
Append data to the end of the packet.
- Parameters
-
data | Pointer to the sequence of bytes to append |
sizeInBytes | Number of bytes to append |
- See also
- clear
◆ checkSize()
bool ElemUtils::Packet::checkSize |
( |
std::size_t |
size | ) |
|
|
private |
Check if the packet can extract a given number of bytes.
This function updates accordingly the state of the packet.
- Parameters
-
- Returns
- True if size bytes can be read from the packet
◆ operator!=()
bool ElemUtils::Packet::operator!= |
( |
const Packet & |
right | ) |
const |
|
private |
◆ operator<<() [1/7]
Packet & ElemUtils::Packet::operator<< |
( |
bool |
data | ) |
|
Overloads of operator << to write data into the packet.
◆ operator<<() [2/7]
Packet & ElemUtils::Packet::operator<< |
( |
const std::string & |
data | ) |
|
◆ operator<<() [3/7]
Packet & ElemUtils::Packet::operator<< |
( |
double |
data | ) |
|
◆ operator<<() [4/7]
Packet & ElemUtils::Packet::operator<< |
( |
int |
data | ) |
|
◆ operator<<() [5/7]
Packet & ElemUtils::Packet::operator<< |
( |
short |
data | ) |
|
◆ operator<<() [6/7]
Packet & ElemUtils::Packet::operator<< |
( |
unsigned int |
data | ) |
|
◆ operator<<() [7/7]
Packet & ElemUtils::Packet::operator<< |
( |
unsigned short |
data | ) |
|
◆ operator==()
bool ElemUtils::Packet::operator== |
( |
const Packet & |
right | ) |
const |
|
private |
Disallow comparisons between GenericTypes.
◆ operator>>() [1/7]
Packet & ElemUtils::Packet::operator>> |
( |
bool & |
data | ) |
|
Overloads of operator >> to read data from the packet.
◆ operator>>() [2/7]
Packet & ElemUtils::Packet::operator>> |
( |
const std::string & |
data | ) |
|
◆ operator>>() [3/7]
Packet & ElemUtils::Packet::operator>> |
( |
double & |
data | ) |
|
◆ operator>>() [4/7]
Packet & ElemUtils::Packet::operator>> |
( |
int & |
data | ) |
|
◆ operator>>() [5/7]
Packet & ElemUtils::Packet::operator>> |
( |
short & |
data | ) |
|
◆ operator>>() [6/7]
Packet & ElemUtils::Packet::operator>> |
( |
unsigned int & |
data | ) |
|
◆ operator>>() [7/7]
Packet & ElemUtils::Packet::operator>> |
( |
unsigned short & |
data | ) |
|
◆ m_data
std::vector<char> ElemUtils::Packet::m_data |
|
private |
Data stored in the packet.
◆ m_isValid
bool ElemUtils::Packet::m_isValid |
|
private |
Reading state of the packet.
◆ m_readPos
std::size_t ElemUtils::Packet::m_readPos |
|
private |
Current reading position in the packet.
The documentation for this class was generated from the following files: