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)
294 static constexpr I32 WARNING_ERROR_CODE = 1;
295 static constexpr I32 UNDEFINED_ERROR_CODE = 0;
296 static constexpr I32 ERROR_CODE = -2;
297 static constexpr I32 FATAL_ERROR_CODE = -1;
304 : Level(
eErrorLevel::kError), Code(UNDEFINED_ERROR_CODE), Description(
""), Source(
"")
307 : Level(Lvl), Code(Cde), Description(Dsc), Source(Src)
314 : AngleSensorAvailable(false), Angle(SPqNaN)
331 sLogMessage(
const eLogLevel & rLevel,
const std::string & rContext,
const std::string & rMessage,
const std::string & rLocation)
332 : Level(rLevel), Context(rContext), Message(rMessage), Location(rLocation)
342 std::ostringstream l_ss;
343 for (
auto l_i = rInsList.begin(); l_i != rInsList.end(); l_i++)
345 l_ss << l_Dump(*l_i);
351 std::ostringstream l_ss;
352 l_ss << rInsConnection.
Label <<
"(" << rInsConnection.
UniqueID <<
")";
353 l_ss << ( rInsConnection.
Interface == eConnectionInterface::kUSB ?
" (USB)" :
354 rInsConnection.
Interface == eConnectionInterface::kEthernet ?
" (Eth)" :
355 rInsConnection.
Interface == eConnectionInterface::kSerial ?
" (Serial)" :
"(Unkn)") << std::endl;
360 std::ostringstream l_ss;
361 l_ss <<
"Baudrate: " << (
unsigned long)rSerialSett.
Baudrate <<
" | ";
362 l_ss <<
"DataBits: " << (
unsigned long)rSerialSett.
DataBits <<
" | ";
363 l_ss <<
"Parity: " << ((rSerialSett.
Parity == eSerialParity::kNone) ?
"None" :
364 (rSerialSett.
Parity == eSerialParity::kOdd) ?
"Odd" :
365 (rSerialSett.
Parity == eSerialParity::kEven) ?
"Even" :
"") <<
" | ";
366 l_ss <<
"StopBits: " << ((rSerialSett.
StopBits == eSerialStopBits::k1) ?
"1" :
367 (rSerialSett.
StopBits == eSerialStopBits::k2) ?
"2" :
"") <<
" | ";
368 l_ss <<
"Handshake: " << ((rSerialSett.
Handshake == eSerialHandshake::kNone) ?
"None" :
369 (rSerialSett.
Handshake == eSerialHandshake::kXonXoff) ?
"XonXoff" :
370 (rSerialSett.
Handshake == eSerialHandshake::kHardware) ?
"Hardware" :
"") << std::endl;
375 std::ostringstream l_ss;
376 l_ss <<
"Instrument Information: Type: " << ((rInsInfo.
Type == eInstrumentType::kMFC3045) ?
"MFC3045" :
377 (rInsInfo.
Type == eInstrumentType::kPT2026) ?
"PT2026" :
" ") <<
" | ";
378 l_ss <<
"Serial Number: " << rInsInfo.
SerialNumber <<
" | ";
383 l_ss <<
"Description: " << rInsInfo.
Description << std::endl;
388 std::ostringstream l_ss;
394 std::ostringstream l_ss;
395 l_ss <<
"Serial Number: " << rPAInfo.
SerialNumber << std::endl;
396 l_ss <<
"Description: " << rPAInfo.
Description << std::endl;
398 l_ss <<
"FreqMin: " << rPAInfo.
FreqMin << std::endl;
399 l_ss <<
"FreqMax: " << rPAInfo.
FreqMax << std::endl;
400 l_ss <<
"FreqCentral: " << rPAInfo.
FreqCentral << std::endl;
401 l_ss <<
"GyroRatio: " << rPAInfo.
GyroRatio << std::endl;
402 l_ss <<
"ProbeList: (No. probes = " << rPAInfo.
NbProbes() <<
")" << std::endl;
405 l_ss <<
" " << (
unsigned int)l_it->ProbeNumber <<
" | " << l_it->FreqMin <<
" -> " << l_it->FreqMax << std::endl;
411 std::ostringstream l_ss;
413 l_ss <<
"Angle: " << rPAAngle.
Angle << std::endl;
415 l_ss <<
"No PA angle sensor" << std::endl;
420 std::ostringstream l_ss;
421 l_ss <<
"OperatingMode: " << ( rInsState.
OperatingMode == eOperatingMode::kIdle ?
"Idle" :
422 rInsState.
OperatingMode == eOperatingMode::kSearch ?
"Search" :
424 l_ss <<
"RepeatMode: " << ( rInsState.
RepeatMode == eRepeatMode::kSingle ?
"Single" :
425 rInsState.
RepeatMode == eRepeatMode::kContinuous ?
"Continuous" :
"") << std::endl;
427 l_ss <<
"Probe Array selected" << std::endl;
430 l_ss <<
"FreqMin: " << rInsState.
FreqMin << std::endl;
431 l_ss <<
"FreqMax: " << rInsState.
FreqMax << std::endl;
437 std::ostringstream l_ss;
438 l_ss <<
"State: " << ( rInsStatus.
State == eInstrumentState::kWaitingForPA ?
"WaitingForPA" :
439 rInsStatus.
State == eInstrumentState::kReady ?
"Ready" :
440 rInsStatus.
State == eInstrumentState::kSearching ?
"Searching" :
441 rInsStatus.
State == eInstrumentState::kMeasuring ?
"Measuring" :
"") <<
" | ";
442 l_ss <<
"SearchProgress: " << (
unsigned int)rInsStatus.
SearchProgress << std::endl;
447 std::ostringstream l_ss;
448 l_ss <<
"Frequency: " << rSearchResult.
Freq <<
" | ";
449 l_ss <<
"StdDev: " << rSearchResult.
StdDev << std::endl;
454 std::ostringstream l_ss;
455 l_ss <<
"Timestamp: " << rMeasResult.
Timestamp << std::endl;
457 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;
462 std::ostringstream l_ss;
463 l_ss <<
"Date: " << rDateTime << std::endl;
468 std::ostringstream l_ss;
469 l_ss << ( rNormalization.
Access == eNormalizationAccess::kReadRAM ?
"ReadRAM Access" :
470 rNormalization.
Access == eNormalizationAccess::kReadROM ?
"ReadROM Access" :
471 rNormalization.
Access == eNormalizationAccess::kWriteRAM ?
"WriteRAM Access" :
472 rNormalization.
Access == eNormalizationAccess::kWriteROM ?
"WriteROM Access" :
"") << std::endl;
473 for (
auto l_it = rNormalization.
Table.begin(); l_it != rNormalization.
Table.end(); l_it++)
474 l_ss << *l_it << std::endl;
480 std::ostringstream l_ss;
481 l_ss << ( rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedOff ?
"Remote busy led off" :
482 rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedMeasuring ?
"Remote busy led on when measuring" :
483 rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedOffEndMeas ?
"Remote busy led clears after measuring" :
484 rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedOn ?
"Remote busy led on" :
485 rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedBlinkSlow ?
"Remote busy led blink slow" :
486 rRBBusyLedState == eRemoteBoxBusyLedState::kRemoteBusyLedBlinkFast ?
"Remote busy led blink fast" :
"") << std::endl;
491 std::ostringstream l_ss;
492 l_ss <<
"Error : " << ( rError.
Level == eErrorLevel::kFatal ?
"Fatal " :
493 rError.
Level == eErrorLevel::kError ?
"Error " :
494 rError.
Level == eErrorLevel::kWarning ?
"Warning " :
"");
500 std::ostringstream l_ss;
501 l_ss <<
"Level: " << ( rLogMessage.
Level == eLogLevel::kCritical ?
"Critical" :
502 rLogMessage.
Level == eLogLevel::kDebug ?
"Debug" :
503 rLogMessage.
Level == eLogLevel::kInfo ?
"Info" :
504 rLogMessage.
Level == eLogLevel::kWarning ?
"Warning" :
"") << std::endl;
505 l_ss <<
"Context: " << rLogMessage.
Context << std::endl;
506 l_ss <<
"Message: \"" << rLogMessage.
Message <<
"\"" << std::endl;
507 l_ss <<
"@ " << rLogMessage.
Location << std::endl;
590 : oInstrumentList(rCatalog.vInstrumentList),
591 cInstrumentCurrent(rCatalog.vInstrumentCurrent),
592 cMFC3045SerialPortSettings(rCatalog.vMFC3045SerialPortSettings),
593 oInstrumentInformation(rCatalog.vInstrumentInformation),
594 oInstrumentConfiguration(rCatalog.vInstrumentConfiguration),
595 oProbeArrayInformation(rCatalog.vProbeArrayInformation),
596 oProbeArrayAngle(rCatalog.vProbeArrayAngle),
597 cInstrumentState(rCatalog.vInstrumentState),
598 oInstrumentStatus(rCatalog.vInstrumentStatus),
599 oRemoteBoxTriggerEvent(rCatalog.vRemoteBoxTriggerEvent),
600 cRemoteBoxBusyLedState(rCatalog.vRemoteBoxBusyLedState),
601 oSearchResult(rCatalog.vSearchResult),
602 oMeasurementResults(rCatalog.vMeasurementResults),
603 cNormalizationRequest(rCatalog.vNormalizationRequest),
604 oNormalizationReturned(rCatalog.vNormalizationReturned),
605 oError(rCatalog.vError),
606 oLogMessage(rCatalog.vLogMessage)
645 : cInstrumentList(rCatalog.vInstrumentList),
646 oInstrumentCurrent(rCatalog.vInstrumentCurrent),
647 oMFC3045SerialPortSettings(rCatalog.vMFC3045SerialPortSettings),
648 cInstrumentInformation(rCatalog.vInstrumentInformation),
649 cInstrumentConfiguration(rCatalog.vInstrumentConfiguration),
650 cProbeArrayInformation(rCatalog.vProbeArrayInformation),
651 cProbeArrayAngle(rCatalog.vProbeArrayAngle),
652 oInstrumentState(rCatalog.vInstrumentState),
653 cInstrumentStatus(rCatalog.vInstrumentStatus),
654 cRemoteBoxTriggerEvent(rCatalog.vRemoteBoxTriggerEvent),
655 oRemoteBoxBusyLedState(rCatalog.vRemoteBoxBusyLedState),
656 cSearchResult(rCatalog.vSearchResult),
657 cMeasurementResults(rCatalog.vMeasurementResults),
658 oNormalizationRequest(rCatalog.vNormalizationRequest),
659 cNormalizationReturned(rCatalog.vNormalizationReturned),
660 cError(rCatalog.vError),
661 cLogMessage(rCatalog.vLogMessage)