24 #ifndef GATEWAY_CLIENT_H 25 #define GATEWAY_CLIENT_H 28 #include <boost/asio.hpp> 38 GatewayClient(boost::asio::io_service& a_IOService, boost::asio::ip::tcp::resolver::iterator a_EndpointIterator, std::shared_ptr<ConfigServerHandlerCollection> a_ConfigServerHandlerCollection,
39 std::shared_ptr<HdlcdClientHandlerCollection> a_HdlcdClientHandlerCollection,
GatewayClientConnectGuard& a_GatewayClientConnectGuard, uint16_t a_ReferenceNbr);
46 void SendPacket(uint16_t a_SerialPortNbr,
const std::vector<unsigned char> &a_Payload);
52 bool OnFrame(std::shared_ptr<Frame> a_Frame);
56 boost::asio::io_service& m_IOService;
57 std::shared_ptr<ConfigServerHandlerCollection> m_ConfigServerHandlerCollection;
58 std::shared_ptr<HdlcdClientHandlerCollection> m_HdlcdClientHandlerCollection;
62 boost::asio::ip::tcp::socket m_TcpSocket;
63 std::shared_ptr<FrameEndpoint> m_FrameEndpoint;
64 uint16_t m_ReferenceNbr;
67 std::function<void()> m_OnClosedCallback;
70 #endif // GATEWAY_CLIENT_H This file contains the header declaration of class FrameEndpoint.
void SetOnClosedCallback(std::function< void()> a_OnClosedCallback)
GatewayClient(boost::asio::io_service &a_IOService, boost::asio::ip::tcp::resolver::iterator a_EndpointIterator, std::shared_ptr< ConfigServerHandlerCollection > a_ConfigServerHandlerCollection, std::shared_ptr< HdlcdClientHandlerCollection > a_HdlcdClientHandlerCollection, GatewayClientConnectGuard &a_GatewayClientConnectGuard, uint16_t a_ReferenceNbr)
void SendPacket(uint16_t a_SerialPortNbr, const std::vector< unsigned char > &a_Payload)