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.

62 lines
1.7 KiB

7 years ago
​
​
5 years ago
​
3 years ago
​
​
​
​
​
​
5 years ago
7 years ago
27 years ago
3 years ago
7 years ago
​
​
​
​
7 years ago
​
5 years ago
5 years ago
​
​
5 years ago
​
​
5 years ago
​
5 years ago
​
7 years ago
​
​
​
7 years ago
​
7 years ago
7 years ago
​
5 years ago
​
7 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. //#define COM_SERVER_PULL
  15. /**
  16. * TODO: Add class description
  17. *
  18. * @author Gagua
  19. */
  20. class LRF_ClientHandler : public networkClientHandler, public protocolLGS3D_Server {
  21. private:
  22. basicLogCollection * m_pLog;
  23. LRF_Kernel * m_pKernelEngine;
  24. LRF3D_WORK_MODE m_bKernelWM;
  25. CLIENT_WORK_MODE m_bClientWM;
  26. basicMutex m_mWMProtector;
  27. thresholdNode * m_pWorkingSAF;
  28. uint32_t m_nWorkingSAF;
  29. uint32_t m_nCurrentSampleIDofBoardData;
  30. EventsFIFO m_oOutputFIFO;
  31. basicMutex m_mOutputProtector;
  32. ALG_RUN_STATUS m_sRuntimeStatus;
  33. void setWM( CLIENT_WORK_MODE );
  34. CLIENT_WORK_MODE getWM();
  35. protected:
  36. bool packetHandler( protocolPackage *Package );
  37. public:
  38. // Constructor
  39. explicit LRF_ClientHandler( int SockFD, networkServiceEngine *ptr = NULL );
  40. // Destructor
  41. virtual ~LRF_ClientHandler();
  42. virtual bool attachEngine( networkServiceEngine *ptr );
  43. virtual bool getStatus( void );
  44. void dispatchEvent( EVENT_CONTAINER *Evt );
  45. };
  46. #endif // PRU_SLAVE
  47. #endif // __LRF_CLIENTHANDLER_H_INCL__