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.

58 lines
2.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __PROTOCOL_LGS_HEADERS__
  2. #define __PROTOCOL_LGS_HEADERS__
  3. #include "../../components/base/basicFunctionality.h"
  4. #include "../../components/base/basicTransport.h"
  5. #include "../../components/base/basicMutex.h"
  6. #include "../../components/base/basicEventHeap.h"
  7. #include "../../hardware/soc/general/3DLRF.h"
  8. #include "protocol.h"
  9. #include "protocolLGS_data.h"
  10. #include "../../alg/lgs/mask.h"
  11. #include "../../alg/lgs/detectorStructures.h"
  12. #ifdef _CLIENT_APPLICATION_
  13. #define SEND_TAG MASTER_TAG
  14. #define ACCEPT_TAG SENSOR_TAG
  15. #else
  16. #define SEND_TAG SENSOR_TAG
  17. #define ACCEPT_TAG MASTER_TAG
  18. #endif
  19. //Multibyte
  20. class protocolLGSM: public protocolParser{
  21. private:
  22. basicLogCollection *m_pLog;
  23. basicMutex m_mInquiryMutex;
  24. protected:
  25. uint8_t m_bDeviceID;
  26. int packetChecker( uint8_t *Buffer, size_t BufferSize);
  27. protocolPackage *packetExtractor( uint8_t *Buffer, size_t BufferSize);
  28. public:
  29. explicit protocolLGSM( basicTransport *Transport = NULL, uint8_t DeviceID = 0 );
  30. virtual ~protocolLGSM();
  31. virtual bool create(void){ return protocolParser::create(); };
  32. uint8_t getDeviceID(void) { return m_bDeviceID; };
  33. basicTransport * getTransport(void) { return m_oDataTransport; };
  34. bool setDeviceID( uint8_t DeviceID ){ m_bDeviceID = DeviceID; return true; };
  35. };
  36. // Single Byte
  37. class protocolLGSS: public protocolParser{
  38. private:
  39. basicLogCollection *m_pLog;
  40. basicMutex m_mInquiryMutex;
  41. protected:
  42. uint8_t m_bDeviceID;
  43. int packetChecker( uint8_t *Buffer, size_t BufferSize);
  44. protocolPackage *packetExtractor( uint8_t *Buffer, size_t BufferSize);
  45. public:
  46. explicit protocolLGSS( basicTransport *Transport = NULL, uint8_t DeviceID = 0 );
  47. virtual ~protocolLGSS();
  48. virtual bool create(void){ return protocolParser::create(); };
  49. uint8_t getDeviceID(void) { return m_bDeviceID; };
  50. basicTransport * getTransport(void) { return m_oDataTransport; };
  51. bool setDeviceID( uint8_t DeviceID ){ m_bDeviceID = DeviceID; return true; };
  52. };
  53. #endif