| THM1176InstrumentManager 1.2 Qt Object abstraction for Metrolab THM1176

Loading...
Searching...
No Matches
CTHM1176InstrumentManager.h
Go to the documentation of this file.
1// Copyright (c) 2020 Metrolab Technology S.A., Geneva, Switzerland (www.metrolab.com)
2// See the included file LICENSE.txt for the licensing conditions.
3
7
145
146#pragma once
147
148#include "THM1176InstrumentManagerTypes.h"
149
150#if (THM1176_INSTRUMENT_TYPE_IS_VISA)
151 #include "VISAInstrument.h"
152 #define THM1176_RSRC_MGR_CLS CVISAResourceManager
153 #define THM1176_INSTR_CLS CVISAInstrument
154 #define THM1176_RSRC_FILTER "USB[0-9]*::0x1BFA::0x0498::[0-9]+::INSTR"
155 #include "VISAInstrument.h"
156#elif (THM1176_INSTRUMENT_TYPE_IS_USBTMC)
157 #include "USBTMCInstrument.h"
158 #define THM1176_RSRC_MGR_CLS CUSBTMCResourceManager
159 #define THM1176_INSTR_CLS CUSBTMCInstrument
160 #define THM1176_RSRC_FILTER "7162:1176"
161 #include "USBTMCInstrument.h"
162#else
163 #error "One of THM1176_INSTRUMENT_TYPE_IS_VISA or ..._USBTMC must be defined"
164#endif
165
166#include <QtCore/QThread>
167#include <QtCore/QTimer>
168#include <QtCore/QString>
169#include <QtCore/QDateTime>
170
171 using namespace MTL;
172 using namespace MTL::Instrument;
173 using namespace MTL::Instrument::THM1176Types;
174
175//----------------------------------------------------------------------//
176// Type definitions //
177//----------------------------------------------------------------------//
178 namespace MTL
179{
180Q_NAMESPACE
181Q_ENUM_NS(eTHM1176OperatingMode)
182Q_ENUM_NS(eTHM1176Units)
183}
184
185//----------------------------------------------------------------------//
186// Qt meta-type declarations //
187//----------------------------------------------------------------------//
188Q_DECLARE_METATYPE(eTHM1176Units)
189Q_DECLARE_METATYPE(eTHM1176OperatingMode)
190Q_DECLARE_METATYPE(eCommunicationFormat)
191
192Q_DECLARE_METATYPE(tResourceName)
193
194Q_DECLARE_METATYPE(sIdentifier)
195Q_DECLARE_METATYPE(sArbitraryMeasurements)
196Q_DECLARE_METATYPE(CMeasurement)
197
198Q_DECLARE_METATYPE(CResourceList)
199Q_DECLARE_METATYPE(CFluxList)
200Q_DECLARE_METATYPE(CTHM1176UnitsList)
201Q_DECLARE_METATYPE(CDivisorList)
202Q_DECLARE_METATYPE(CErrorList)
203
204Q_DECLARE_METATYPE(sAveraging<uParm>)
205Q_DECLARE_METATYPE(sAveraging<sBoundedParm>)
206Q_DECLARE_METATYPE(sInputTrigger<uParm>)
207Q_DECLARE_METATYPE(sInputTrigger<sBoundedParm>)
208Q_DECLARE_METATYPE(sRange<uParm>)
209Q_DECLARE_METATYPE(sRange<sBoundedParm>)
210
211//----------------------------------------------------------------------//
212// Qt meta-type declarations //
213//----------------------------------------------------------------------//
214Q_DECLARE_METATYPE(THM1176_INSTR_CLS *)
215Q_DECLARE_METATYPE(THM1176_RSRC_MGR_CLS *)
216
217 namespace MTL
218{
226 class CTHM1176InstrumentScanner : public QObject
227{
228 Q_OBJECT
229
230 private:
231 //----------------------------------------------------------------------//
232 // THM1176 Instrument Scanner constants //
233 //----------------------------------------------------------------------//
234 static const U32 THM1176_SCAN_INTERVAL = 1000; // ms
235
236 //----------------------------------------------------------------------//
237 // THM1176 Instrument Scanner class variables //
238 //----------------------------------------------------------------------//
239 int m_TimerID;
240 CResourceList m_InstrumentList;
241 THM1176_RSRC_MGR_CLS * m_pResourceManager;
242
243 //----------------------------------------------------------------------//
244 // THM1176 Instrument Scanner private methods //
245 //----------------------------------------------------------------------//
246 void timerEvent (QTimerEvent * Event) override;
247 void HandleError (QString Description,
248 QString Context);
249
250 public:
251 //----------------------------------------------------------------------//
252 // THM1176 Instrument Scanner constructor / destructor //
253 //----------------------------------------------------------------------//
255 CTHM1176InstrumentScanner (void) :
256 m_pResourceManager(nullptr)
257 { }
258
259 ~CTHM1176InstrumentScanner (void) override
260 { }
261
262 public slots:
263 //----------------------------------------------------------------------//
264 // THM1176 Instrument Scanner slots //
265 //----------------------------------------------------------------------//
268 void Start (THM1176_RSRC_MGR_CLS * pResourceManager);
270 void Stop (void);
271
272signals:
273 //----------------------------------------------------------------------//
274 // THM1176 Instrument Scanner signals //
275 //----------------------------------------------------------------------//
278 void UpdateInstrumentList (CResourceList InstrumentList);
281 void UpdateErrorList (CErrorList ErrorList);
282
283}; // CTHM1176InstrumentScanner
284
285
292 class CTHM1176InstrumentController : public QObject
293{
294 Q_OBJECT
295
296 private:
297 //----------------------------------------------------------------------//
298 // THM1176 Instrument Controller constants //
299 //----------------------------------------------------------------------//
300 static constexpr U32 THM1176_CONNECT_TIMEOUT = 5000; // ms
301 static constexpr F32 MU0 = 1.256637061436E-6f; // Magnetic permeability of vacuum
302
303 //----------------------------------------------------------------------//
304 // THM1176 Instrument Controller class variables //
305 //----------------------------------------------------------------------//
306 // Connection
307 THM1176_RSRC_MGR_CLS * m_pResourceManager;
308 CTHM1176Instrument<THM1176_INSTR_CLS, THM1176_RSRC_MGR_CLS> *
309 m_pTHM1176;
310 CResourceList m_InstrumentList;
311 tResourceName m_CurrentInstrument;
312
313 // Instrument information and parameter bounds:
314 sIdentifier m_Identification;
315 CFluxList m_RangeList;
316 CTHM1176UnitsList m_UnitsList;
317 CDivisorList m_DivisorList;
318 sAveraging<sBoundedParm> m_AveragingParmBounds;
319 sInputTrigger<sBoundedParm> m_TriggerParmBounds;
320 sRange<sBoundedParm> m_RangeParmBounds;
321
322 // Parameters
323 sAveraging<uParm> m_AveragingParms;
324 sInputTrigger<uParm> m_TriggerParms;
325 sArbitraryMeasurements m_OutputSelect;
326 bool m_SleepParm;
327 eTHM1176Units m_Units;
328 sRange<uParm> m_RangeParms;
329 eCommunicationFormat m_CommFormat;
330
331 // Control parameters
332 eTHM1176OperatingMode m_OperatingMode;
333 U16 m_TriggerCount;
334 int m_TimerID;
335 bool m_CalibrationOverride;
336
337 //----------------------------------------------------------------------//
338 // THM1176 Instrument Controller private methods //
339 //----------------------------------------------------------------------//
340 void HandleError (QString Description,
341 QString Context);
342 void ClearInstrumentInfo (void);
343 void GetInstrumentInfo (std::string Context);
344 void GetInstrumentParameters (std::string Context);
345 void MakeUnitsList (std::string Context);
346 void GetCurrentUnits (std::string Context);
347 void TranslateUnits (CMeasurement & Measurement,
348 eUnits Units);
349 void PublishInstrumentInfo (void);
350 void PublishInstrumentParameters (void);
351 void timerEvent (QTimerEvent * Event) override;
352
353 public:
354 //----------------------------------------------------------------------//
355 // THM1176 Instrument Controller constructor / destructor //
356 //----------------------------------------------------------------------//
358 CTHM1176InstrumentController (void) :
359 m_pResourceManager(nullptr),
360 m_pTHM1176(nullptr),
361 m_SleepParm(false),
362 m_Units(kT),
363 m_CommFormat(kComFormatAscii),
364 m_OperatingMode(kTHM1176NotConnected),
365 m_TriggerCount(0),
366 m_TimerID(0),
367 m_CalibrationOverride(false)
368 {
369 m_AveragingParmBounds.clear();
370 m_TriggerParmBounds.clear();
371 m_RangeParmBounds.clear();
372
373 m_AveragingParms.clear();
374 m_TriggerParms.clear();
375 m_OutputSelect.clear();
376 m_RangeParms.clear();
377 }
378
380 ~CTHM1176InstrumentController (void) override
381 { }
382
383 public slots:
384 //----------------------------------------------------------------------//
385 // THM1176 Instrument Controller slots //
386 //----------------------------------------------------------------------//
387 // Startup and shutdown.
390 void Start (THM1176_RSRC_MGR_CLS * pResourceManager);
391
393 void Stop (void);
394
395 // Connection
398 void UpdateInstrumentList (CResourceList InstrumentList);
399
402 void SetCurrentInstrument (tResourceName CurrentInstrument);
403
404 // Instrument control
407 void SetOperatingMode (eTHM1176OperatingMode OperatingMode);
408
410 void SendTrigger (void);
411
412 // Parameters
415 void SetAveragingParms (sAveraging<uParm> AveragingParms);
416
419 void SetTriggerParms (sInputTrigger<uParm> TriggerParms);
420
423 void SetOutputSelect (sArbitraryMeasurements OutputSelect);
424
427 void SetSleepParm (bool SleepParm);
428
431 void SetUnits (eTHM1176Units Units);
432
435 void SetRangeParms (sRange<uParm> RangeParms);
436
439 void SetCommFormat (eCommunicationFormat CommFormat);
440
444 void SetCalibrationOverride (bool Override);
445
446signals:
447 //----------------------------------------------------------------------//
448 // THM1176 Instrument Controller signals //
449 //----------------------------------------------------------------------//
450 // Basic instrument control:
453 void UpdateCurrentInstrument (tResourceName CurrentInstrument);
454
457 void UpdateInstrumentPointer (CTHM1176Instrument<THM1176_INSTR_CLS, THM1176_RSRC_MGR_CLS> * pTHM1176);
458
461 void UpdateOperatingMode (eTHM1176OperatingMode OperatingMode);
462
465 void UpdateMeasurement (CMeasurement Measurement);
466
469 void UpdateErrorList (CErrorList LatestErrors);
470
471 // Instrument information and parameter bounds:
474 void UpdateIdentification (sIdentifier Identification);
475
478 void UpdateRangeList (CFluxList RangeList);
479
482 void UpdateUnitsList (CTHM1176UnitsList UnitsList);
483
486 void UpdateDivisorList (CDivisorList DivisorList);
487
490 void UpdateAveragingParmBounds (sAveraging<sBoundedParm> AveragingParmBounds);
491
494 void UpdateTriggerParmBounds (sInputTrigger<sBoundedParm> TriggerParmBounds);
495
498 void UpdateRangeParmBounds (sRange<sBoundedParm> RangeParmBounds);
499
500 // Parameters
503 void UpdateAveragingParms (sAveraging<uParm> AveragingParms);
504
507 void UpdateTriggerParms (sInputTrigger<uParm> TriggerParms);
508
511 void UpdateOutputSelect (sArbitraryMeasurements OutputSelect);
512
515 void UpdateSleepParm (bool SleepParm);
516
519 void UpdateUnits (eTHM1176Units Units);
520
523 void UpdateRangeParms (sRange<uParm> RangeParms);
524
527 void UpdateCommFormat (eCommunicationFormat CommFormat);
528
529}; // CTHM1176InstrumentController
530
531
538 class CTHM1176InstrumentManager : public QObject
539{
540 Q_OBJECT
541
542 //----------------------------------------------------------------------//
543 // THM1176 Instrument Manager properties //
544 //----------------------------------------------------------------------//
545 // Basic instrument control:
547 Q_PROPERTY(CResourceList InstrumentList READ GetInstrumentList NOTIFY NotifyInstrumentList)
549 Q_PROPERTY(tResourceName CurrentInstrument READ GetCurrentInstrument WRITE SetCurrentInstrument NOTIFY NotifyCurrentInstrument)
551 Q_PROPERTY(eTHM1176OperatingMode OperatingMode READ GetOperatingMode WRITE SetOperatingMode NOTIFY NotifyOperatingMode)
553 Q_PROPERTY(CMeasurement Measurement READ GetMeasurement NOTIFY NotifyMeasurement)
555 Q_PROPERTY(CErrorList ErrorList READ GetErrorList NOTIFY NotifyErrorList)
556
557 // Instrument information and parameter bounds:
559 Q_PROPERTY(sIdentifier Identification READ GetIdentification NOTIFY NotifyIdentification)
561 Q_PROPERTY(CFluxList RangeList READ GetRangeList NOTIFY NotifyRangeList)
563 Q_PROPERTY(CTHM1176UnitsList UnitsList READ GetUnitsList NOTIFY NotifyUnitsList)
565 Q_PROPERTY(CDivisorList DivisorList READ GetDivisorList NOTIFY NotifyDivisorList)
567 Q_PROPERTY(sAveraging<sBoundedParm> AveragingParmBounds READ GetAveragingParmBounds NOTIFY NotifyAveragingParmBounds)
569 Q_PROPERTY(sInputTrigger<sBoundedParm> TriggerParmBounds READ GetTriggerParmBounds NOTIFY NotifyTriggerParmBounds)
571 Q_PROPERTY(sRange<sBoundedParm> RangeParmBounds READ GetRangeParmBounds NOTIFY NotifyRangeParmBounds)
572
573 // Parameters:
575 Q_PROPERTY(sAveraging<uParm> AveragingParms READ GetAveragingParms WRITE SetAveragingParms NOTIFY NotifyAveragingParms)
577 Q_PROPERTY(sInputTrigger<uParm> TriggerParms READ GetTriggerParms WRITE SetTriggerParms NOTIFY NotifyTriggerParms)
579 Q_PROPERTY(sArbitraryMeasurements OutputSelect READ GetOutputSelect WRITE SetOutputSelect NOTIFY NotifyOutputSelect)
581 Q_PROPERTY(bool SleepParm READ GetSleepParm WRITE SetSleepParm NOTIFY NotifySleepParm)
583 Q_PROPERTY(eTHM1176Units Units READ GetUnits WRITE SetUnits NOTIFY NotifyUnits)
585 Q_PROPERTY(sRange<uParm> RangeParms READ GetRangeParms WRITE SetRangeParms NOTIFY NotifyRangeParms)
587 Q_PROPERTY(eCommunicationFormat CommFormat READ GetCommFormat WRITE SetCommFormat NOTIFY NotifyCommFormat)
588
589private:
590 //----------------------------------------------------------------------//
591 // THM1176 Instrument Manager constants //
592 //----------------------------------------------------------------------//
593 static const U8 THM1176_MIN_VERSION_WITH_ABORTREAD = 4;
594
595 //----------------------------------------------------------------------//
596 // THM1176 Instrument Manager class variables - properties //
597 //----------------------------------------------------------------------//
598 // Basic instrument control:
599 CResourceList m_InstrumentList;
600 tResourceName m_CurrentInstrument;
601 eTHM1176OperatingMode m_OperatingMode;
602 CMeasurement m_Measurement;
603 CErrorList m_ErrorList;
604
605 // Instrument information and parameter bounds:
606 sIdentifier m_Identification;
607 CFluxList m_RangeList;
608 CTHM1176UnitsList m_UnitsList;
609 CDivisorList m_DivisorList;
610 sAveraging<sBoundedParm> m_AveragingParmBounds;
611 sInputTrigger<sBoundedParm> m_TriggerParmBounds;
612 sRange<sBoundedParm> m_RangeParmBounds;
613
614 // Parameters:
615 sAveraging<uParm> m_AveragingParms;
616 sInputTrigger<uParm> m_TriggerParms;
617 sArbitraryMeasurements m_OutputSelect;
618 bool m_SleepParm;
619 eTHM1176Units m_Units;
620 sRange<uParm> m_RangeParms;
621 eCommunicationFormat m_CommFormat;
622
623 //----------------------------------------------------------------------//
624 // THM1176 Instrument Manager class variables - other //
625 //----------------------------------------------------------------------//
626 // Instrument Controller
627 CTHM1176InstrumentController* m_pInstrumentController;
628 QThread m_InstrumentControlThread;
629
630 // Instrument Scanner
631 CTHM1176InstrumentScanner* m_pInstrumentScanner;
632 QThread m_InstrumentScanThread;
633
634 // Instrument connection
635 THM1176_RSRC_MGR_CLS * m_pResourceManager;
636 CTHM1176Instrument<THM1176_INSTR_CLS, THM1176_RSRC_MGR_CLS> *
637 m_pTHM1176;
638
639 //----------------------------------------------------------------------//
640 // THM1176 Instrument Manager private methods //
641 //----------------------------------------------------------------------//
642 void HandleError (QString Description, QString Context);
643
644public:
645 //----------------------------------------------------------------------//
646 // THM1176 Instrument Manager public constants //
647 //----------------------------------------------------------------------//
648 static const I32 THM1176_INST_MGR_ERROR = 5000;
649 static const I32 THM1176_INST_CTLR_ERROR = 5001;
650 static const I32 THM1176_INST_SCANNER_ERROR = 5002;
651
652 //----------------------------------------------------------------------//
653 // THM1176 Instrument Manager constructor / destructor //
654 //----------------------------------------------------------------------//
656 CTHM1176InstrumentManager (void) :
657 m_OperatingMode(kTHM1176NotConnected),
658 m_SleepParm(false),
659 m_Units(kT),
660 m_CommFormat(kComFormatAscii),
661 m_pInstrumentController(nullptr),
662 m_pInstrumentScanner(nullptr),
663 m_pTHM1176(nullptr)
664 {
665
666 qRegisterMetaType<eTHM1176Units>();
667 qRegisterMetaType<eTHM1176OperatingMode>();
668 qRegisterMetaType<eCommunicationFormat>();
669
670 qRegisterMetaType<tResourceName>();
671
672 qRegisterMetaType<sIdentifier>();
673 qRegisterMetaType<sArbitraryMeasurements>();
674 qRegisterMetaType<CMeasurement>();
675
676 qRegisterMetaType<CResourceList>();
677 qRegisterMetaType<CFluxList>();
678 qRegisterMetaType<CTHM1176UnitsList>();
679 qRegisterMetaType<CDivisorList>();
680 qRegisterMetaType<CErrorList>();
681
682 qRegisterMetaType<sAveraging<uParm>>();
683 qRegisterMetaType<sAveraging<sBoundedParm>>();
684 qRegisterMetaType<sInputTrigger<uParm>>();
685 qRegisterMetaType<sInputTrigger<sBoundedParm>>();
686 qRegisterMetaType<sRange<uParm>>();
687 qRegisterMetaType<sRange<sBoundedParm>>();
688
689 // Meta-types to be passed internally.
690 qRegisterMetaType<THM1176_RSRC_MGR_CLS *>();
691
692 }
693
695 ~CTHM1176InstrumentManager (void)
696 { }
697
698 //----------------------------------------------------------------------//
699 // THM1176 Instrument Manager property Get methods //
700 //----------------------------------------------------------------------//
701 // Basic instrument control:
704 CResourceList GetInstrumentList (void);
705
708 tResourceName GetCurrentInstrument (void);
709
712 eTHM1176OperatingMode GetOperatingMode (void);
713
716 bool GetIsTHMNullptr (void);
717
720 CMeasurement GetMeasurement (void);
721
724 CErrorList GetErrorList (void);
725
726 // Instrument information and parameter bounds:
729 sIdentifier GetIdentification (void);
730
733 CFluxList GetRangeList (void);
734
737 CTHM1176UnitsList GetUnitsList (void);
738
741 CDivisorList GetDivisorList (void);
742
745 sAveraging<sBoundedParm> GetAveragingParmBounds (void);
746
749 sInputTrigger<sBoundedParm> GetTriggerParmBounds (void);
750
753 sRange<sBoundedParm> GetRangeParmBounds (void);
754
755 // Parameters:
758 sAveraging<uParm> GetAveragingParms (void);
759
762 sInputTrigger<uParm> GetTriggerParms (void);
763
766 sArbitraryMeasurements GetOutputSelect (void);
767
770 bool GetSleepParm (void);
771
774 eTHM1176Units GetUnits (void);
775
778 sRange<uParm> GetRangeParms (void);
779
782 eCommunicationFormat GetCommFormat (void);
783
788 bool GetImmediateMeasurementPeriod(const sAveraging<uParm> & rAvg, F64 & rPeriod);
789
794 inline bool ConvertTimestamp (const U64 RawTimestamp, CAbsoluteTimestamp & rTimestamp)
795 {
796 if (m_pTHM1176 == nullptr)
797 {
798 HandleError("Instrument not connected", __func__);
799 return false;
800 }
801 else
802 {
803 return m_pTHM1176->ConvertTimestamp(RawTimestamp, rTimestamp);
804 }
805 }; // CTHM1176InstrumentManager::ConvertTimestamp
806
811 bool ReadInformationDates (QDateTime & rManufacturingDate, QDateTime & rCalibrationDate);
812
813
814 public slots:
815 //----------------------------------------------------------------------//
816 // THM1176 Instrument Manager property Set methods //
817 //----------------------------------------------------------------------//
818 // Basic instrument control:
821 void SetCurrentInstrument (tResourceName CurrentInstrument);
822
825 void SetOperatingMode (eTHM1176OperatingMode OperatingMode);
826
827 // Parameters:
830 void SetAveragingParms (sAveraging<uParm> AveragingParms);
831
834 void SetTriggerParms (sInputTrigger<uParm> TriggerParms);
835
838 void SetOutputSelect (sArbitraryMeasurements OutputSelect);
839
842 void SetSleepParm (bool SleepParm);
843
846 void SetUnits (eTHM1176Units Units);
847
850 void SetRangeParms (sRange<uParm> RangeParms);
851
854 void SetCommFormat (eCommunicationFormat CommFormat);
855
856 private slots:
857 //----------------------------------------------------------------------//
858 // THM1176 Instrument Manager communication with Instrument Scanner //
859 //----------------------------------------------------------------------//
860 void UpdateInstrumentList (CResourceList InstrumentList);
861
862 //----------------------------------------------------------------------//
863 // THM1176 Instrument Manager communication with Instrument Controller //
864 //----------------------------------------------------------------------//
865 // Basic instrument control:
866 void UpdateCurrentInstrument (tResourceName CurrentInstrument);
867 void UpdateInstrumentPointer (CTHM1176Instrument<THM1176_INSTR_CLS, THM1176_RSRC_MGR_CLS> * pTHM1176);
868 void UpdateOperatingMode (eTHM1176OperatingMode OperatingMode);
869 void UpdateMeasurement (CMeasurement Measurement);
870 void UpdateErrorList (CErrorList ErrorList);
871
872 // Instrument information and parameter bounds:
873 void UpdateIdentification (sIdentifier Identification);
874 void UpdateRangeList (CFluxList RangeList);
875 void UpdateUnitsList (CTHM1176UnitsList UnitsList);
876 void UpdateDivisorList (CDivisorList DivisorList);
877 void UpdateAveragingParmBounds (sAveraging<sBoundedParm> AveragingParmBounds);
878 void UpdateTriggerParmBounds (sInputTrigger<sBoundedParm> TriggerParmBounds);
879 void UpdateRangeParmBounds (sRange<sBoundedParm> RangeParmBounds);
880
881 // Parameters
882 void UpdateAveragingParms (sAveraging<uParm> AveragingParms);
883 void UpdateTriggerParms (sInputTrigger<uParm> TriggerParms);
884 void UpdateOutputSelect (sArbitraryMeasurements OutputSelect);
885 void UpdateSleepParm (bool SleepParm);
886 void UpdateUnits (eTHM1176Units Units);
887 void UpdateRangeParms (sRange<uParm> RangeParms);
888 void UpdateCommFormat (eCommunicationFormat CommFormat);
889
890 public slots:
891 //----------------------------------------------------------------------//
892 // THM1176 Instrument Manager slots //
893 //----------------------------------------------------------------------//
894 // Startup and shutdown:
896 void Start (void);
897
899 void Stop (void);
900
901signals:
902 //----------------------------------------------------------------------//
903 // THM1176 Instrument Manager instrument control signals //
904 //----------------------------------------------------------------------//
910 void SendTrigger (void);
911
919 void SetCalibrationOverride (bool Override);
920
921
922 //----------------------------------------------------------------------//
923 // THM1176 Instrument Manager property change notifications //
924 //----------------------------------------------------------------------//
925 // Basic instrument control:
928 void NotifyInstrumentList (CResourceList InstrumentList);
929
932 void NotifyCurrentInstrument (tResourceName CurrentInstrument);
933
936 void NotifyOperatingMode (eTHM1176OperatingMode OperatingMode);
937
940 void NotifyMeasurement (CMeasurement Measurement);
941
944 void NotifyErrorList (CErrorList ErrorList);
945
946 // Instrument information and parameter bounds:
949 void NotifyIdentification (sIdentifier Identification);
950
953 void NotifyRangeList (CFluxList RangeList);
954
957 void NotifyUnitsList (CTHM1176UnitsList UnitsList);
958
961 void NotifyDivisorList (CDivisorList DivisorList);
962
965 void NotifyAveragingParmBounds (sAveraging<sBoundedParm> AveragingParmBounds);
966
969 void NotifyTriggerParmBounds (sInputTrigger<sBoundedParm> TriggerParmBounds);
970
973 void NotifyRangeParmBounds (sRange<sBoundedParm> RangeParmBounds);
974
975 // Parameters:
978 void NotifyAveragingParms (sAveraging<uParm> AveragingParms);
979
982 void NotifyTriggerParms (sInputTrigger<uParm> TriggerParms);
983
986 void NotifyOutputSelect (sArbitraryMeasurements OutputSelect);
987
990 void NotifySleepParm (bool SleepParm);
991
994 void NotifyUnits (eTHM1176Units Units);
995
998 void NotifyRangeParms (sRange<uParm> RangeParms);
999
1002 void NotifyCommFormat (eCommunicationFormat CommFormat);
1003
1004 //----------------------------------------------------------------------//
1005 // THM1176 Instrument Manager internal signals //
1006 //----------------------------------------------------------------------//
1009 void StartInstrumentScanner (THM1176_RSRC_MGR_CLS * pResourceManager);
1010
1012 void StopInstrumentScanner (void);
1013
1016 void StartInstrumentController (THM1176_RSRC_MGR_CLS * pResourceManager);
1017
1019 void StopInstrumentController (void);
1020
1021 //----------------------------------------------------------------------//
1022 // THM1176 Instrument Manager communication with Instrument Controller //
1023 //----------------------------------------------------------------------//
1024 // Basic instrument control:
1027 void RelayCurrentInstrument (tResourceName CurrentInstrument);
1028
1031 void RelayOperatingMode (eTHM1176OperatingMode OperatingMode);
1032
1033 // Parameters
1036 void RelayAveragingParms (sAveraging<uParm> AveragingParms);
1037
1040 void RelayTriggerParms (sInputTrigger<uParm> TriggerParms);
1041
1044 void RelayOutputSelect (sArbitraryMeasurements OutputSelect);
1045
1048 void RelaySleepParm (bool SleepParm);
1049
1052 void RelayUnits (eTHM1176Units Units);
1053
1056 void RelayRangeParms (sRange<uParm> RangeParms);
1057
1060 void RelayCommFormat (eCommunicationFormat CommFormat);
1061
1062}; // CTHM1176InstrumentManager
1063
1064} // namespace MTL
U64
unsigned long long U64
64-bit unsigned integer.
Definition OSDefines.h:32
U8
unsigned char U8
Unsigned byte.
Definition OSDefines.h:29
F32
float F32
32-bit floating-point number.
Definition OSDefines.h:33
I32
int I32
32-bit signed integer.
Definition OSDefines.h:27
U32
unsigned int U32
32-bit unsigned integer.
Definition OSDefines.h:31
F64
double F64
64-bit floating-point number.
Definition OSDefines.h:34
U16
unsigned short U16
16-bit unsigned integer.
Definition OSDefines.h:30
THM1176InstrumentManagerTypes.h
Type definitions for THM1176 Instrument Manager.
USBTMCInstrument.h
USBTMC driver based on libusb: interface definition.
VISAInstrument.h
C++ wrapper for NI-VISA: interface definition.
MTL::CMeasurement
Data returned for one measurement.
Definition THM1176InstrumentManagerTypes.h:51
MTL::CTHM1176InstrumentController
THM1176 Instrument Controller class: communicate with instrument.
Definition CTHM1176InstrumentManager.h:293
MTL::CTHM1176InstrumentController::UpdateOutputSelect
void UpdateOutputSelect(sArbitraryMeasurements OutputSelect)
Signal a change of the output selection parameters.
MTL::CTHM1176InstrumentController::SendTrigger
void SendTrigger(void)
Send a bus trigger.
Definition CTHM1176InstrumentManager.cpp:636
MTL::CTHM1176InstrumentController::UpdateIdentification
void UpdateIdentification(sIdentifier Identification)
Signal to report identifier information for newly connected instrument.
MTL::CTHM1176InstrumentController::~CTHM1176InstrumentController
~CTHM1176InstrumentController(void) override
Destructor.
Definition CTHM1176InstrumentManager.h:380
MTL::CTHM1176InstrumentController::UpdateCurrentInstrument
void UpdateCurrentInstrument(tResourceName CurrentInstrument)
Signal that current instrument selection has changed.
MTL::CTHM1176InstrumentController::UpdateAveragingParms
void UpdateAveragingParms(sAveraging< uParm > AveragingParms)
Signal a change of the averaging parameters.
MTL::CTHM1176InstrumentController::UpdateErrorList
void UpdateErrorList(CErrorList LatestErrors)
Signal that new errors have been reported.
MTL::CTHM1176InstrumentController::UpdateRangeParms
void UpdateRangeParms(sRange< uParm > RangeParms)
Signal a change of the range parameters.
MTL::CTHM1176InstrumentController::UpdateUnitsList
void UpdateUnitsList(CTHM1176UnitsList UnitsList)
Signal to report list of valid measurement units for newly connected instrument.
MTL::CTHM1176InstrumentController::UpdateRangeList
void UpdateRangeList(CFluxList RangeList)
Signal to report list of valid ranges for newly connected instrument.
MTL::CTHM1176InstrumentController::SetCommFormat
void SetCommFormat(eCommunicationFormat CommFormat)
Set communication format.
Definition CTHM1176InstrumentManager.cpp:1007
MTL::CTHM1176InstrumentController::UpdateRangeParmBounds
void UpdateRangeParmBounds(sRange< sBoundedParm > RangeParmBounds)
Signal to report bounds of range parameters for newly connected instrument.
MTL::CTHM1176InstrumentController::UpdateInstrumentList
void UpdateInstrumentList(CResourceList InstrumentList)
Update the Instrument Controller's copy of the list of detected instruments.
Definition CTHM1176InstrumentManager.cpp:278
MTL::CTHM1176InstrumentController::UpdateUnits
void UpdateUnits(eTHM1176Units Units)
Signal a change of the measurement units.
MTL::CTHM1176InstrumentController::SetAveragingParms
void SetAveragingParms(sAveraging< uParm > AveragingParms)
Set the averaging parameters.
Definition CTHM1176InstrumentManager.cpp:847
MTL::CTHM1176InstrumentController::SetUnits
void SetUnits(eTHM1176Units Units)
Select the measurement units.
Definition CTHM1176InstrumentManager.cpp:947
MTL::CTHM1176InstrumentController::SetOutputSelect
void SetOutputSelect(sArbitraryMeasurements OutputSelect)
Select what data is returned.
Definition CTHM1176InstrumentManager.cpp:915
MTL::CTHM1176InstrumentController::UpdateTriggerParms
void UpdateTriggerParms(sInputTrigger< uParm > TriggerParms)
Signal a change of the trigger parameters.
MTL::CTHM1176InstrumentController::UpdateDivisorList
void UpdateDivisorList(CDivisorList DivisorList)
Signal to report divisors associated with valid measurement units for newly connected instrument.
MTL::CTHM1176InstrumentController::UpdateAveragingParmBounds
void UpdateAveragingParmBounds(sAveraging< sBoundedParm > AveragingParmBounds)
Signal to report bounds of averaging parameters for newly connected instrument.
MTL::CTHM1176InstrumentController::CTHM1176InstrumentController
CTHM1176InstrumentController(void)
Constructor.
Definition CTHM1176InstrumentManager.h:358
MTL::CTHM1176InstrumentController::Stop
void Stop(void)
Shut down the Instrument Controller.
Definition CTHM1176InstrumentManager.cpp:119
MTL::CTHM1176InstrumentController::UpdateMeasurement
void UpdateMeasurement(CMeasurement Measurement)
Signal that a new measurement is available.
MTL::CTHM1176InstrumentController::Start
void Start(THM1176_RSRC_MGR_CLS *pResourceManager)
Initialize the Instrument Controller.
Definition CTHM1176InstrumentManager.cpp:113
MTL::CTHM1176InstrumentController::SetOperatingMode
void SetOperatingMode(eTHM1176OperatingMode OperatingMode)
Set operating mode.
Definition CTHM1176InstrumentManager.cpp:410
MTL::CTHM1176InstrumentController::UpdateSleepParm
void UpdateSleepParm(bool SleepParm)
Signal a change of the sleep parameter.
MTL::CTHM1176InstrumentController::UpdateOperatingMode
void UpdateOperatingMode(eTHM1176OperatingMode OperatingMode)
Signal that the operating mode has changed.
MTL::CTHM1176InstrumentController::UpdateTriggerParmBounds
void UpdateTriggerParmBounds(sInputTrigger< sBoundedParm > TriggerParmBounds)
Signal to report bounds of trigger parameters for newly connected instrument.
MTL::CTHM1176InstrumentController::SetCurrentInstrument
void SetCurrentInstrument(tResourceName CurrentInstrument)
Select the instrument to connect to.
Definition CTHM1176InstrumentManager.cpp:311
MTL::CTHM1176InstrumentController::UpdateCommFormat
void UpdateCommFormat(eCommunicationFormat CommFormat)
Signal a change of the communication format.
MTL::CTHM1176InstrumentController::SetTriggerParms
void SetTriggerParms(sInputTrigger< uParm > TriggerParms)
Set the trigger parameters.
Definition CTHM1176InstrumentManager.cpp:881
MTL::CTHM1176InstrumentController::UpdateInstrumentPointer
void UpdateInstrumentPointer(CTHM1176Instrument< THM1176_INSTR_CLS, THM1176_RSRC_MGR_CLS > *pTHM1176)
Signal to broadcast updated pointer to THM1176 Instrument object.
MTL::CTHM1176InstrumentController::SetRangeParms
void SetRangeParms(sRange< uParm > RangeParms)
Set range parameters.
Definition CTHM1176InstrumentManager.cpp:988
MTL::CTHM1176InstrumentController::SetCalibrationOverride
void SetCalibrationOverride(bool Override)
Set whether or not to override the check for instruments whose zero offset should not be calibrated.
Definition CTHM1176InstrumentManager.cpp:1026
MTL::CTHM1176InstrumentController::SetSleepParm
void SetSleepParm(bool SleepParm)
Set whether or not the instrument sleeps after each measurement.
Definition CTHM1176InstrumentManager.cpp:928
MTL::CTHM1176InstrumentManager::SetAveragingParms
void SetAveragingParms(sAveraging< uParm > AveragingParms)
Set the averaging parameters.
Definition CTHM1176InstrumentManager.cpp:1670
MTL::CTHM1176InstrumentManager::GetErrorList
CErrorList GetErrorList(void)
Get the current error list.
Definition CTHM1176InstrumentManager.cpp:1461
MTL::CTHM1176InstrumentManager::RelayOperatingMode
void RelayOperatingMode(eTHM1176OperatingMode OperatingMode)
Internal signal to relay the operating mode selection to the Instrument Controller.
MTL::CTHM1176InstrumentManager::GetOutputSelect
sArbitraryMeasurements GetOutputSelect(void)
Get the output selection parameters.
Definition CTHM1176InstrumentManager.cpp:1543
MTL::CTHM1176InstrumentManager::AveragingParmBounds
sAveraging< sBoundedParm > AveragingParmBounds
Bounds on averaging parameter.
Definition CTHM1176InstrumentManager.h:567
MTL::CTHM1176InstrumentManager::ReadInformationDates
bool ReadInformationDates(QDateTime &rManufacturingDate, QDateTime &rCalibrationDate)
Fetch the intrument's date information.
Definition CTHM1176InstrumentManager.cpp:1596
MTL::CTHM1176InstrumentManager::THM1176_INST_MGR_ERROR
static const I32 THM1176_INST_MGR_ERROR
Additional error code: Instrument Manager Error.
Definition CTHM1176InstrumentManager.h:648
MTL::CTHM1176InstrumentManager::Units
eTHM1176Units Units
Current measurement units.
Definition CTHM1176InstrumentManager.h:583
MTL::CTHM1176InstrumentManager::SetSleepParm
void SetSleepParm(bool SleepParm)
Set the sleep parameter.
Definition CTHM1176InstrumentManager.cpp:1751
MTL::CTHM1176InstrumentManager::GetUnits
eTHM1176Units GetUnits(void)
Get the measurement units.
Definition CTHM1176InstrumentManager.cpp:1559
MTL::CTHM1176InstrumentManager::GetOperatingMode
eTHM1176OperatingMode GetOperatingMode(void)
Get the current operating mode.
Definition CTHM1176InstrumentManager.cpp:1439
MTL::CTHM1176InstrumentManager::GetTriggerParmBounds
sInputTrigger< sBoundedParm > GetTriggerParmBounds(void)
Get the bounds on trigger parameters.
Definition CTHM1176InstrumentManager.cpp:1509
MTL::CTHM1176InstrumentManager::CTHM1176InstrumentManager
CTHM1176InstrumentManager(void)
Constructor.
Definition CTHM1176InstrumentManager.h:656
MTL::CTHM1176InstrumentManager::RelayTriggerParms
void RelayTriggerParms(sInputTrigger< uParm > TriggerParms)
Internal signal to relay the trigger parameters to the Instrument Controller.
MTL::CTHM1176InstrumentManager::SetOutputSelect
void SetOutputSelect(sArbitraryMeasurements OutputSelect)
Set the output selection parameters.
Definition CTHM1176InstrumentManager.cpp:1725
MTL::CTHM1176InstrumentManager::SleepParm
bool SleepParm
Sleep parameter: true if instrument should sleep after each measurement.
Definition CTHM1176InstrumentManager.h:581
MTL::CTHM1176InstrumentManager::RangeParms
sRange< uParm > RangeParms
Current range parameters.
Definition CTHM1176InstrumentManager.h:585
MTL::CTHM1176InstrumentManager::GetUnitsList
CTHM1176UnitsList GetUnitsList(void)
Get the list of valid measurement units for this instrument model.
Definition CTHM1176InstrumentManager.cpp:1485
MTL::CTHM1176InstrumentManager::GetMeasurement
CMeasurement GetMeasurement(void)
Get the last set of measurements.
Definition CTHM1176InstrumentManager.cpp:1453
MTL::CTHM1176InstrumentManager::GetTriggerParms
sInputTrigger< uParm > GetTriggerParms(void)
Get the trigger parameters.
Definition CTHM1176InstrumentManager.cpp:1535
MTL::CTHM1176InstrumentManager::NotifyTriggerParmBounds
void NotifyTriggerParmBounds(sInputTrigger< sBoundedParm > TriggerParmBounds)
Notify that the bounds on trigger parameters have changed.
MTL::CTHM1176InstrumentManager::THM1176_INST_CTLR_ERROR
static const I32 THM1176_INST_CTLR_ERROR
Additional error code: Instrument Controller Error.
Definition CTHM1176InstrumentManager.h:649
MTL::CTHM1176InstrumentManager::RangeList
CFluxList RangeList
List of valid ranges for this instrument model.
Definition CTHM1176InstrumentManager.h:561
MTL::CTHM1176InstrumentManager::ConvertTimestamp
bool ConvertTimestamp(const U64 RawTimestamp, CAbsoluteTimestamp &rTimestamp)
Convert a raw timestamp to UNIX Epoch time and nanoseconds.
Definition CTHM1176InstrumentManager.h:794
MTL::CTHM1176InstrumentManager::GetCommFormat
eCommunicationFormat GetCommFormat(void)
Get the communication format parameters.
Definition CTHM1176InstrumentManager.cpp:1575
MTL::CTHM1176InstrumentManager::RelayCurrentInstrument
void RelayCurrentInstrument(tResourceName CurrentInstrument)
Internal signal to relay the instrument selection to the Instrument Controller.
MTL::CTHM1176InstrumentManager::NotifyAveragingParmBounds
void NotifyAveragingParmBounds(sAveraging< sBoundedParm > AveragingParmBounds)
Notify that the bounds on averaging parameters have changed.
MTL::CTHM1176InstrumentManager::DivisorList
CDivisorList DivisorList
List of divisors for each measurement unit for this instrument model, to convert "base" units to the ...
Definition CTHM1176InstrumentManager.h:565
MTL::CTHM1176InstrumentManager::NotifyAveragingParms
void NotifyAveragingParms(sAveraging< uParm > AveragingParms)
Notify that the averaging parameters have changed.
MTL::CTHM1176InstrumentManager::TriggerParmBounds
sInputTrigger< sBoundedParm > TriggerParmBounds
Bounds on trigger parameters.
Definition CTHM1176InstrumentManager.h:569
MTL::CTHM1176InstrumentManager::GetIsTHMNullptr
bool GetIsTHMNullptr(void)
Get the test result of m_pTHM1176 pointer is Nullptr.
Definition CTHM1176InstrumentManager.cpp:1445
MTL::CTHM1176InstrumentManager::NotifyUnits
void NotifyUnits(eTHM1176Units Units)
Notify that the measurement units have changed.
MTL::CTHM1176InstrumentManager::GetAveragingParms
sAveraging< uParm > GetAveragingParms(void)
Get the averaging parameters.
Definition CTHM1176InstrumentManager.cpp:1527
MTL::CTHM1176InstrumentManager::NotifyCurrentInstrument
void NotifyCurrentInstrument(tResourceName CurrentInstrument)
Notify that the currently connected instrument has changed.
MTL::CTHM1176InstrumentManager::NotifySleepParm
void NotifySleepParm(bool SleepParm)
Notify that the sleep parameter has changed.
MTL::CTHM1176InstrumentManager::NotifyUnitsList
void NotifyUnitsList(CTHM1176UnitsList UnitsList)
Notify that the list of valid measurement units has changed.
MTL::CTHM1176InstrumentManager::NotifyRangeParms
void NotifyRangeParms(sRange< uParm > RangeParms)
Notify that the range parameters have changed.
MTL::CTHM1176InstrumentManager::GetImmediateMeasurementPeriod
bool GetImmediateMeasurementPeriod(const sAveraging< uParm > &rAvg, F64 &rPeriod)
Get measurement interval for Immediate Trigger, for a given averaging parameter.
Definition CTHM1176InstrumentManager.cpp:1583
MTL::CTHM1176InstrumentManager::SetCalibrationOverride
void SetCalibrationOverride(bool Override)
Set whether or not to override the check for instruments whose zero offset should not be calibrated.
MTL::CTHM1176InstrumentManager::GetIdentification
sIdentifier GetIdentification(void)
Get the current instrument's identification information.
Definition CTHM1176InstrumentManager.cpp:1469
MTL::CTHM1176InstrumentManager::NotifyDivisorList
void NotifyDivisorList(CDivisorList DivisorList)
Notify that the list of divisors associated with each measurement unit for this instrument model has ...
MTL::CTHM1176InstrumentManager::SendTrigger
void SendTrigger(void)
Send a bus trigger to the instrument (both slot and signal).
MTL::CTHM1176InstrumentManager::RelayAveragingParms
void RelayAveragingParms(sAveraging< uParm > AveragingParms)
Internal signal to relay the averaging parameters to the Instrument Controller.
MTL::CTHM1176InstrumentManager::RelayUnits
void RelayUnits(eTHM1176Units Units)
Internal signal to relay the measurement units to the Instrument Controller.
MTL::CTHM1176InstrumentManager::RelayOutputSelect
void RelayOutputSelect(sArbitraryMeasurements OutputSelect)
Internal signal to relay the output selection parameters to the Instrument Controller.
MTL::CTHM1176InstrumentManager::NotifyCommFormat
void NotifyCommFormat(eCommunicationFormat CommFormat)
Notify that the communication format parameters have changed.
MTL::CTHM1176InstrumentManager::OutputSelect
sArbitraryMeasurements OutputSelect
Output selection parameters: select what data elements are returned.
Definition CTHM1176InstrumentManager.h:579
MTL::CTHM1176InstrumentManager::Measurement
CMeasurement Measurement
Last measurement set returned.
Definition CTHM1176InstrumentManager.h:553
MTL::CTHM1176InstrumentManager::RangeParmBounds
sRange< sBoundedParm > RangeParmBounds
Bounds on range parameters.
Definition CTHM1176InstrumentManager.h:571
MTL::CTHM1176InstrumentManager::THM1176_INST_SCANNER_ERROR
static const I32 THM1176_INST_SCANNER_ERROR
Additional error code: Instrument Scanner Error.
Definition CTHM1176InstrumentManager.h:650
MTL::CTHM1176InstrumentManager::SetRangeParms
void SetRangeParms(sRange< uParm > RangeParms)
Set the range parameters.
Definition CTHM1176InstrumentManager.cpp:1798
MTL::CTHM1176InstrumentManager::NotifyMeasurement
void NotifyMeasurement(CMeasurement Measurement)
Notify that a new set of measurements is available.
MTL::CTHM1176InstrumentManager::GetSleepParm
bool GetSleepParm(void)
Get the sleep parameter.
Definition CTHM1176InstrumentManager.cpp:1551
MTL::CTHM1176InstrumentManager::SetOperatingMode
void SetOperatingMode(eTHM1176OperatingMode OperatingMode)
Set a new operating mode, for example to start measuring.
Definition CTHM1176InstrumentManager.cpp:1650
MTL::CTHM1176InstrumentManager::NotifyTriggerParms
void NotifyTriggerParms(sInputTrigger< uParm > TriggerParms)
Notify that the trigger parameters have changed.
MTL::CTHM1176InstrumentManager::StopInstrumentController
void StopInstrumentController(void)
Internal signal to stop the Instrument Controller.
MTL::CTHM1176InstrumentManager::StopInstrumentScanner
void StopInstrumentScanner(void)
Internal signal to stop the Instrument Scanner.
MTL::CTHM1176InstrumentManager::NotifyInstrumentList
void NotifyInstrumentList(CResourceList InstrumentList)
Notify that the list of detected instruments has changed.
MTL::CTHM1176InstrumentManager::GetInstrumentList
CResourceList GetInstrumentList(void)
Get the list of connected instruments.
Definition CTHM1176InstrumentManager.cpp:1427
MTL::CTHM1176InstrumentManager::RelayCommFormat
void RelayCommFormat(eCommunicationFormat CommFormat)
Internal signal to relay the communications format to the Instrument Controller.
MTL::CTHM1176InstrumentManager::SetTriggerParms
void SetTriggerParms(sInputTrigger< uParm > TriggerParms)
Set the trigger parameters.
Definition CTHM1176InstrumentManager.cpp:1696
MTL::CTHM1176InstrumentManager::CurrentInstrument
tResourceName CurrentInstrument
Currently connected instrument.
Definition CTHM1176InstrumentManager.h:549
MTL::CTHM1176InstrumentManager::~CTHM1176InstrumentManager
~CTHM1176InstrumentManager(void)
Destructor.
Definition CTHM1176InstrumentManager.h:695
MTL::CTHM1176InstrumentManager::Identification
sIdentifier Identification
Identification information of currently connected instrument.
Definition CTHM1176InstrumentManager.h:559
MTL::CTHM1176InstrumentManager::InstrumentList
CResourceList InstrumentList
List of detected instruments.
Definition CTHM1176InstrumentManager.h:547
MTL::CTHM1176InstrumentManager::ErrorList
CErrorList ErrorList
Current error list.
Definition CTHM1176InstrumentManager.h:555
MTL::CTHM1176InstrumentManager::StartInstrumentScanner
void StartInstrumentScanner(THM1176_RSRC_MGR_CLS *pResourceManager)
Internal signal to start the Instrument Scanner.
MTL::CTHM1176InstrumentManager::SetCommFormat
void SetCommFormat(eCommunicationFormat CommFormat)
Set the communication format parameters.
Definition CTHM1176InstrumentManager.cpp:1830
MTL::CTHM1176InstrumentManager::StartInstrumentController
void StartInstrumentController(THM1176_RSRC_MGR_CLS *pResourceManager)
Internal signal to start to Instrument Controller.
MTL::CTHM1176InstrumentManager::NotifyRangeParmBounds
void NotifyRangeParmBounds(sRange< sBoundedParm > RangeParmBounds)
Notify that the bounds on range parameters have changed.
MTL::CTHM1176InstrumentManager::GetCurrentInstrument
tResourceName GetCurrentInstrument(void)
Get VISA resource name of currently connected instrument.
Definition CTHM1176InstrumentManager.cpp:1433
MTL::CTHM1176InstrumentManager::NotifyOperatingMode
void NotifyOperatingMode(eTHM1176OperatingMode OperatingMode)
Notify that the operating mode has changed.
MTL::CTHM1176InstrumentManager::NotifyErrorList
void NotifyErrorList(CErrorList ErrorList)
Notify that new errors are present.
MTL::CTHM1176InstrumentManager::Start
void Start(void)
Initialize the THM1176 Instrument Manager.
Definition CTHM1176InstrumentManager.cpp:1056
MTL::CTHM1176InstrumentManager::RelaySleepParm
void RelaySleepParm(bool SleepParm)
Internal signal to relay the sleep parameter to the Instrument Controller.
MTL::CTHM1176InstrumentManager::NotifyRangeList
void NotifyRangeList(CFluxList RangeList)
Notify that the list of valid ranges has changed.
MTL::CTHM1176InstrumentManager::Stop
void Stop(void)
Shut down the THM1176 Instrument Manager.
Definition CTHM1176InstrumentManager.cpp:1181
MTL::CTHM1176InstrumentManager::CommFormat
eCommunicationFormat CommFormat
Current communication format parameter.
Definition CTHM1176InstrumentManager.h:587
MTL::CTHM1176InstrumentManager::RelayRangeParms
void RelayRangeParms(sRange< uParm > RangeParms)
Internal signal to relay the range parameters to the Instrument Controller.
MTL::CTHM1176InstrumentManager::GetRangeParms
sRange< uParm > GetRangeParms(void)
Get the range parameters.
Definition CTHM1176InstrumentManager.cpp:1567
MTL::CTHM1176InstrumentManager::AveragingParms
sAveraging< uParm > AveragingParms
Current averaging parameters.
Definition CTHM1176InstrumentManager.h:575
MTL::CTHM1176InstrumentManager::GetRangeParmBounds
sRange< sBoundedParm > GetRangeParmBounds(void)
Get the bounds on range parameters.
Definition CTHM1176InstrumentManager.cpp:1517
MTL::CTHM1176InstrumentManager::SetCurrentInstrument
void SetCurrentInstrument(tResourceName CurrentInstrument)
Connect a new instrument.
Definition CTHM1176InstrumentManager.cpp:1626
MTL::CTHM1176InstrumentManager::GetAveragingParmBounds
sAveraging< sBoundedParm > GetAveragingParmBounds(void)
Get the bounds on averaging parameters.
Definition CTHM1176InstrumentManager.cpp:1501
MTL::CTHM1176InstrumentManager::GetDivisorList
CDivisorList GetDivisorList(void)
Get the list of divisors associated with each measurement unit for this instrument model.
Definition CTHM1176InstrumentManager.cpp:1493
MTL::CTHM1176InstrumentManager::GetRangeList
CFluxList GetRangeList(void)
Get list of valid ranges for this instrument model.
Definition CTHM1176InstrumentManager.cpp:1477
MTL::CTHM1176InstrumentManager::NotifyIdentification
void NotifyIdentification(sIdentifier Identification)
Notify that the instrument identification information has changed.
MTL::CTHM1176InstrumentManager::NotifyOutputSelect
void NotifyOutputSelect(sArbitraryMeasurements OutputSelect)
Notify that the output selection parameters have changed.
MTL::CTHM1176InstrumentManager::TriggerParms
sInputTrigger< uParm > TriggerParms
Current trigger parameters.
Definition CTHM1176InstrumentManager.h:577
MTL::CTHM1176InstrumentManager::OperatingMode
eTHM1176OperatingMode OperatingMode
Current operating mode.
Definition CTHM1176InstrumentManager.h:551
MTL::CTHM1176InstrumentManager::UnitsList
CTHM1176UnitsList UnitsList
List of valid measurement units for this instrument model.
Definition CTHM1176InstrumentManager.h:563
MTL::CTHM1176InstrumentManager::SetUnits
void SetUnits(eTHM1176Units Units)
Set the measurement units.
Definition CTHM1176InstrumentManager.cpp:1770
MTL::CTHM1176InstrumentScanner
THM1176 Instrument Scanner class: scan for connected instruments.
Definition CTHM1176InstrumentManager.h:227
MTL::CTHM1176InstrumentScanner::UpdateErrorList
void UpdateErrorList(CErrorList ErrorList)
An update to the error list is available.
MTL::CTHM1176InstrumentScanner::~CTHM1176InstrumentScanner
~CTHM1176InstrumentScanner(void) override
Destructor.
Definition CTHM1176InstrumentManager.h:259
MTL::CTHM1176InstrumentScanner::Stop
void Stop(void)
Shut down THM1176 Instrument Scanner.
Definition CTHM1176InstrumentManager.cpp:46
MTL::CTHM1176InstrumentScanner::CTHM1176InstrumentScanner
CTHM1176InstrumentScanner(void)
Constructor.
Definition CTHM1176InstrumentManager.h:255
MTL::CTHM1176InstrumentScanner::Start
void Start(THM1176_RSRC_MGR_CLS *pResourceManager)
Initialize THM1176 Instrument Scanner.
Definition CTHM1176InstrumentManager.cpp:39
MTL::CTHM1176InstrumentScanner::UpdateInstrumentList
void UpdateInstrumentList(CResourceList InstrumentList)
An update to the instrument list is available.
MTL::CTHM1176UnitsList
List of measurement units.
Definition THM1176InstrumentManagerTypes.h:46
MTL::Instrument::CResourceList
List of VISA resource names.
Definition IEEE488InstrumentTypes.h:26
MTL::Instrument::CTHM1176Instrument
THM1176 instrument class.
Definition THM1176.h:98
MTL::Instrument::THM1176Types::CAbsoluteTimestamp
Timestamp for a measurement.
Definition THM1176Types.h:551
MTL::Instrument::THM1176Types::CDivisorList
List of divisors, one per measurement unit.
Definition THM1176Types.h:203
MTL::Instrument::THM1176Types::CErrorList
List of errors returned by the instrument.
Definition THM1176Types.h:232
MTL::Instrument::THM1176Types::CFluxList
List of flux density values.
Definition THM1176Types.h:170
MTL::Instrument::THM1176Types
Definition THM1176TypeConversions.h:20
MTL::Instrument::THM1176Types::uParm
DataType uParm
Parameter template, with only current value.
Definition THM1176Types.h:294
MTL::Instrument::THM1176Types::eCommunicationFormat
eCommunicationFormat
Enumeration of possible formats for returned data.
Definition THM1176Types.h:466
MTL::Instrument::THM1176Types::kComFormatAscii
@ kComFormatAscii
Human-legible text.
Definition THM1176Types.h:467
MTL::Instrument::THM1176Types::eUnits
eUnits
Enumeration of possible measurement units.
Definition THM1176Types.h:182
MTL::Instrument
Definition THM1176.h:74
MTL::Instrument::tResourceName
std::string tResourceName
IEEE488 resource name.
Definition IEEE488InstrumentTypes.h:22
MTL
Definition CTHM1176InstrumentManager.h:179
MTL::eTHM1176OperatingMode
eTHM1176OperatingMode
Operating modes used to initiate actions or provide status.
Definition THM1176InstrumentManagerTypes.h:17
MTL::kTHM1176NotConnected
@ kTHM1176NotConnected
Disconnect instrument.
Definition THM1176InstrumentManagerTypes.h:18
MTL::eTHM1176Units
eTHM1176Units
Enumeration of possible measurement units, including "ADC".
Definition THM1176InstrumentManagerTypes.h:29
MTL::kT
@ kT
Tesla.
Definition THM1176InstrumentManagerTypes.h:30
MTL::Instrument::THM1176Types::sArbitraryMeasurements
Specify the measurement data to be returned.
Definition THM1176Types.h:593
MTL::Instrument::THM1176Types::sAveraging
Averaging parameter.
Definition THM1176Types.h:388
MTL::Instrument::THM1176Types::sBoundedParm
Parameter template, with current/min/max/default values.
Definition THM1176Types.h:246
MTL::Instrument::THM1176Types::sIdentifier
Instrument's identification string - parsed version.
Definition THM1176Types.h:353
MTL::Instrument::THM1176Types::sInputTrigger
Input trigger parameter.
Definition THM1176Types.h:426
MTL::Instrument::THM1176Types::sRange
Measurement range parameter.
Definition THM1176Types.h:479