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.
40 lines
1.5 KiB
40 lines
1.5 KiB
#ifndef __LRF_SCANNER_4TECHNION_HEADER__
|
|
#define __LRF_SCANNER_4TECHNION_HEADER__
|
|
|
|
#include "../../../components/base/basicSettingsProvider.h"
|
|
#include "../../../data/protocol/protocol.h"
|
|
#include "../../uart/serialPort.h"
|
|
|
|
typedef enum E_LRFT_CMD{
|
|
CMD_GET_MODE = 0x00,
|
|
CMD_GET_PARAM = 0x01,
|
|
CMD_SET_PARAM = 0x02,
|
|
CMD_START = 0x03,
|
|
CMD_STOP = 0x04,
|
|
CMD_RESET = 0x05
|
|
} LRFT_CMD;
|
|
#define CMD_IDX 3
|
|
class LRF_techScanner: public protocolParser{
|
|
private:
|
|
basicLogCollection * m_pLog;
|
|
config_setting_t * m_pSettings;
|
|
uint8_t m_bSpeedSPS;
|
|
uint16_t m_nPulseCount;
|
|
serialPort * m_pPort;
|
|
bool setParams();
|
|
bool reqParams();
|
|
bool reqMode();
|
|
protected:
|
|
virtual int packetChecker(U8 *Buffer, size_t BufferSize);
|
|
virtual protocolPackage * packetExtractor(U8 *Buffer, size_t BufferSize);
|
|
virtual bool packetHandler( protocolPackage *Package );
|
|
public:
|
|
explicit LRF_techScanner( config_setting_t * Settings );
|
|
virtual ~LRF_techScanner();
|
|
virtual bool create();
|
|
bool setDeviceSPS( uint8_t S );
|
|
bool startScan();
|
|
bool stopScan();
|
|
bool resetDevice();
|
|
};
|
|
#endif
|