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.

65 lines
3.2 KiB

​
​
​
​
​
​
​
​
​
​
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. #include "../../rgoose/rgooseTypes.h"
  8. #define LEGACY_2ZEROS_BEFORE_PACKAGE
  9. class protocolLGS_2D: public protocolParser{
  10. private:
  11. basicLogCollection * m_pLog;
  12. basicMutex m_mInquiryMutex;
  13. uint8_t m_bDeviceID;
  14. int FinishUpPackage( uint8_t *Buffer, size_t Size, uint8_t DeviceID );
  15. protected:
  16. virtual int packetChecker( uint8_t *Buffer, size_t BufferSize);
  17. virtual protocolPackage * packetExtractor( uint8_t *Buffer, size_t BufferSize);
  18. public:
  19. explicit protocolLGS_2D( basicTransport *Transport = NULL, uint8_t DeviceID = 0 );
  20. virtual ~protocolLGS_2D();
  21. virtual bool create(void){ return protocolParser::create(); };
  22. bool doFullReset( void );
  23. bool doReset( void );
  24. bool getDetectionProfile( void );
  25. uint8_t getDeviceID(void) { return m_bDeviceID; };
  26. bool getMode( void );
  27. bool getFullDraw( uint16_t Angle );
  28. bool getFastDraw( uint16_t Angle );
  29. bool getParameters( bool MASTER = true );
  30. bool getSerialNumber( void );
  31. bool getShadowInfo( void );
  32. bool getShadowPoly( uint16_t PolyID );
  33. bool getShadowPolyPoint( uint16_t PolyID, uint16_t PointID );
  34. bool getShadowStatus( uint8_t MaskID = 0 );
  35. bool getState( void );
  36. bool getState2( void );
  37. bool getVersionString( void );
  38. bool getVoltage(void);
  39. bool setComSpeed( uint32_t spd );
  40. bool setDetectionProfile( uint8_t profile );
  41. bool setDeviceID( uint8_t DeviceID ){ m_bDeviceID = DeviceID; return true; };
  42. bool setDeviceAddress( uint8_t DeviceID, CSTR Serial = NULL );
  43. bool setMode( U8 Mode );
  44. bool setParameters( PLGS_2D_PARAMETERS ptr, bool MASTER = true, uint8_t profile = 0 );
  45. bool setShadowInfo( SHADOW & SH );
  46. bool setShadowPoly( SHADOW & SH, uint16_t PolyID );
  47. bool setShadowPolyPoint( SHADOW & SH, uint16_t PolyID, uint16_t PointID );
  48. bool setShadowRayLine( SHADOW & SH, uint16_t RLID );
  49. bool setShadowRay( SHADOW & SH, uint16_t RLID, uint16_t RayID );
  50. bool setShadowDone( void );
  51. bool setShadowStatus( bool Status, uint8_t MaskID = 0 );
  52. bool sendGF_package( uint8_t CMD, uint8_t cnt, uint8_t *Data );
  53. bool sendFS_package( PFS_DATA pFSData );
  54. };
  55. #endif