8 #include "../tools/errorhandler.hpp" 9 #include "../tools/toolbox.hpp" 10 #include "../datatypes/Scan.hpp" 11 #include "../datatypes/Object.hpp" 12 #include "../datatypes/Msg.hpp" 13 #include "../datatypes/Measurement.hpp" 14 #include "../datatypes/Fields.hpp" 15 #include "../datatypes/EvalCases.hpp" 16 #include "../datatypes/EvalCaseResults.hpp" 17 #include "../devices/LD_MRS.hpp" 59 std::string datatypeStr;
60 std::string sourceIdStr;
65 datatypeStr =
"Scan (" +
::toString(((
Scan&)data).getNumPoints()) +
" points)";
68 Scan* scan =
dynamic_cast<Scan*
>(&data);
82 datatypeStr =
"Fields (" +
::toString(((
Fields&)data).getFields().size()) +
" fields, " +
83 ::toString(((
Fields&)data).getNumberOfValidFields()) +
" of which are valid)";
86 datatypeStr =
"EvalCases (" +
::toString(((
EvalCases&)data).getEvalCases().size()) +
" cases)";
92 datatypeStr =
"Msg (" + ((
Msg&)data).toString() +
")";
98 datatypeStr =
"(unknown)";
114 beVerboseHere =
true;
116 printInfoMessage(
"LdmrsFieldApp::thread_removeAllEvalCases: Called.", beVerboseHere);
124 printError(
"LdmrsFieldApp::thread_removeAllEvalCases: Failed to write empty EvalCase structure!");
127 printInfoMessage(
"LdmrsFieldApp::thread_removeAllEvalCases: All done, leaving.", beVerboseHere);
138 beVerboseHere =
true;
140 printInfoMessage(
"LdmrsFieldApp::thread_removeAllFields: Called.", beVerboseHere);
158 for (
UINT16 i = 0; i<16; i++)
165 printError(
"LdmrsFieldApp::thread_removeAllFields: Failed to clear field " +
toString(i) +
"!");
169 printInfoMessage(
"LdmrsFieldApp::thread_removeAllFields: All done, leaving.", beVerboseHere);
178 beVerboseHere =
true;
180 printInfoMessage(
"LdmrsFieldApp::thread_createEvalCase(): Called.", beVerboseHere);
212 printError(
"LdmrsFieldApp::thread_createEvalCase: Failed to write the EvalCase structure!");
215 printInfoMessage(
"LdmrsFieldApp::thread_createEvalCase: All done, leaving.", beVerboseHere);
224 beVerboseHere =
true;
226 printInfoMessage(
"LdmrsFieldApp::thread_createRectangularField(): Called.", beVerboseHere);
260 printError(
"LdmrsFieldApp::thread_createRectangularField(): Failed to write the field!");
263 printInfoMessage(
"LdmrsFieldApp::thread_createRectangularField(): All done, leaving.", beVerboseHere);
272 beVerboseHere =
true;
274 printInfoMessage(
"LdmrsFieldApp::changeThreadFunction(): started", beVerboseHere);
279 for (
UINT16 i = 0; i<10; i++)
292 printError(
"LdmrsFieldApp::changeThreadFunction(): Failed to read device pointer, aborting!");
299 for (
UINT16 i = 0; i<10; i++)
316 printInfoMessage(
"LdmrsFieldApp::changeThreadFunction(): Now removing all eval cases.", beVerboseHere);
323 printInfoMessage(
"LdmrsFieldApp::changeThreadFunction(): Now removing all fields.", beVerboseHere);
328 usleep(sleepTimeS * 1000 * 1000);
334 printInfoMessage(
"LdmrsFieldApp::changeThreadFunction(): Now writing a rectangular field.", beVerboseHere);
339 usleep(sleepTimeS * 1000 * 1000);
345 printInfoMessage(
"LdmrsFieldApp::changeThreadFunction(): Now writing an eval case for the rectangular field.", beVerboseHere);
357 usleep(sleepTimeS * 1000 * 1000);
void printError(std::string message)
std::string toString(const PositionWGS84::PositionWGS84SourceType &type)
void setMinFieldExp(double minFieldExp)
void setResponseTime(UINT32 responseTime)
void setDistDependent(bool distDependent)
void setStrategy(EvaluationStrategy strategy)
bool writeEvalCases(const EvalCases &evalCases)
bool writeField(UINT16 fieldNum, const FieldParameter ¶)
LdmrsFieldApp(Manager *manager)
void add(EvalCase_ptr evalCase)
void setFieldNumber(UINT16 fieldNumber)
devices::BasicDevice * getFirstDeviceByType(Sourcetype type)
void setDistScaleFactor(double distScaleFactor)
#define printInfoMessage(a, b)
void setAngleScaleFactor(UINT32 angleScaleFactor)
void setAngleScaleOffset(INT32 angleScaleOffset)
void setField(FieldDescription *field)
const Time & getStartTimestamp() const
void thread_createEvalCase(devices::LDMRS *ldmrs)
void setCaseName(const std::string &caseName)
void setOutputNumber(UINT8 outputNumber)
void setRefPointDist(double refPointDist)
void thread_removeAllFields(devices::LDMRS *ldmrs)
void setData(BasicData &data)
SickThread< LdmrsFieldApp,&LdmrsFieldApp::changeThreadFunction > m_changeThread
void setRotAngle(double rotAngle)
void changeThreadFunction(bool &endThread, UINT16 &waitTimeMs)
void setDistScaleOffset(double distScaleOffset)
void setWidth(double width)
void setVersionNumber(UINT16 versionNumber)
void setBlankingSize(double blankingSize)
void setFieldTypeIntern(UINT8 fieldTypeIntern)
void setLogicalInputState_from_UINT8(UINT8 value)
void setCaseNumber(UINT8 caseNumber)
void setResultNegation(bool resultNegation)
const ScannerInfo * getScannerInfoByDeviceId(UINT8 id) const
void setResponseTimeExtended(UINT32 responseTimeExtended)
void setMaxRadialCorridor(double maxRadialCorridor)
void setFilterType(FilterType filterType)
void setManipulationPrevention(ManipulationPrevention manPrev)
void setComment(const std::string &comment)
void setComment(const std::string &comment)
void thread_createRectangularField(devices::LDMRS *ldmrs)
void setRefPointAngle(double refPointAngle)
void setVersionNumber(UINT8 m_versionNumber)
void thread_removeAllEvalCases(devices::LDMRS *ldmrs)
void setFieldNumber(UINT16 m_fieldNumber)
void setLength(double length)
void setEnableLayerFilter(bool enableLayerFilter)
void setFieldName(const std::string &fieldName)
std::string toString() const