39 #error "The RPlidar SDK requires a C++ compiler to be built" 44 #define DEPRECATED(func) func __attribute__ ((deprecated)) 45 #elif defined(_MSC_VER) 46 #define DEPRECATED(func) __declspec(deprecated) func 48 #pragma message("WARNING: You need to implement DEPRECATED for this compiler") 49 #define DEPRECATED(func) func 53 namespace rp {
namespace standalone{
namespace rplidar {
71 virtual bool bind(
const char*, uint32_t ) = 0;
72 virtual bool open() {
return true;}
73 virtual void close() = 0;
75 virtual bool waitfordata(
size_t data_count,
_u32 timeout = -1,
size_t * returned_size = NULL) = 0;
76 virtual int senddata(
const _u8 *
data,
size_t size) = 0;
77 virtual int recvdata(
unsigned char * data,
size_t size) = 0;
86 DEFAULT_TIMEOUT = 2000,
90 MAX_SCAN_NODES = 8192,
94 LEGACY_SAMPLE_DURATION = 476,
124 virtual void disconnect() = 0;
127 virtual bool isConnected() = 0;
133 virtual u_result reset(
_u32 timeout = DEFAULT_TIMEOUT) = 0;
135 virtual u_result clearNetSerialRxCache() = 0;
138 virtual u_result getAllSupportedScanModes(std::vector<RplidarScanMode>& outModes,
_u32 timeoutInMs = DEFAULT_TIMEOUT) = 0;
141 virtual u_result getTypicalScanMode(
_u16& outMode,
_u32 timeoutInMs = DEFAULT_TIMEOUT) = 0;
165 virtual u_result getHealth(rplidar_response_device_health_t & health,
_u32 timeout = DEFAULT_TIMEOUT) = 0;
171 virtual u_result getDeviceInfo(rplidar_response_device_info_t & info,
_u32 timeout = DEFAULT_TIMEOUT) = 0;
178 DEPRECATED(
virtual u_result getSampleDuration_uS(rplidar_response_sample_rate_t & rateInfo,
_u32 timeout = DEFAULT_TIMEOUT)) = 0;
196 virtual u_result checkMotorCtrlSupport(
bool & support,
_u32 timeout = DEFAULT_TIMEOUT) = 0;
208 DEPRECATED(
virtual u_result getFrequency(
bool inExpressMode,
size_t count,
float & frequency,
bool & is4kmode)) = 0;
224 virtual u_result startScanNormal(
bool force,
_u32 timeout = DEFAULT_TIMEOUT) = 0;
231 DEPRECATED(
virtual u_result checkExpressScanSupported(
bool & support,
_u32 timeout = DEFAULT_TIMEOUT)) = 0;
236 virtual u_result stop(
_u32 timeout = DEFAULT_TIMEOUT) = 0;
257 DEPRECATED(
virtual u_result grabScanData(rplidar_response_measurement_node_t * nodebuffer,
size_t & count,
_u32 timeout = DEFAULT_TIMEOUT)) = 0;
285 DEPRECATED(
virtual u_result ascendScanData(rplidar_response_measurement_node_t * nodebuffer,
size_t count)) = 0;
303 DEPRECATED(
virtual u_result getScanDataWithInterval(rplidar_response_measurement_node_t * nodebuffer,
size_t & count)) = 0;
virtual void ReleaseRxTx()