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.

41 lines
1.9 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/mask.h"
  6. class protocolLGS_2D: public protocolParser{
  7. private:
  8. basicLogCollection * m_pLog;
  9. basicMutex m_mInquiryMutex;
  10. uint8_t m_bDeviceID;
  11. protected:
  12. virtual int packetChecker( uint8_t *Buffer, size_t BufferSize);
  13. virtual protocolPackage * packetExtractor( uint8_t *Buffer, size_t BufferSize);
  14. public:
  15. explicit protocolLGS_2D( basicTransport *Transport = NULL, uint8_t DeviceID = 0 );
  16. virtual ~protocolLGS_2D();
  17. virtual bool create(void){ return protocolParser::create(); };
  18. uint8_t getDeviceID(void) { return m_bDeviceID; };
  19. bool setDeviceID( uint8_t DeviceID ){ m_bDeviceID = DeviceID; return true; };
  20. bool doFullReset( void );
  21. bool doReset( void );
  22. bool doStartMotors( void );
  23. bool doStopMotors( void );
  24. bool getDraw( uint32_t SampleID );
  25. bool getParameters( void );
  26. bool getShadowPoly( uint8_t PolyID );
  27. bool getShadowStatus( uint8_t MaskID = 0 );
  28. bool getShadowInfo( void );
  29. bool getVoltage(void);
  30. bool getState( void );
  31. bool getState2( void );
  32. bool setMode( U8 Mode );
  33. bool setShadowPoly( simplePolygone *SP );
  34. bool setShadowStatus( bool Status, uint8_t MaskID = 0 );
  35. bool setShadowTrace( vectorZoneMask *VM );
  36. bool setParameters( PLGS_PARAMETERS ptr );
  37. };
  38. #endif