43 : Label(lbl), UniqueID(id), Interface(itf)
51 return (UniqueID.empty() && eConnectionInterface::kUnknown == Interface);
95 {
return ( Baudrate == other.
Baudrate &&
113 : InstrumentConnection(), Type(
eInstrumentType::kUnknown), SerialNumber(
""), Description(
""), CalibrationDate(
"")
119 : AcquisitionPeriod(DPqNaN)
127 : SerialNumber(
""), Description(
""), FCAFwVersion(0)
136 : ProbeNumber(0), FreqMin(DPqNaN), FreqMax(DPqNaN)
160 NormalizationDate(
""),
169 {
return ProbeList.size(); }
172 Type= eProbeArrayType::kUnknown;
173 SerialNumber.clear();
175 NormalizationDate.clear();
178 FreqCentral = DPqNaN;
205 : SelectionMode(SelMode), ProbeNumber(PrbNb)
236 : State(St), SearchProgress(SPR)
244 kRemoteBusyLedMeasuring,
245 kRemoteBusyLedOffEndMeas,
247 kRemoteBusyLedBlinkSlow,
248 kRemoteBusyLedBlinkFast
254 : Freq(DPqNaN), StdDev(SPqNaN)
263 : ProbeNumber(0), Freq(DPqNaN), NbValidMeasurements(0), StdDev(SPqNaN)
300 : Level(
eErrorLevel::kError), Code(0), Description(
""), Source(
"")
303 : Level(Lvl), Code(Cde), Description(Dsc), Source(Src)
310 : AngleSensorAvailable(false), Angle(SPqNaN)
327 sLogMessage(
const eLogLevel & rLevel,
const std::string & rContext,
const std::string & rMessage,
const std::string & rLocation)
328 : Level(rLevel), Context(rContext), Message(rMessage), Location(rLocation)
338 std::ostringstream l_ss;
339 for (
auto l_i = rInsList.begin(); l_i != rInsList.end(); l_i++)
341 l_ss << l_Dump(*l_i);
347 std::ostringstream l_ss;
348 l_ss << rInsConnection.
Label <<
"(" << rInsConnection.
UniqueID <<
")";
349 l_ss << ( rInsConnection.
Interface == eConnectionInterface::kUSB ?
" (USB)" :
350 rInsConnection.
Interface == eConnectionInterface::kEthernet ?
" (Eth)" :
351 rInsConnection.
Interface == eConnectionInterface::kSerial ?
" (Serial)" :
"(Unkn)") << std::endl;
356 std::ostringstream l_ss;
357 l_ss <<
"Baudrate: " << (
unsigned long)rSerialSett.
Baudrate <<
" | ";
358 l_ss <<
"DataBits: " << (
unsigned long)rSerialSett.
DataBits <<
" | ";
359 l_ss <<
"Parity: " << ((rSerialSett.
Parity == eSerialParity::kNone) ?
"None" :
360 (rSerialSett.
Parity == eSerialParity::kOdd) ?
"Odd" :
361 (rSerialSett.
Parity == eSerialParity::kEven) ?
"Even" :
"") <<
" | ";
362 l_ss <<
"StopBits: " << ((rSerialSett.
StopBits == eSerialStopBits::k1) ?
"1" :
363 (rSerialSett.
StopBits == eSerialStopBits::k2) ?
"2" :
"") <<
" | ";
364 l_ss <<
"Handshake: " << ((rSerialSett.
Handshake == eSerialHandshake::kNone) ?
"None" :
365 (rSerialSett.
Handshake == eSerialHandshake::kXonXoff) ?
"XonXoff" :
366 (rSerialSett.
Handshake == eSerialHandshake::kHardware) ?
"Hardware" :
"") << std::endl;
371 std::ostringstream l_ss;
372 l_ss <<
"Instrument Information: Type: " << ((rInsInfo.
Type == eInstrumentType::kMFC3045) ?
"MFC3045" :
373 (rInsInfo.
Type == eInstrumentType::kPT2026) ?
"PT2026" :
" ") <<
" | ";
374 l_ss <<
"Serial Number: " << rInsInfo.
SerialNumber <<
" | ";
379 l_ss <<
"Description: " << rInsInfo.
Description << std::endl;
384 std::ostringstream l_ss;
390 std::ostringstream l_ss;
391 l_ss <<
"Serial Number: " << rPAInfo.
SerialNumber << std::endl;
392 l_ss <<
"Description: " << rPAInfo.
Description << std::endl;
394 l_ss <<
"FreqMin: " << rPAInfo.
FreqMin << std::endl;
395 l_ss <<
"FreqMax: " << rPAInfo.
FreqMax << std::endl;
396 l_ss <<
"FreqCentral: " << rPAInfo.
FreqCentral << std::endl;
397 l_ss <<
"GyroRatio: " << rPAInfo.
GyroRatio << std::endl;
398 l_ss <<
"ProbeList: (No. probes = " << rPAInfo.
NbProbes() <<
")" << std::endl;
401 l_ss <<
" " << (
unsigned int)l_it->ProbeNumber <<
" | " << l_it->FreqMin <<
" -> " << l_it->FreqMax << std::endl;
407 std::ostringstream l_ss;
409 l_ss <<
"Angle: " << rPAAngle.
Angle << std::endl;
411 l_ss <<
"No PA angle sensor" << std::endl;
416 std::ostringstream l_ss;
417 l_ss <<
"OperatingMode: " << ( rInsState.
OperatingMode == eOperatingMode::kIdle ?
"Idle" :
418 rInsState.
OperatingMode == eOperatingMode::kSearch ?
"Search" :
420 l_ss <<
"RepeatMode: " << ( rInsState.
RepeatMode == eRepeatMode::kSingle ?
"Single" :
421 rInsState.
RepeatMode == eRepeatMode::kContinuous ?
"Continuous" :
"") << std::endl;
423 l_ss <<
"Probe Array selected" << std::endl;
426 l_ss <<
"FreqMin: " << rInsState.
FreqMin << std::endl;
427 l_ss <<
"FreqMax: " << rInsState.
FreqMax << std::endl;
433 std::ostringstream l_ss;
434 l_ss <<
"State: " << ( rInsStatus.
State == eInstrumentState::kWaitingForPA ?
"WaitingForPA" :
435 rInsStatus.
State == eInstrumentState::kReady ?
"Ready" :
436 rInsStatus.
State == eInstrumentState::kSearching ?
"Searching" :
437 rInsStatus.
State == eInstrumentState::kMeasuring ?
"Measuring" :
"") <<
" | ";
438 l_ss <<
"SearchProgress: " << (
unsigned int)rInsStatus.
SearchProgress << std::endl;
443 std::ostringstream l_ss;
444 l_ss <<
"Frequency: " << rSearchResult.
Freq <<
" | ";
445 l_ss <<
"StdDev: " << rSearchResult.
StdDev << std::endl;
450 std::ostringstream l_ss;
451 l_ss <<
"Timestamp: " << rMeasResult.
Timestamp << std::endl;
453 l_ss <<
" ProbeNo.: " << (
unsigned int)l_it->ProbeNumber <<
" Freq: " << l_it->Freq <<
" Nb.Valid: " << (
unsigned int)l_it->NbValidMeasurements <<
" SDev: " << l_it->StdDev << std::endl;
458 std::ostringstream l_ss;
459 l_ss <<
"Date: " << rDateTime << std::endl;
464 std::ostringstream l_ss;
465 l_ss << ( rNormalization.
Access == eNormalizationAccess::kReadRAM ?
"ReadRAM Access" :
466 rNormalization.
Access == eNormalizationAccess::kReadROM ?
"ReadROM Access" :
467 rNormalization.
Access == eNormalizationAccess::kWriteRAM ?
"WriteRAM Access" :
468 rNormalization.
Access == eNormalizationAccess::kWriteROM ?
"WriteROM Access" :
"") << std::endl;
469 for (
auto l_it = rNormalization.
Table.begin(); l_it != rNormalization.
Table.end(); l_it++)
470 l_ss << *l_it << std::endl;
476 std::ostringstream l_ss;
477 l_ss << ( rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedOff ?
"Remote busy led off" :
478 rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedMeasuring ?
"Remote busy led on when measuring" :
479 rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedOffEndMeas ?
"Remote busy led clears after measuring" :
480 rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedOn ?
"Remote busy led on" :
481 rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedBlinkSlow ?
"Remote busy led blink slow" :
482 rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedBlinkFast ?
"Remote busy led blink fast" :
"") << std::endl;
487 std::ostringstream l_ss;
488 l_ss <<
"Error : " << ( rError.
Level == eErrorLevel::kFatal ?
"Fatal " :
489 rError.
Level == eErrorLevel::kError ?
"Error " :
490 rError.
Level == eErrorLevel::kWarning ?
"Warning " :
"");
496 std::ostringstream l_ss;
497 l_ss <<
"Level: " << ( rLogMessage.
Level == eLogLevel::kCritical ?
"Critical" :
498 rLogMessage.
Level == eLogLevel::kDebug ?
"Debug" :
499 rLogMessage.
Level == eLogLevel::kInfo ?
"Info" :
500 rLogMessage.
Level == eLogLevel::kWarning ?
"Warning" :
"") << std::endl;
501 l_ss <<
"Context: " << rLogMessage.
Context << std::endl;
502 l_ss <<
"Message: \"" << rLogMessage.
Message <<
"\"" << std::endl;
503 l_ss <<
"@ " << rLogMessage.
Location << std::endl;
586 : oInstrumentList(rCatalog.vInstrumentList),
587 cInstrumentCurrent(rCatalog.vInstrumentCurrent),
588 cMFC3045SerialPortSettings(rCatalog.vMFC3045SerialPortSettings),
589 oInstrumentInformation(rCatalog.vInstrumentInformation),
590 oInstrumentConfiguration(rCatalog.vInstrumentConfiguration),
591 oProbeArrayInformation(rCatalog.vProbeArrayInformation),
592 oProbeArrayAngle(rCatalog.vProbeArrayAngle),
593 cInstrumentState(rCatalog.vInstrumentState),
594 oInstrumentStatus(rCatalog.vInstrumentStatus),
595 oRemoteBoxTriggerEvent(rCatalog.vRemoteBoxTriggerEvent),
596 cRemoteBoxBusyLedState(rCatalog.vRemoteBoxBusyLedState),
597 oSearchResult(rCatalog.vSearchResult),
598 oMeasurementResults(rCatalog.vMeasurementResults),
599 cNormalizationRequest(rCatalog.vNormalizationRequest),
600 oNormalizationReturned(rCatalog.vNormalizationReturned),
601 oError(rCatalog.vError),
602 oLogMessage(rCatalog.vLogMessage)
641 : cInstrumentList(rCatalog.vInstrumentList),
642 oInstrumentCurrent(rCatalog.vInstrumentCurrent),
643 oMFC3045SerialPortSettings(rCatalog.vMFC3045SerialPortSettings),
644 cInstrumentInformation(rCatalog.vInstrumentInformation),
645 cInstrumentConfiguration(rCatalog.vInstrumentConfiguration),
646 cProbeArrayInformation(rCatalog.vProbeArrayInformation),
647 cProbeArrayAngle(rCatalog.vProbeArrayAngle),
648 oInstrumentState(rCatalog.vInstrumentState),
649 cInstrumentStatus(rCatalog.vInstrumentStatus),
650 cRemoteBoxTriggerEvent(rCatalog.vRemoteBoxTriggerEvent),
651 oRemoteBoxBusyLedState(rCatalog.vRemoteBoxBusyLedState),
652 cSearchResult(rCatalog.vSearchResult),
653 cMeasurementResults(rCatalog.vMeasurementResults),
654 oNormalizationRequest(rCatalog.vNormalizationRequest),
655 cNormalizationReturned(rCatalog.vNormalizationReturned),
656 cError(rCatalog.vError),
657 cLogMessage(rCatalog.vLogMessage)