42 #include <VtdToolkit/scpIcd.h> 59 virtual std::string to_scp()
const = 0;
72 virtual ~
ScpError() noexcept =
default;
80 using TcpTransceiver::TcpTransceiver;
83 void send(
const ScpMessage& msg) { write(msg.to_scp()); }
84 void send(
const std::string& msg) { write(msg.c_str()); }
85 void send(
const char* msg) { write(msg); }
89 return this->tcp_available_data() >=
static_cast<std::streamsize
>(
sizeof(SCP_MSG_HDR_t));
92 std::string receive();
96 {
"connection_endpoint", t.tcp_endpoint()},
98 {
"num_errors", t.num_errors_},
99 {
"num_messages_sent", t.num_sent_},
100 {
"num_messages_received", t.num_received_},
105 void write(
const std::string& msg) { write(msg.c_str()); }
106 void write(
const char* msg);
109 uint64_t num_errors_{0};
110 uint64_t num_sent_{0};
111 uint64_t num_received_{0};
116 using TcpTransceiverFactory::TcpTransceiverFactory;
120 cloe::Logger factory_logger()
const override {
return scp_logger(); }
121 const char* instance_name()
const override {
return "ScpTransceiver"; }
Definition: scp_transceiver.hpp:56
Definition: actuator_component.hpp:35
Definition: scp_transceiver.hpp:78
Definition: scp_transceiver.hpp:114
Definition: tcp_transceiver.hpp:61
Definition: scp_transceiver.hpp:69
Definition: tcp_transceiver.hpp:151
bool tcp_is_ok() const
Definition: tcp_transceiver.hpp:94