Satellite-Gateway
GatewayClientHandlerCollection.h
Go to the documentation of this file.
1 
24 #ifndef GATEWAY_CLIENT_HANDLER_COLLECTION_H
25 #define GATEWAY_CLIENT_HANDLER_COLLECTION_H
26 
27 #include <memory>
28 #include <boost/asio.hpp>
29 #include <string>
33 
35 public:
36  // CTOR, initializer, and resetter
37  GatewayClientHandlerCollection(boost::asio::io_service& a_IOService);
38  void Initialize(std::shared_ptr<ConfigServerHandlerCollection> a_ConfigServerHandlerCollection,
39  std::shared_ptr<HdlcdClientHandlerCollection> a_HdlcdClientHandlerCollection);
40  void SystemShutdown();
41 
42  // Methods to be called by a configuration server entity
43  void CleanAll();
44  void CreateClient (uint16_t a_ReferenceNbr, std::string a_RemoteAddress, uint16_t a_RemotePortNbr);
45  void DestroyClient(uint16_t a_ReferenceNbr);
46 
47  // Methods to be called by a HDLCd client entity
48  void SendPacket(uint16_t a_SerialPortNbr, const std::vector<unsigned char> &a_Buffer);
49 
50 private:
51  // Members
52  boost::asio::io_service& m_IOService;
53  std::shared_ptr<ConfigServerHandlerCollection> m_ConfigServerHandlerCollection;
54  std::shared_ptr<HdlcdClientHandlerCollection> m_HdlcdClientHandlerCollection;
55 
56  // The gateway client handler entity
57  std::shared_ptr<GatewayClientHandler> m_GatewayClientHandler;
58 };
59 
60 #endif // GATEWAY_CLIENT_HANDLER_COLLECTION_H
void CreateClient(uint16_t a_ReferenceNbr, std::string a_RemoteAddress, uint16_t a_RemotePortNbr)
void SendPacket(uint16_t a_SerialPortNbr, const std::vector< unsigned char > &a_Buffer)
void Initialize(std::shared_ptr< ConfigServerHandlerCollection > a_ConfigServerHandlerCollection, std::shared_ptr< HdlcdClientHandlerCollection > a_HdlcdClientHandlerCollection)
void DestroyClient(uint16_t a_ReferenceNbr)
GatewayClientHandlerCollection(boost::asio::io_service &a_IOService)