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.

53 lines
2.4 KiB

​
​
​
​
​
​
​
​
​
​
5 years ago
​
​
​
​
​
​
​
​
​
​
5 years ago
​
​
  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. bool doFullReset( void );
  21. bool doReset( void );
  22. bool getDetectionProfile( void );
  23. uint8_t getDeviceID(void) { return m_bDeviceID; };
  24. bool getMode( void );
  25. bool getFullDraw( uint16_t Angle );
  26. bool getFastDraw( uint16_t Angle );
  27. bool getParameters( bool MASTER = true );
  28. bool getSerialNumber( void );
  29. bool getShadowInfo( void );
  30. bool getShadowPoly( uint8_t PolyID );
  31. bool getShadowStatus( uint8_t MaskID = 0 );
  32. bool getState( void );
  33. bool getState2( void );
  34. bool getVersionString( void );
  35. bool getVoltage(void);
  36. bool setDetectionProfile( uint8_t profile );
  37. bool setDeviceID( uint8_t DeviceID ){ m_bDeviceID = DeviceID; return true; };
  38. bool setMode( U8 Mode );
  39. bool setParameters( PLGS_2D_PARAMETERS ptr, bool MASTER = true, uint8_t profile = 0 );
  40. bool setShadowPoly( simplePolygone *SP );
  41. bool setShadowStatus( bool Status, uint8_t MaskID = 0 );
  42. bool setShadowTrace( vectorZoneMask *VM );
  43. bool sendFile( CSTR FileName );
  44. };
  45. #endif