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.
 
 
 
 
 
 

75 lines
3.7 KiB

#ifndef __PROTOCOL_LGS_2D_HEADERS__
#define __PROTOCOL_LGS_2D_HEADERS__
#include "protocol.h"
#include "protocolLGS_data.h"
#include "../../alg/lgs/detectorStructures.h"
#include "../../alg/lgs/mask.h"
//#include "../../rgoose/rgooseTypes.h"
#define LEGACY_2ZEROS_BEFORE_PACKAGE
#ifdef LEGACY_2ZEROS_BEFORE_PACKAGE
//#define LEGACY_2ZEROS_FROM_BOTH_SIDES
#endif
//#include "../../App/common/dataBinder_structures.h"
class protocolLGS_2D: public protocolParser{
private:
basicLogCollection * m_pLog;
basicMutex m_mInquiryMutex;
uint8_t m_bDeviceID;
int FinishUpPackage( uint8_t *Buffer, size_t Size, uint8_t DeviceID );
protected:
virtual int packetChecker( uint8_t *Buffer, size_t BufferSize);
virtual protocolPackage * packetExtractor( uint8_t *Buffer, size_t BufferSize);
public:
explicit protocolLGS_2D( basicTransport *Transport = NULL, uint8_t DeviceID = 0 );
virtual ~protocolLGS_2D();
virtual bool create(void){ return protocolParser::create(); };
bool doFullReset( void );
bool doReset( void );
bool getDetectionProfile( void );
uint8_t getDeviceID(void) { return m_bDeviceID; };
bool getMode( void );
bool getFullDraw( uint16_t Angle );
bool getFastDraw( uint16_t Angle );
bool getParameters( bool MASTER = true );
bool getRelayParameters( void );
bool getSerialNumber( void );
bool getShadowInfo( uint8_t seq );
bool getShadowPoly( uint8_t seq, uint16_t PolyID );
bool getShadowPolyPoint( uint8_t seq, uint16_t PolyID, uint16_t PointID );
bool getShadowStatus( uint8_t MaskID = 0 );
bool getState( void );
bool getState2( void );
bool getWidthTable();
bool getVersionString( void );
bool getVoltage(void);
bool setComSpeed( uint32_t spd );
bool setDetectionProfile( uint8_t profile );
bool setDeviceID( uint8_t DeviceID ){ m_bDeviceID = DeviceID; return true; };
bool setDeviceAddress( uint8_t DeviceID, CSTR Serial = NULL );
bool setMode( U8 Mode );
bool setParameters( PLGS_2D_PARAMETERS ptr, bool MASTER = true, uint8_t profile = 0 );
bool setRelayParameters( PRELAY_PARAMETERS ptr );
bool setShadowInfo( uint8_t seq, SHADOW & SH );
bool setShadowPoly( uint8_t seq, SHADOW & SH, uint16_t PolyID );
bool setShadowPolyPoint( uint8_t seq, SHADOW & SH, uint16_t PolyID, uint16_t PointID );
bool setShadowRay( uint8_t seq, SHADOW & SH, uint16_t RLID );
bool setShadowRayLine( uint8_t seq, SHADOW & SH, uint16_t RLID, uint16_t RayID );
bool setShadowDone( uint8_t seq );
bool setShadowStatus( uint8_t ShadowMask );
bool setWidthTable ( PWIDTH_TABLE );
bool sendGF_package( uint8_t CMD, uint8_t cnt, uint8_t *Data );
bool sendFS_package( PFS_DATA pFSData );
};
#endif