10 #include "../tools/errorhandler.hpp" 36 size = (
UINT32)(4.0 * ((
double)
sizeof(*
this)));
116 std::stringstream output;
119 std::vector<Measurement>::const_iterator meas;
122 output << meas->getName() <<
"=" ;
123 output << meas->valueToString() <<
" ";
128 StateMap::const_iterator mapIter;
133 output << mapIter->first <<
"=" << std::string(mapIter->second ?
"true" :
"false") <<
" ";
138 output <<
"Inputs:" << std::endl <<
" ";
139 StateVector::const_iterator state;
149 output <<
"Outputs:" << std::endl <<
" ";
159 output <<
"Fields: " << std::endl;
160 Fields::FieldVector::const_iterator field;
169 output <<
"Evalcases: " << std::endl;
170 EvalCaseVector::const_iterator ecp;
178 output <<
"; " <<
"Dist. dep.: " << std::string(evalCase.
isDistDependent() ?
"true" :
"false");
182 if (responseTime < 100000)
185 output <<
"; " <<
"Resp. time: " << responseTime <<
" us";
190 output <<
"; " <<
"Resp. time: " << (
UINT32)(responseTime / 1000) <<
" ms";
193 output <<
"; " <<
"Res. neg.: " << std::string(evalCase.
isResultNegation() ?
"true" :
"false") << std::endl;
202 UINT8 isInfringed = 0;
205 EvalCaseVector::const_iterator evalIter;
210 for (i = 0; i < results.
size(); ++i)
216 isInfringed = results[i].m_eCaseResult;
228 Fields::FieldVector::const_iterator fieldIter;
std::string toString() const
Text output for debugging.
const FieldDescription::FieldType getFieldType() const
void setFields(const Fields &fields)
StateVector m_outputStates
void setMeasurementList(const MeasurementList &m_measurementList)
const UINT16 getFieldNumber() const
const std::string & getCaseName() const
const std::string & getFieldName() const
void setStateMap(const StateMap &stateMap)
static std::string fieldTypeToString(FieldType type)
void setLastKnownInfringementState(CaseResult lastKnownInfringementState)
UINT8 getOutputNumber() const
const EvalCases & getEvalCases() const
double getBlankingSize() const
bool isDistDependent() const
UINT16 getFieldNumber() const
UINT32 getResponseTime() const
std::vector< Measurement > m_list
EvaluationStrategy getStrategy() const
std::map< std::string, bool > StateMap
const EvalCaseVector & getEvalCases() const
FieldParameter::CaseResult isFieldInfringed(const SensorStateInfo &sensorStateInfo, const FieldParameter &field, const EvalCaseResults &results)
void setInputStates(const StateVector &m_inputStates)
UINT8 getCaseNumber() const
const StateVector & getInputStates() const
void setLastKnownEvalCaseResults(const EvalCaseResults &evalCaseResults)
const Fields & getFields() const
const StateVector & getOutputStates() const
MeasurementList m_measurementList
e.g. temperature
const StateMap & getStateMap() const
std::vector< IOState > StateVector
const MeasurementList & getMeasurementList() const
static std::string strategyToString(EvaluationStrategy strategy)
void setEvalCases(const EvalCases &evalCases)
bool isResultNegation() const
std::string toString() const
const Polygon2D & getPolygon() const
const UINT32 getUsedMemory() const
const FieldVector & getFields() const
static std::string ioStateToString(IOState state)
StateVector m_inputStates
virtual ~SensorStateInfo()
void setOutputStates(const StateVector &m_outputStates)