22 #ifndef HDLCD_SERVER_HANDLER_H 23 #define HDLCD_SERVER_HANDLER_H 30 #include <boost/asio.hpp> 45 HdlcdServerHandler(boost::asio::io_service& a_IOService, std::weak_ptr<HdlcdServerHandlerCollection> a_HdlcdServerHandlerCollection, boost::asio::ip::tcp::socket& a_TcpSocket);
52 void Start(std::shared_ptr<SerialPortHandlerCollection> a_SerialPortHandlerCollection);
57 bool OnFrame(
const std::shared_ptr<Frame> a_Frame);
58 bool OnDataReceived(std::shared_ptr<const HdlcdPacketData> a_PacketData);
63 boost::asio::io_service& m_IOService;
64 std::weak_ptr<HdlcdServerHandlerCollection> m_HdlcdServerHandlerCollection;
65 std::shared_ptr<FrameEndpoint> m_FrameEndpoint;
66 std::shared_ptr<HdlcdPacketEndpoint> m_PacketEndpoint;
69 std::shared_ptr<SerialPortHandlerCollection> m_SerialPortHandlerCollection;
70 std::shared_ptr<std::shared_ptr<SerialPortHandler>> m_SerialPortHandlerStopper;
71 std::shared_ptr<SerialPortHandler> m_SerialPortHandler;
74 bool m_bSerialPortHandlerAwaitsPacket;
75 std::shared_ptr<const HdlcdPacketData> m_PendingIncomingPacketData;
78 bool m_bDeliverInitialState;
86 bool m_bDeliverInvalidData;
89 #endif // HDLCD_SERVER_HANDLER_H Copyright (c) 2016, Florian Evers, florian-evers@gmx.de All rights reserved.
void Start(std::shared_ptr< SerialPortHandlerCollection > a_SerialPortHandlerCollection)
E_BUFFER_TYPE GetBufferType() const
void QueryForPayload(bool a_bQueryReliable, bool a_bQueryUnreliable)
void DeliverBufferToClient(E_BUFFER_TYPE a_eBufferType, const std::vector< unsigned char > &a_Payload, bool a_bReliable, bool a_bInvalid, bool a_bWasSent)
HdlcdServerHandler(boost::asio::io_service &a_IOService, std::weak_ptr< HdlcdServerHandlerCollection > a_HdlcdServerHandlerCollection, boost::asio::ip::tcp::socket &a_TcpSocket)
This file contains the header declaration of class AliveGuard.
void UpdateSerialPortState(bool a_bAlive, size_t a_LockHolders)
This file contains the header declaration of class LockGuard.