Class TxStream
Defined in File CBorStream.h
Class Documentation
-
class TxStream
Public Functions
-
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
-
void 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
-
void 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.
-
void 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.
-
template<typename T>
inline TxStream &operator<<(const std::vector<T> v) Encode vector.
- Parameters:
v – Field to encode
-
TxStream(uint8_t stream_type, std::string stream_name, uint8_t stream_identifier)