You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
938 B

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __CLIENTHANDLER_H_INCL__
  2. #define __CLIENTHANDLER_H_INCL__
  3. //#define DUBUG_COMMUNICATION
  4. #include "../../data/net/netClientHandler.h"
  5. #include "interProcessProto.h"
  6. #define CMD_FRAME 0xA5
  7. #define CMD_QUIT 0xE3
  8. /**
  9. * TODO: Add class description
  10. *
  11. * @author Gagua
  12. */
  13. class ClientHandler : public networkClientHandler, public interProcProto{
  14. private:
  15. basicLogCollection * m_pLog;
  16. bool m_bRunning;
  17. cv::Mat tFrame;
  18. protected:
  19. bool packetHandler( protocolPackage *Package );
  20. bool sendFrame( cv::Mat &frame );
  21. public:
  22. // Constructor
  23. explicit ClientHandler( int SockFD );
  24. virtual ~ClientHandler();
  25. bool create(void);
  26. void dispatchEvent( basicEvent *Evt );
  27. bool getStatus( void ){ return CS_CONNECTED == getConnectionStatus(); };
  28. };
  29. #endif // __LRF_CLIENTHANDLER_H_INCL__