Go to the documentation of this file.
11 #include "../BasicDatatypes.hpp"
12 #include "../manager.hpp"
13 #include "../interfaces/tcp.hpp"
14 #include "../interfaces/file.hpp"
15 #include "../tools/SickThread.hpp"
16 #include "../datatypes/Position3D.hpp"
17 #include "../datatypes/Point2D.hpp"
18 #include "../datatypes/Scan.hpp"
24 #define MRS_INPUTBUFFERSIZE 65536 // Size of the main input buffer
25 #define MRS_CMDREPLYBUFFERSIZE 8192 // Size of the command reply buffer (some bytes should be enough...)
132 typedef void (*OnScanReceiveCallbackFunction)(
void*);
170 void updateThreadFunction(
bool& endThread,
UINT16& sleepTimeMs);
208 static const UINT16 Err_IF_SPORT = 0x0001;
209 static const UINT16 Err_IF_FPGAcontrol = 0x0002;
210 static const UINT16 Err_SPORTdata = 0x0004;
211 static const UINT16 Err_FPGAkonfiguration = 0x0008;
212 static const UINT16 Err_ConfReg = 0x0010;
213 static const UINT16 Err_Parameter = 0x0020;
215 static const UINT16 Err_TrackingTimeout = 0x0080;
216 static const UINT16 Err_CANMessageLost = 0x0100;
217 static const UINT16 Err_FlexResParameter = 0x0200;
229 UINT16 decodeAnswerInInputBuffer();
230 UINT16 decodeAnswerInCmdReplyBuffer();
231 void removeAnswerFromInputBuffer();
232 bool decodeGetStatus();
233 bool decodeGetParameter(
UINT32* value);
234 void decodeObjects();
236 void decodeSensorInfo();
237 void decodeErrorMessage();
238 double convertTicktsToAngle(
INT16 angleTicks);
242 bool readUpsideDown();
243 double getVAngleOfLayer(
bool isRearMirrorSide,
UINT8 layerNumber,
double hAngle);
247 static void readCallbackFunctionS(
void* obj,
BYTE* buffer,
UINT32& numOfBytes);
248 void readCallbackFunction(
BYTE* buffer,
UINT32& numOfBytes);
249 void removeDataFromInputBuffer(
UINT32 bytesToBeRemoved);
250 void moveDataFromInputToCmdBuffer(
UINT32 bytesToBeMoved);
251 void makeIntValueEven(
INT16& value);
253 static std::string int2Version (
UINT16 val);
254 static std::string version2string (
UINT16 version,
const UINT16 timestamp[3]);
264 std::string ipAddress,
UINT16 tcpPortNumber,
265 double scanFrequency,
double scanStartAngle,
double scanEndAngle,
double offsetX,
266 double offsetY,
double offsetZ,
double yawAngle,
double pitchAngle,
double rollAngle,
267 bool beVerbose, std::string inputFileName);
272 virtual bool run(
bool weWantScanData =
true,
bool weWantObjectData =
true);
273 virtual bool isRunning();
276 void setOnScanReceiveCallbackFunction(OnScanReceiveCallbackFunction
function,
void* obj);
278 bool cmd_getStatus();
279 bool cmd_stopMeasure();
280 bool cmd_startMeasure(
bool weWantScanData =
true,
bool weWantObjectData =
true);
284 bool cmd_setScanAngles(
double startAngle,
double endAngle);
285 bool cmd_setSyncAngleOffset(
double syncAngle);
286 bool cmd_setScanFrequency(
double scanFreq);
287 bool cmd_setDataOutputFlags();
288 bool cmd_saveConfiguration();
289 bool cmd_setNtpTimestamp(
UINT32 seconds,
UINT32 fractionalSec);
295 double getTemperature();
297 std::string getSerialNumber();
307 static const UINT32 ANGULAR_TICKS_PER_ROTATION = 11520;
312 #endif // LUXBASE_HPP
@ ErrFlexResSectorsOverlapping
@ ErrFlexResScannerNotIdle
@ CmdMrsReadConfig
0x0005 = ID of the ReadConfig command
@ CmdMrsFlashFirmware
0x0006 = ID of the FlashFirmware command
@ CmdMrsSetNTPTimestampSec
0x0030 = sets NTP seconds
@ CmdMrsSetMode
0x0002 = ID of the SetMode command
void(* DisconnectFunction)(void *obj)
void(* DisconnectFunction)(void *obj)
@ CmdMrsStartMeasure
0x0020 = starts the measurement with the currenly configured settings
void * m_onScanReceiveCallbackObjPtr
@ CmdMrsSaveConfig
0x0004 = ID of the SaveConfig command
UINT16 getErrorRegister1()
@ CmdMrsStopMeasure
0x0021 = stops the measurement
Wrapper class for posix threads.
@ CmdMrsResetDefaultParameters
0x001A = resets all parameters to the factory defaults
@ ErrFlexResResolutionInvalid
A Position with orientation.
#define MRS_CMDREPLYBUFFERSIZE
#define MRS_INPUTBUFFERSIZE
@ CmdMrsSetParameter
0x0010 = sets a parameter in the sensor
@ CmdMrsSetNTPTimestampFracSec
0x0031 = sets NTP fractional seconds
void * m_disconnectFunctionObjPtr
UINT16 getWarnRegister2()
@ ParaMaximumPredictionAge
File::DisconnectFunction m_fileDisconnectFunction
@ ErrFlexResSizeOneEighthSectorInvalid
UINT16 getScannerStatus()
static bool isValidVersion(UINT16 version)
@ CmdMrsGetParameter
0x0011 = reads a parameter from the sensor
@ CmdMrsSetConfig
0x0003 = ID of the SetConfig command
@ ErrFlexResNumShotsInvalid
@ CmdMrsReset
0x0000 = ID of the Reset command
SickThread< LuxBase, &LuxBase::updateThreadFunction > m_updateThread
@ ErrFlexResNumSectorsInvalid
@ ParaContourPointDensity
@ CmdMrsGetStatus
0x0001 = ID of the GetStatus command
Mutex m_updateMutex
Access mutex for update.
@ ParaAngularResolutionType
UINT16 getErrorRegister2()
Tcp::DisconnectFunction m_tcpDisconnectFunction
std::string getFPGAVersion()
OnScanReceiveCallbackFunction m_onScanReceiveCallback
std::string m_inputFileName
UINT16 getWarnRegister1()
std::string getFirmwareVersion()
libsick_ldmrs
Author(s): SICK AG
, Martin Günther , Jochen Sprickerhof
autogenerated on Wed Oct 26 2022 02:11:57