#include <LuxBase.hpp>
|
bool | cmd_getParameter (MrsParameterId parameter, UINT32 *value) |
|
bool | cmd_getStatus () |
|
bool | cmd_saveConfiguration () |
|
bool | cmd_setDataOutputFlags () |
|
bool | cmd_setMountingPos (Position3D mp) |
|
bool | cmd_setNtpTimestamp (UINT32 seconds, UINT32 fractionalSec) |
|
bool | cmd_setParameter (MrsParameterId parameter, UINT32 value) |
|
bool | cmd_setScanAngles (double startAngle, double endAngle) |
|
bool | cmd_setScanFrequency (double scanFreq) |
|
bool | cmd_setSyncAngleOffset (double syncAngle) |
|
bool | cmd_startMeasure (bool weWantScanData=true, bool weWantObjectData=true) |
|
bool | cmd_stopMeasure () |
|
void | dumpHeader () |
|
void | dumpMessage () |
|
UINT16 | getDSPError () |
|
UINT16 | getErrorRegister1 () |
|
UINT16 | getErrorRegister2 () |
|
std::string | getFirmwareVersion () |
|
UINT16 | getFPGAError () |
|
std::string | getFPGAVersion () |
|
UINT16 | getScannerStatus () |
|
std::string | getSerialNumber () |
|
double | getTemperature () |
|
UINT16 | getWarnRegister1 () |
|
UINT16 | getWarnRegister2 () |
|
virtual bool | initFile (File::DisconnectFunction function, void *obj) |
|
virtual bool | initTcp (Tcp::DisconnectFunction function, void *obj) |
|
virtual bool | isRunning () |
|
| LuxBase (Manager *manager, const UINT8 deviceID, const std::string longName, std::string ipAddress, UINT16 tcpPortNumber, double scanFrequency, double scanStartAngle, double scanEndAngle, double offsetX, double offsetY, double offsetZ, double yawAngle, double pitchAngle, double rollAngle, bool beVerbose, std::string inputFileName) |
|
void | memreadLE (BYTE *&buffer, UINT16 &value) |
|
void | memreadLE (BYTE *&buffer, UINT32 &value) |
|
virtual bool | run (bool weWantScanData=true, bool weWantObjectData=true) |
|
void | setOnScanReceiveCallbackFunction (OnScanReceiveCallbackFunction function, void *obj) |
|
virtual bool | stop () |
|
virtual | ~LuxBase () |
|
|
UINT32 | buildDataHeader (UINT8 *buffer, UINT32 sizeofThisMsg, UINT8 deviceId, UINT16 dataType) |
|
double | convertTicktsToAngle (INT16 angleTicks) |
|
UINT16 | decodeAnswerInCmdReplyBuffer () |
|
UINT16 | decodeAnswerInInputBuffer () |
|
void | decodeErrorMessage () |
|
bool | decodeGetParameter (UINT32 *value) |
|
bool | decodeGetStatus () |
|
void | decodeObjects () |
|
void | decodeScan () |
|
void | decodeSensorInfo () |
|
double | getVAngleOfLayer (bool isRearMirrorSide, UINT8 layerNumber, double hAngle) |
|
void | makeIntValueEven (INT16 &value) |
|
void | moveDataFromInputToCmdBuffer (UINT32 bytesToBeMoved) |
|
bool | readBeamTilt () |
|
void | readCallbackFunction (BYTE *buffer, UINT32 &numOfBytes) |
|
Point2D | readPoint2D (UINT8 *buffer) |
|
Point2D | readSize2D (UINT8 *buffer) |
|
UINT64 | readUINT64ValueLE (UINT8 *buffer) |
|
bool | readUpsideDown () |
|
UINT32 | readUValueBE (UINT8 *buffer, UINT8 bytes) |
|
UINT32 | readUValueLE (UINT8 *buffer, UINT8 bytes) |
|
INT32 | readValueLE (UINT8 *buffer, UINT8 bytes) |
|
bool | receiveMrsReply (MrsCommandId cmd, UINT32 timeoutMs, UINT32 *value=NULL) |
|
void | removeAnswerFromInputBuffer () |
|
void | removeDataFromInputBuffer (UINT32 bytesToBeRemoved) |
|
bool | sendMrsCommand (MrsCommandId cmd, UINT16 para=0, UINT32 value=0) |
|
void | updateThreadFunction (bool &endThread, UINT16 &sleepTimeMs) |
|
UINT32 | writeValueToBufferBE (UINT8 *buffer, UINT32 value, UINT8 bytes) |
|
UINT32 | writeValueToBufferLE (UINT8 *buffer, UINT32 value, UINT8 bytes) |
|
Definition at line 129 of file LuxBase.hpp.
typedef void(* devices::LuxBase::OnScanReceiveCallbackFunction) (void *) |
devices::LuxBase::LuxBase |
( |
Manager * |
manager, |
|
|
const UINT8 |
deviceID, |
|
|
const std::string |
longName, |
|
|
std::string |
ipAddress, |
|
|
UINT16 |
tcpPortNumber, |
|
|
double |
scanFrequency, |
|
|
double |
scanStartAngle, |
|
|
double |
scanEndAngle, |
|
|
double |
offsetX, |
|
|
double |
offsetY, |
|
|
double |
offsetZ, |
|
|
double |
yawAngle, |
|
|
double |
pitchAngle, |
|
|
double |
rollAngle, |
|
|
bool |
beVerbose, |
|
|
std::string |
inputFileName |
|
) |
| |
devices::LuxBase::~LuxBase |
( |
| ) |
|
|
virtual |
Write the data header for the command into the buffer.The buffer must be at least 24 bytes long.
Return value is the number of bytes that have been written.
Definition at line 2578 of file LuxBase.cpp.
bool devices::LuxBase::cmd_getStatus |
( |
| ) |
|
Request the staus message from the scanner.
Definition at line 570 of file LuxBase.cpp.
bool devices::LuxBase::cmd_saveConfiguration |
( |
| ) |
|
bool devices::LuxBase::cmd_setDataOutputFlags |
( |
| ) |
|
bool devices::LuxBase::cmd_setMountingPos |
( |
Position3D |
mp | ) |
|
bool devices::LuxBase::cmd_setNtpTimestamp |
( |
UINT32 |
seconds, |
|
|
UINT32 |
fractionalSec |
|
) |
| |
bool devices::LuxBase::cmd_setScanAngles |
( |
double |
startAngle, |
|
|
double |
endAngle |
|
) |
| |
bool devices::LuxBase::cmd_setScanFrequency |
( |
double |
scanFreq | ) |
|
bool devices::LuxBase::cmd_setSyncAngleOffset |
( |
double |
syncAngle | ) |
|
bool devices::LuxBase::cmd_startMeasure |
( |
bool |
weWantScanData = true , |
|
|
bool |
weWantObjectData = true |
|
) |
| |
bool devices::LuxBase::cmd_stopMeasure |
( |
| ) |
|
double devices::LuxBase::convertTicktsToAngle |
( |
INT16 |
angleTicks | ) |
|
|
private |
UINT16 devices::LuxBase::decodeAnswerInCmdReplyBuffer |
( |
| ) |
|
|
private |
Returns the ID ("command") of the message in the reply buffer. If a complete dataset is in the buffer, the return value is non-zero (=valid). Note that the buffer may hold only one complete (!) dataset.
Note: Access to command and input buffer must be mutex'ed, with same mutex to avoid cross-overwrite while decoding!!
Definition at line 2204 of file LuxBase.cpp.
UINT16 devices::LuxBase::decodeAnswerInInputBuffer |
( |
| ) |
|
|
private |
void devices::LuxBase::decodeErrorMessage |
( |
| ) |
|
|
private |
bool devices::LuxBase::decodeGetParameter |
( |
UINT32 * |
value | ) |
|
|
private |
bool devices::LuxBase::decodeGetStatus |
( |
| ) |
|
|
private |
Decodes a "GetStatus" message in the input buffer.
Definition at line 1048 of file LuxBase.cpp.
void devices::LuxBase::decodeObjects |
( |
| ) |
|
|
private |
void devices::LuxBase::decodeScan |
( |
| ) |
|
|
private |
void devices::LuxBase::decodeSensorInfo |
( |
| ) |
|
|
private |
void devices::LuxBase::dumpHeader |
( |
| ) |
|
void devices::LuxBase::dumpMessage |
( |
| ) |
|
UINT16 devices::LuxBase::getDSPError |
( |
| ) |
|
|
inline |
UINT16 devices::LuxBase::getErrorRegister1 |
( |
| ) |
|
|
inline |
UINT16 devices::LuxBase::getErrorRegister2 |
( |
| ) |
|
|
inline |
std::string devices::LuxBase::getFirmwareVersion |
( |
| ) |
|
|
inline |
UINT16 devices::LuxBase::getFPGAError |
( |
| ) |
|
|
inline |
std::string devices::LuxBase::getFPGAVersion |
( |
| ) |
|
|
inline |
UINT16 devices::LuxBase::getScannerStatus |
( |
| ) |
|
|
inline |
std::string devices::LuxBase::getSerialNumber |
( |
| ) |
|
double devices::LuxBase::getTemperature |
( |
| ) |
|
double devices::LuxBase::getVAngleOfLayer |
( |
bool |
isRearMirrorSide, |
|
|
UINT8 |
layerNumber, |
|
|
double |
hAngle |
|
) |
| |
|
private |
UINT16 devices::LuxBase::getWarnRegister1 |
( |
| ) |
|
|
inline |
UINT16 devices::LuxBase::getWarnRegister2 |
( |
| ) |
|
|
inline |
std::string devices::LuxBase::int2Version |
( |
UINT16 |
val | ) |
|
|
staticprivate |
- Examples:
- 0x1230 –> "1.2.30"
- 0x123B –> "1.2.3B"
- 0xFFFF –> "n/a" (special value for "not available")
Definition at line 1215 of file LuxBase.cpp.
bool devices::LuxBase::isRunning |
( |
| ) |
|
|
virtual |
static bool devices::LuxBase::isValidVersion |
( |
UINT16 |
version | ) |
|
|
inlinestaticprivate |
void devices::LuxBase::makeIntValueEven |
( |
INT16 & |
value | ) |
|
|
private |
void devices::LuxBase::memreadLE |
( |
BYTE *& |
buffer, |
|
|
UINT16 & |
value |
|
) |
| |
void devices::LuxBase::memreadLE |
( |
BYTE *& |
buffer, |
|
|
UINT32 & |
value |
|
) |
| |
void devices::LuxBase::moveDataFromInputToCmdBuffer |
( |
UINT32 |
bytesToBeMoved | ) |
|
|
private |
bool devices::LuxBase::readBeamTilt |
( |
| ) |
|
|
private |
Read the current beam tilt angle from the scanner. The result is stored in m_beamTilt.
Definition at line 616 of file LuxBase.cpp.
void devices::LuxBase::readCallbackFunction |
( |
BYTE * |
buffer, |
|
|
UINT32 & |
numOfBytes |
|
) |
| |
|
private |
void devices::LuxBase::readCallbackFunctionS |
( |
void * |
obj, |
|
|
BYTE * |
buffer, |
|
|
UINT32 & |
numOfBytes |
|
) |
| |
|
staticprivate |
UINT64 devices::LuxBase::readUINT64ValueLE |
( |
UINT8 * |
buffer | ) |
|
|
private |
Little-Endian-Read (unsigned)
Reads a value of 8 bytes from the buffer. The value encoding in the buffer is little endian, that means the lowest-value byte is first in the buffer. Example: Buffer = 0x12 0x34 ==> Value = 0x3412
Definition at line 1301 of file LuxBase.cpp.
bool devices::LuxBase::readUpsideDown |
( |
| ) |
|
|
private |
Read the current UpsideDown flag from the scanner. The result is stored in m_upsideDownActive.
Definition at line 650 of file LuxBase.cpp.
Big-Endian-Read (unsigned)
Reads a value of 1, 2 or 4 bytes from the buffer. The value encoding in the buffer is big endian, that means the highest-value byte is first in the buffer. Example: Buffer = 0x12 0x34 ==> Value = 0x1234
Definition at line 1368 of file LuxBase.cpp.
Little-Endian-Read (unsigned)
Reads a value of 1, 2 or 4 bytes from the buffer. The value encoding in the buffer is little endian, that means the lowest-value byte is first in the buffer. Example: Buffer = 0x12 0x34 ==> Value = 0x3412
Definition at line 1267 of file LuxBase.cpp.
void devices::LuxBase::removeAnswerFromInputBuffer |
( |
| ) |
|
|
private |
Removes the first complete command from the input buffer. It is assumed that a valid command is in the buffer.
Note: Access to input buffer must be mutex'ed.
Definition at line 2314 of file LuxBase.cpp.
void devices::LuxBase::removeDataFromInputBuffer |
( |
UINT32 |
bytesToBeRemoved | ) |
|
|
private |
Remove the first x bytes from the input buffer.
Note that if the host system is fast enough, this does not happen, but the buffer is just invalidated.
Definition at line 2173 of file LuxBase.cpp.
bool devices::LuxBase::run |
( |
bool |
weWantScanData = true , |
|
|
bool |
weWantObjectData = true |
|
) |
| |
|
virtual |
Send a command to the scanner.
Definition at line 2447 of file LuxBase.cpp.
bool devices::LuxBase::stop |
( |
| ) |
|
|
virtual |
void devices::LuxBase::updateThreadFunction |
( |
bool & |
endThread, |
|
|
UINT16 & |
sleepTimeMs |
|
) |
| |
|
private |
std::string devices::LuxBase::version2string |
( |
UINT16 |
version, |
|
|
const UINT16 |
timestamp[3] |
|
) |
| |
|
staticprivate |
const UINT32 devices::LuxBase::ANGULAR_TICKS_PER_ROTATION = 11520 |
|
static |
const UINT16 devices::LuxBase::Err_CANMessageLost = 0x0100 |
|
staticprivate |
const UINT16 devices::LuxBase::Err_ConfReg = 0x0010 |
|
staticprivate |
const UINT16 devices::LuxBase::Err_FlexResParameter = 0x0200 |
|
staticprivate |
const UINT16 devices::LuxBase::Err_FPGAkonfiguration = 0x0008 |
|
staticprivate |
const UINT16 devices::LuxBase::Err_IF_FPGAcontrol = 0x0002 |
|
staticprivate |
const UINT16 devices::LuxBase::Err_IF_SPORT = 0x0001 |
|
staticprivate |
const UINT16 devices::LuxBase::Err_Parameter = 0x0020 |
|
staticprivate |
const UINT16 devices::LuxBase::Err_SPORTdata = 0x0004 |
|
staticprivate |
const UINT16 devices::LuxBase::Err_Timing = 0x0040 |
|
staticprivate |
const UINT16 devices::LuxBase::Err_TrackingTimeout = 0x0080 |
|
staticprivate |
double devices::LuxBase::m_beamTiltAngle |
|
private |
bool devices::LuxBase::m_beVerbose |
|
private |
UINT32 devices::LuxBase::m_cmdBufferLevel |
|
private |
UINT8 devices::LuxBase::m_deviceId |
|
private |
void* devices::LuxBase::m_disconnectFunctionObjPtr |
|
private |
UINT16 devices::LuxBase::m_DSPError |
|
private |
UINT16 devices::LuxBase::m_errorRegister1 |
|
private |
UINT16 devices::LuxBase::m_errorRegister2 |
|
private |
File devices::LuxBase::m_file |
|
private |
UINT16 devices::LuxBase::m_firmwareTimestamp[3] |
|
private |
UINT16 devices::LuxBase::m_firmwareVersion |
|
private |
UINT16 devices::LuxBase::m_FPGAError |
|
private |
UINT16 devices::LuxBase::m_FPGATimestamp[3] |
|
private |
UINT16 devices::LuxBase::m_FPGAVersion |
|
private |
UINT32 devices::LuxBase::m_inBufferLevel |
|
private |
Mutex devices::LuxBase::m_inputBufferMutex |
|
private |
std::string devices::LuxBase::m_inputFileName |
|
private |
std::string devices::LuxBase::m_ipAddress |
|
private |
bool devices::LuxBase::m_isRunning |
|
private |
std::string devices::LuxBase::m_longName |
|
private |
Manager* devices::LuxBase::m_manager |
|
private |
double devices::LuxBase::m_offsetX |
|
private |
double devices::LuxBase::m_offsetY |
|
private |
double devices::LuxBase::m_offsetZ |
|
private |
void* devices::LuxBase::m_onScanReceiveCallbackObjPtr |
|
private |
double devices::LuxBase::m_pitchAngle |
|
private |
bool devices::LuxBase::m_readOnlyMode |
|
private |
double devices::LuxBase::m_rollAngle |
|
private |
double devices::LuxBase::m_scanEndAngle |
|
private |
double devices::LuxBase::m_scanFrequency |
|
private |
UINT16 devices::LuxBase::m_scannerStatus |
|
private |
double devices::LuxBase::m_scanStartAngle |
|
private |
UINT16 devices::LuxBase::m_serialNumber[3] |
|
private |
Tcp devices::LuxBase::m_tcp |
|
private |
UINT16 devices::LuxBase::m_tcpPortNumber |
|
private |
UINT16 devices::LuxBase::m_temperature |
|
private |
Mutex devices::LuxBase::m_updateMutex |
|
private |
bool devices::LuxBase::m_upsideDownActive |
|
private |
UINT16 devices::LuxBase::m_warnRegister1 |
|
private |
UINT16 devices::LuxBase::m_warnRegister2 |
|
private |
bool devices::LuxBase::m_weWantObjectData |
|
private |
bool devices::LuxBase::m_weWantScanData |
|
private |
double devices::LuxBase::m_yawAngle |
|
private |
The documentation for this class was generated from the following files: