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.

38 lines
1.2 KiB

7 years ago
​
​
​
7 years ago
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __LRF_CLIENTHANDLER_H_INCL__
  2. #define __LRF_CLIENTHANDLER_H_INCL__
  3. #include "../../data/protocol/protocolLGS.h"
  4. #include "../../data/net/netClientHandler.h"
  5. #include "LRF_Kernel.h"
  6. #include "../../components/base/basicLogCollection.h"
  7. /**
  8. * TODO: Add class description
  9. *
  10. * @author Gagua
  11. */
  12. class LRF_ClientHandler : public networkClientHandler, public protocolLGS_SERVER {
  13. private:
  14. basicLogCollection *m_pLog;
  15. LRF_Kernel *m_pKernelEngine;
  16. E_LRF_WORK_MODE m_bKernelWorkingMode;
  17. E_CLIENT_WORK_MODE m_bClientWorkingMode;
  18. thresholdNode *m_pWorkingSAF;
  19. EventsFIFO m_oOutputFIFO;
  20. uint32_t m_nWorkingSAF;
  21. uint32_t m_nCurrentSampleIDofBoardData;
  22. size_t FinishUpPackage( uint8_t *Buffer, size_t Size, uint8_t DeviceID );
  23. protected:
  24. bool packetHandler( protocolPackage *Package );
  25. public:
  26. // Constructor
  27. explicit LRF_ClientHandler( int SockFD );
  28. // Destructor
  29. virtual ~LRF_ClientHandler();
  30. bool attachEngine( basicEngine *ptr );
  31. void dispatchEvent( basicEvent *Evt );
  32. };
  33. #endif // __LRF_CLIENTHANDLER_H_INCL__