◆ TxStream()
cbor::TxStream::TxStream |
( |
uint8_t |
stream_type, |
|
|
std::string |
stream_name, |
|
|
uint8_t |
stream_identifier |
|
) |
| |
Create a transmission 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 |
◆ end_transmission()
void cbor::TxStream::end_transmission |
( |
| ) |
|
Tell the stream to send down the packet.
When the transmission is finished the packet is stored in the static member of TcpDaemon in order to be sent to DESERT.
◆ operator<<() [1/16]
TxStream & cbor::TxStream::operator<< |
( |
const bool |
b | ) |
|
◆ operator<<() [2/16]
TxStream & cbor::TxStream::operator<< |
( |
const char |
n | ) |
|
◆ operator<<() [3/16]
TxStream & cbor::TxStream::operator<< |
( |
const double |
d | ) |
|
Encode double.
- Parameters
-
◆ operator<<() [4/16]
TxStream & cbor::TxStream::operator<< |
( |
const float |
f | ) |
|
◆ operator<<() [5/16]
TxStream & cbor::TxStream::operator<< |
( |
const int16_t |
n | ) |
|
◆ operator<<() [6/16]
TxStream & cbor::TxStream::operator<< |
( |
const int32_t |
n | ) |
|
◆ operator<<() [7/16]
TxStream & cbor::TxStream::operator<< |
( |
const int64_t |
n | ) |
|
◆ operator<<() [8/16]
TxStream & cbor::TxStream::operator<< |
( |
const int8_t |
n | ) |
|
◆ operator<<() [9/16]
TxStream & cbor::TxStream::operator<< |
( |
const std::string |
s | ) |
|
Encode string.
- Parameters
-
◆ operator<<() [10/16]
TxStream & cbor::TxStream::operator<< |
( |
const std::u16string |
s | ) |
|
Encode u16string.
- Parameters
-
◆ operator<<() [11/16]
TxStream & cbor::TxStream::operator<< |
( |
const std::vector< bool > |
v | ) |
|
Encode bool vector.
- Parameters
-
◆ operator<<() [12/16]
template<typename T >
TxStream & cbor::TxStream::operator<< |
( |
const std::vector< T > |
v | ) |
|
|
inline |
Encode vector.
- Parameters
-
◆ operator<<() [13/16]
TxStream & cbor::TxStream::operator<< |
( |
const uint16_t |
n | ) |
|
Encode uint16.
- Parameters
-
◆ operator<<() [14/16]
TxStream & cbor::TxStream::operator<< |
( |
const uint32_t |
n | ) |
|
Encode uint32.
- Parameters
-
◆ operator<<() [15/16]
TxStream & cbor::TxStream::operator<< |
( |
const uint64_t |
n | ) |
|
Encode uint64.
- Parameters
-
◆ operator<<() [16/16]
TxStream & cbor::TxStream::operator<< |
( |
const uint8_t |
n | ) |
|
◆ serialize_sequence()
template<typename T >
TxStream & cbor::TxStream::serialize_sequence |
( |
const T * |
items, |
|
|
size_t |
size |
|
) |
| |
|
inline |
Serialize a sequence of uniform elements.
- Parameters
-
items | Pointer to the first element |
size | Size of the items array |
◆ start_transmission() [1/2]
void cbor::TxStream::start_transmission |
( |
| ) |
|
Tell the stream to create a new packet.
Every time a transmission in started, a new empty packet must be generated and saved as a private member. Then type and topic name are put in front of the data.
◆ start_transmission() [2/2]
void cbor::TxStream::start_transmission |
( |
uint64_t |
sequence_id | ) |
|
Tell the stream to create a new packet.
Every time a transmission in started, a new empty packet must be generated and saved as a private member. Then type, service name and sequence id are put in front of the data.
- Parameters
-
sequence_id | The id of the client service communication |
The documentation for this class was generated from the following files:
- src/desert_classes/CBorStream.h
- src/desert_classes/CBorStream.cpp