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.

60 lines
1.7 KiB

8 years ago
​
​
5 years ago
​
3 years ago
​
​
​
​
​
​
5 years ago
8 years ago
​
​
​
​
​
8 years ago
​
5 years ago
5 years ago
​
​
5 years ago
​
​
5 years ago
​
5 years ago
​
8 years ago
​
​
​
8 years ago
​
8 years ago
8 years ago
​
5 years ago
​
8 years ago
  1. #ifndef __LRF_CLIENTHANDLER_H_INCL__
  2. #define __LRF_CLIENTHANDLER_H_INCL__
  3. #ifndef PRU_SLAVE
  4. #include "../../data/protocol/protocolLGS3D_server.h"
  5. #include "../../data/net/netClientHandler.h"
  6. #ifdef SLIM_KERNEL
  7. #include "LRF_SlimKernel.h"
  8. #else
  9. #include "LRF_Kernel.h"
  10. #endif
  11. #include "LRF_SlimKernel.h"
  12. #include "../../components/base/basicLogCollection.h"
  13. #include "../../components/base/basicMutex.h"
  14. /**
  15. * TODO: Add class description
  16. *
  17. * @author Gagua
  18. */
  19. class LRF_ClientHandler : public networkClientHandler, public protocolLGS3D_Server {
  20. private:
  21. basicLogCollection * m_pLog;
  22. LRF_Kernel * m_pKernelEngine;
  23. LRF3D_WORK_MODE m_bKernelWM;
  24. CLIENT_WORK_MODE m_bClientWM;
  25. basicMutex m_mWMProtector;
  26. thresholdNode * m_pWorkingSAF;
  27. uint32_t m_nWorkingSAF;
  28. uint32_t m_nCurrentSampleIDofBoardData;
  29. EventsFIFO m_oOutputFIFO;
  30. basicMutex m_mOutputProtector;
  31. ALG_RUN_STATUS m_sRuntimeStatus;
  32. void setWM( CLIENT_WORK_MODE );
  33. CLIENT_WORK_MODE getWM();
  34. protected:
  35. bool packetHandler( protocolPackage *Package );
  36. public:
  37. // Constructor
  38. explicit LRF_ClientHandler( int SockFD, networkServiceEngine *ptr = NULL );
  39. // Destructor
  40. virtual ~LRF_ClientHandler();
  41. virtual bool attachEngine( networkServiceEngine *ptr );
  42. virtual bool getStatus( void );
  43. void dispatchEvent( EVENT_CONTAINER *Evt );
  44. };
  45. #endif // PRU_SLAVE
  46. #endif // __LRF_CLIENTHANDLER_H_INCL__