|
static void | interpret_packets () |
| Interpret raw packets and splits them into different communication types.
|
|
◆ RxStream()
cbor::RxStream::RxStream |
( |
uint8_t |
stream_type, |
|
|
std::string |
stream_name, |
|
|
uint8_t |
stream_identifier |
|
) |
| |
Create a reception stream.
- Parameters
-
stream_type | Type of the object using the current instance |
stream_name | Name of the topic or the service to which the communication belongs |
stream_identifier | Identifier of the topic or the service read from configuration |
◆ clear_buffer()
void cbor::RxStream::clear_buffer |
( |
| ) |
|
Clear the currently buffered packet.
When the packet is read by the entity, this function must be called to clear the buffer and allow RxStream to add the next one in the queue.
◆ data_available()
bool cbor::RxStream::data_available |
( |
int64_t |
sequence_id = 0 | ) |
|
Check if there are data.
A map contains the information received for all topics and services, so using the name saved in the current instance as key it is possible to know if a message is arrived for a specific entity.
- Parameters
-
sequence_id | The id of the client service communication |
◆ deserialize_integer()
template<typename T >
RxStream & cbor::RxStream::deserialize_integer |
( |
T & |
n | ) |
|
Decode a generic integer.
- Parameters
-
◆ deserialize_sequence()
template<typename T >
RxStream & cbor::RxStream::deserialize_sequence |
( |
T * |
items, |
|
|
size_t |
size |
|
) |
| |
|
inline |
Deserialize a sequence of uniform elements.
- Parameters
-
items | Pointer to the first element |
size | Size of the items array |
◆ interpret_packets()
void cbor::RxStream::interpret_packets |
( |
| ) |
|
|
static |
Interpret raw packets and splits them into different communication types.
Raw packets from TcpDaemon are read and interpreted in order to put them in a map where the key allows to distinguish the topic name or the service name, and eventually the sequence identifier.
◆ operator>>() [1/16]
RxStream & cbor::RxStream::operator>> |
( |
bool & |
b | ) |
|
◆ operator>>() [2/16]
RxStream & cbor::RxStream::operator>> |
( |
char & |
n | ) |
|
◆ operator>>() [3/16]
RxStream & cbor::RxStream::operator>> |
( |
double & |
d | ) |
|
Decode double.
- Parameters
-
◆ operator>>() [4/16]
RxStream & cbor::RxStream::operator>> |
( |
float & |
f | ) |
|
◆ operator>>() [5/16]
RxStream & cbor::RxStream::operator>> |
( |
int16_t & |
n | ) |
|
◆ operator>>() [6/16]
RxStream & cbor::RxStream::operator>> |
( |
int32_t & |
n | ) |
|
◆ operator>>() [7/16]
RxStream & cbor::RxStream::operator>> |
( |
int64_t & |
n | ) |
|
◆ operator>>() [8/16]
RxStream & cbor::RxStream::operator>> |
( |
int8_t & |
n | ) |
|
◆ operator>>() [9/16]
RxStream & cbor::RxStream::operator>> |
( |
std::string & |
s | ) |
|
Decode string.
- Parameters
-
◆ operator>>() [10/16]
RxStream & cbor::RxStream::operator>> |
( |
std::u16string & |
s | ) |
|
Decode u16string.
- Parameters
-
◆ operator>>() [11/16]
RxStream & cbor::RxStream::operator>> |
( |
std::vector< bool > & |
v | ) |
|
Decode bool vector.
- Parameters
-
◆ operator>>() [12/16]
template<typename T >
RxStream & cbor::RxStream::operator>> |
( |
std::vector< T > & |
v | ) |
|
|
inline |
Decode vector.
- Parameters
-
◆ operator>>() [13/16]
RxStream & cbor::RxStream::operator>> |
( |
uint16_t & |
n | ) |
|
Decode uint16.
- Parameters
-
◆ operator>>() [14/16]
RxStream & cbor::RxStream::operator>> |
( |
uint32_t & |
n | ) |
|
Decode uint32.
- Parameters
-
◆ operator>>() [15/16]
RxStream & cbor::RxStream::operator>> |
( |
uint64_t & |
n | ) |
|
Decode uint64.
- Parameters
-
◆ operator>>() [16/16]
RxStream & cbor::RxStream::operator>> |
( |
uint8_t & |
n | ) |
|
The documentation for this class was generated from the following files:
- src/desert_classes/CBorStream.h
- src/desert_classes/CBorStream.cpp