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.

44 lines
2.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __PROTOCOL_LGS_2D_HEADERS__
  2. #define __PROTOCOL_LGS_2D_HEADERS__
  3. #include "protocol.h"
  4. #include "protocolLGS_data.h"
  5. #include "../../alg/lgs/detectorStructures.h"
  6. #include "../../alg/lgs/mask.h"
  7. class protocolLGS_2D: public protocolParser{
  8. private:
  9. basicLogCollection * m_pLog;
  10. basicMutex m_mInquiryMutex;
  11. uint8_t m_bDeviceID;
  12. int FinishUpPackage( uint8_t *Buffer, size_t Size, uint8_t DeviceID );
  13. protected:
  14. virtual int packetChecker( uint8_t *Buffer, size_t BufferSize);
  15. virtual protocolPackage * packetExtractor( uint8_t *Buffer, size_t BufferSize);
  16. public:
  17. explicit protocolLGS_2D( basicTransport *Transport = NULL, uint8_t DeviceID = 0 );
  18. virtual ~protocolLGS_2D();
  19. virtual bool create(void){ return protocolParser::create(); };
  20. uint8_t getDeviceID(void) { return m_bDeviceID; };
  21. bool setDeviceID( uint8_t DeviceID ){ m_bDeviceID = DeviceID; return true; };
  22. bool doFullReset( void );
  23. bool doReset( void );
  24. bool getFullDraw( uint16_t Angle );
  25. bool getFastDraw( uint16_t Angle );
  26. bool getParameters( bool MASTER = true );
  27. bool getShadowPoly( uint8_t PolyID );
  28. bool getShadowStatus( uint8_t MaskID = 0 );
  29. bool getShadowInfo( void );
  30. bool getVoltage(void);
  31. bool getState( void );
  32. bool getState2( void );
  33. bool setMode( U8 Mode );
  34. bool setShadowPoly( simplePolygone *SP );
  35. bool setShadowStatus( bool Status, uint8_t MaskID = 0 );
  36. bool setShadowTrace( vectorZoneMask *VM );
  37. bool setParameters( PLGS_2D_PARAMETERS ptr, bool MASTER = true );
  38. };
  39. #endif