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.

69 lines
3.3 KiB

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