13#ifndef DAPHNEMODULES_SRC_DAPHNEV3INTERFACE_HPP_
14#define DAPHNEMODULES_SRC_DAPHNEV3INTERFACE_HPP_
34 "Failed to create a socket",
40 "Failed to ping daphne board at " << ip <<
':' << port,
41 ((std::string)ip)((
int)port)
46 "Failed to send message of type " << type,
52 "Failed to receive message from " << connection,
53 ((std::string)connection)
58 "Empty payload received from " << connection,
59 ((std::string)connection)
64 "Received message of type " << type <<
" instead of " << expected,
65 ((std::string)type)((std::string)expected)
71 "Failed to de-serialise to " << type <<
". Message: " << message,
72 ((std::string)type)((std::string)message)
77 "Message received with unexpeted properties. Version: " <<
version <<
", direction " <<
". Message: " << message,
78 ((uint32_t)
version)((std::string)direction)((std::string)message)
93 std::chrono::milliseconds timeout = std::chrono::milliseconds(500));
#define ERS_DECLARE_ISSUE(namespace_name, class_name, message, attributes)
static const size_t s_default_control_port
std::mutex m_access_mutex
DaphneV3Interface(std::string address, std::string routing, std::chrono::milliseconds timeout=std::chrono::milliseconds(500))
DaphneV3Interface(DaphneV3Interface &&)=delete
daphne::ControlEnvelopeV2 send(std::string &&message, daphne::MessageTypeV2)
DaphneV3Interface & operator=(const DaphneV3Interface &)=delete
std::chrono::milliseconds m_timeout
void _send(std::string &&message, daphne::MessageTypeV2)
bool validate_connection()
DaphneV3Interface(const DaphneV3Interface &)=delete
uint64_t m_message_counter
daphne::ControlEnvelopeV2 _receive()