$darkmode
osii::OsiTransceiverTcp Class Reference

#include <osi_transceiver_tcp.hpp>

Inheritance diagram for osii::OsiTransceiverTcp:
Collaboration diagram for osii::OsiTransceiverTcp:

Public Member Functions

bool has_sensor_data () const override
 
std::vector< std::shared_ptr< osi3::SensorData > > receive_sensor_data () override
 
void to_json (cloe::Json &j) const override
 
- Public Member Functions inherited from cloe::utility::TcpTransceiver
 TcpTransceiver (const std::string &host, uint16_t port)
 
void tcp_connect (const std::string &host, uint16_t port)
 
bool tcp_is_connected () const
 
bool tcp_is_ok () const
 
void tcp_disconnect ()
 
uint16_t tcp_port () const
 
const std::string & tcp_host () const
 
std::string tcp_endpoint () const
 

Protected Member Functions

std::shared_ptr< osi3::SensorData > receive_sensor_data_wait ()
 
- Protected Member Functions inherited from cloe::utility::TcpTransceiver
std::streamsize tcp_available_data () const
 
template<typename M >
void tcp_send (M *msg, size_t sz)
 

Friends

void to_json (cloe::Json &j, const OsiTransceiverTcp &t)
 

Additional Inherited Members

- Protected Attributes inherited from cloe::utility::TcpTransceiver
boost::asio::ip::tcp::iostream tcp_stream_
 
bool tcp_connected_ {false}
 
std::string tcp_host_ {}
 
uint16_t tcp_port_ {}
 

Detailed Description

OsiTransceiverTcp implements an OsiTransceiver via TCP.

Member Function Documentation

◆ has_sensor_data()

bool osii::OsiTransceiverTcp::has_sensor_data ( ) const
inlineoverridevirtual

Return true when the transceiver has a SensorData message that can be received.

That is, if true, then a call to receive() will return a vector that is not empty.

Implements osii::OsiTransceiver.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ receive_sensor_data()

std::vector<std::shared_ptr<osi3::SensorData> > osii::OsiTransceiverTcp::receive_sensor_data ( )
inlineoverridevirtual

Non-blocking function to return all received OSI messages.

Implements osii::OsiTransceiver.

Here is the call graph for this function:

◆ receive_sensor_data_wait()

std::shared_ptr< osi3::SensorData > osii::OsiTransceiverTcp::receive_sensor_data_wait ( )
protected

Synchronous (blocking) method to receive a SensorData message.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: