22 #include "../tools/errorhandler.hpp" 96 std::string longName =
"LD-MRS";
150 printError(
"LDMRS::init: Failed to initialize LuxBase - Device init failed, aborting.");
168 printError(
"LDMRS::init: Failed to set NTP timestamp - Device init failed, aborting.");
187 ((
LDMRS*)obj)->disconnectFunction();
226 beVerboseHere =
true;
228 printInfoMessage(
"LDMRS::writeField: Called. Logging in now.", beVerboseHere);
233 printInfoMessage(
"LDMRS::writeField: Login was successful, writing field now.", beVerboseHere);
239 printInfoMessage(
"LDMRS::writeField: Field was written, logging out now.", beVerboseHere);
255 beVerboseHere =
true;
257 printInfoMessage(
"LDMRS::writeEvalCases: Called. Logging in now.", beVerboseHere);
262 printInfoMessage(
"LDMRS::writeEvalCases: Login was successful, writing eval cases now.", beVerboseHere);
268 printInfoMessage(
"LDMRS::writeEvalCases: Eval cases were written, logging out now.", beVerboseHere);
272 printInfoMessage(
"LDMRS::writeEvalCases: All done, leaving.", beVerboseHere);
283 beVerboseHere =
true;
290 printInfoMessage(
"LDMRS::flashSopasConfig: Configuration was saved.", beVerboseHere);
295 printError(
"LDMRS::flashSopasConfig: Failed to save configuration!");
310 beVerboseHere =
true;
316 printError(
"LDMRS::setNtpTime: No LUX-Base object available, aborting!");
328 printError(
"LDMRS::setNtpTime: Failed to set timestamp!");
344 printError(
"LDMRS::setScanAngles: No LUX-Base object available, aborting!");
351 printInfoMessage(
"LDMRS::setScanAngles: scan angles were set.", beVerboseHere);
356 printError(
"LDMRS::setScanAngles: Failed to set scan angles!");
359 printInfoMessage(
"LDMRS::setScanAngles: All done, leaving.", beVerboseHere);
372 printError(
"LDMRS::setSyncAngleOffset: No LUX-Base object available, aborting!");
379 printInfoMessage(
"LDMRS::setSyncAngleOffset: sync angle offset was set.", beVerboseHere);
384 printError(
"LDMRS::setSyncAngleOffset: Failed to set sync angle offset!");
387 printInfoMessage(
"LDMRS::setSyncAngleOffset: All done, leaving.", beVerboseHere);
400 printError(
"LDMRS::setScanFrequency: No LUX-Base object available, aborting!");
407 printInfoMessage(
"LDMRS::setScanFrequency: scan frequency was set.", beVerboseHere);
412 printError(
"LDMRS::setScanFrequency: Failed to set scan frequency!");
415 printInfoMessage(
"LDMRS::setScanFrequency: All done, leaving.", beVerboseHere);
461 printError(
"LDMRS::run: called, but pointer to internal data handler is NULL. Was init() called? Aborting!");
472 if (luxSuccess ==
true)
493 bool sopasSuccess =
true;
506 if (sopasSuccess ==
false)
516 if (sopasSuccess ==
false)
537 bool luxSuccess =
true;
538 bool sopasSuccess =
true;
553 return (luxSuccess && sopasSuccess);
575 ((
LDMRS*)obj)->onScanReceived();
static const UINT64 secondsFrom1900to1970
void printError(std::string message)
void disconnectFunction()
bool cmd_getParameter(MrsParameterId parameter, UINT32 *value)
std::string getFirmwareVersion()
bool writeEvalCases(const EvalCases &evalCases)
bool writeField(UINT16 fieldNum, const FieldParameter ¶)
bool cmd_setSyncAngleOffset(double syncAngle)
bool m_weWantScanDataFromSopas
bool setSyncAngleOffset(double syncAngle)
#define printInfoMessage(a, b)
bool setScanAngles(double startAngle, double endAngle)
void setOnScanReceiveCallbackFunction(OnScanReceiveCallbackFunction function, void *obj)
static void disconnectFunctionS(void *obj)
std::string getSerialNumber()
void setIpAddress(std::string ipAddress)
LdmrsSopasLayer * m_sopas
virtual bool initTcp(Tcp::DisconnectFunction function, void *obj)
std::string m_inputFileName
bool cmd_setParameter(MrsParameterId parameter, UINT32 value)
bool getParameter(MrsParameterId id, UINT32 *value)
bool setParameter(MrsParameterId id, UINT32 value)
virtual bool initFile(File::DisconnectFunction function, void *obj)
void setWeWantObjectData(bool weWantObjectData)
static void onScanReceivedS(void *obj)
virtual bool run(bool weWantScanData=true, bool weWantObjectData=true)
bool cmd_setScanFrequency(double scanFreq)
bool cmd_setNtpTimestamp(UINT32 seconds, UINT32 fractionalSec)
bool setScanFrequency(double scanFreq)
void setDevicetype(UINT16 devicetype)
std::string getFirmwareVersion()
bool setNtpTime(UINT32 seconds, UINT32 fractionalSec)
std::string getDeviceName()
std::string getSerialNumber()
std::string getIpAddress()
bool cmd_setScanAngles(double startAngle, double endAngle)