connectionHub.h

Go to the documentation of this file.
00001 #ifndef CONNECTION_HUB_H
00002 #define CONNECTION_HUB_H
00003 
00013 #include "connectionDevice.h"
00014 #include "tcpipServer.h"
00015 
00016 
00020 class ConnectionHub {
00021   enum { WaitToConnect, Connected, Closed };
00022   int state;
00023   TcpipServer* server;
00024   const char* con_device;
00025   long con_baudrate;
00026   ConnectionHub(void);
00027 
00028 protected:
00029   ConnectionDevice* port_a;     
00030   ConnectionDevice* port_b;     
00035   void disconnect(void);
00036 
00044   bool preUpdate(bool& ret_value);
00045 
00046 public:
00053   ConnectionHub(ConnectionDevice& a, ConnectionDevice& b);
00054 
00064   ConnectionHub(int port, const char* device, long baudrate);
00065   ~ConnectionHub(void);
00066 
00073   bool update(void);
00074 };
00075 
00076 #endif /* !CONNECTION_HUB_H */
00077 

Generated on Mon Apr 13 22:52:05 2009 by  doxygen 1.5.7.1