| THM1176InstrumentManager 1.2 Qt Object abstraction for Metrolab THM1176

Loading...
Searching...
No Matches
THM1176InstrumentManagerTypes.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#pragma once
8
9#include "THM1176.h"
10#include <QtCore/QObject>
11
12 namespace MTL
13{
14
16 typedef enum
17{
18 kTHM1176NotConnected,
19 kTHM1176Reset,
20 kTHM1176Idle,
21 kTHM1176Measure,
22 kTHM1176MeasureContinuously,
23 kTHM1176CalibrateZeroOffset,
24 kTHM1176RestoreZeroOffset
25} eTHM1176OperatingMode;
26
28 typedef enum
29{
30 kT = MTL::Instrument::THM1176Types::kT,
31 kmT = MTL::Instrument::THM1176Types::kmT,
32 kuT = MTL::Instrument::THM1176Types::kuT,
33 knT = MTL::Instrument::THM1176Types::knT,
34 kGauss = MTL::Instrument::THM1176Types::kGauss,
35 kkGauss = MTL::Instrument::THM1176Types::kkGauss,
36 kmGauss = MTL::Instrument::THM1176Types::kmGauss,
37 kMHzp = MTL::Instrument::THM1176Types::kMHzp,
38 kApm,
39 kkApm,
40 kmApm,
41 kADC
42} eTHM1176Units;
43
45 class CTHM1176UnitsList : public std::vector<eTHM1176Units>
46{
47};
48
50 class CMeasurement
51{
52 public:
53 // Measurement data retrieved from Instrument Driver.
54 CFluxList Bx;
55 CFluxList By;
56 CFluxList Bz;
57 CTimestampList TimestampList;
58 eTHM1176Units Units;
59 ushort Temp;
60
61 // Active measurement parameters.
62 sAveraging<uParm> AveragingParms;
63 sInputTrigger<uParm> TriggerParms;
64 sRange<uParm> RangeParms;
65 sArbitraryMeasurements OutputSelect;
66 eCommunicationFormat CommFormat;
67 bool SleepParm;
68
69 // Warnings.
70 CErrorList Warnings;
71
73 CMeasurement()
74 : Units{}, Temp{}, CommFormat{}, SleepParm{}
75 {
76 }
77
79 void clear()
80 {
81 Bx.clear();
82 By.clear();
83 Bz.clear();
84 Units = kT;
85 Temp = 0;
86 TimestampList.clear();
87
88 AveragingParms.clear();
89 TriggerParms.clear();
90 OutputSelect.clear();
91 SleepParm = false;
92 RangeParms.clear();
93 CommFormat = kComFormatAscii;
94
95 Warnings.clear();
96 }
97
99 bool operator==(CMeasurement other) const
100 {
101 return (
102 Bx == other.Bx &&
103 By == other.By &&
104 Bz == other.Bz &&
105 Units == other.Units &&
106 Temp == other.Temp &&
107 TimestampList == other.TimestampList &&
108
109 AveragingParms == other.AveragingParms &&
110 TriggerParms == other.TriggerParms &&
111 OutputSelect == other.OutputSelect &&
112 SleepParm == other.SleepParm &&
113 RangeParms == other.RangeParms &&
114 CommFormat == other.CommFormat &&
115
116 Warnings == other.Warnings
117 );
118 }
119
121 bool operator!=(CMeasurement other) const
122 {
123 return (!operator==(other));
124 }
125};
126
127} // namespace
THM1176.h
Interface definition for C++ API for Metrolab THM1176/TFM1186.
MTL::CMeasurement::Warnings
CErrorList Warnings
Any warnings returned during the measurement.
Definition THM1176InstrumentManagerTypes.h:70
MTL::CMeasurement::Bx
CFluxList Bx
Bx value for each measurement.
Definition THM1176InstrumentManagerTypes.h:54
MTL::CMeasurement::operator!=
bool operator!=(CMeasurement other) const
Inequality operator.
Definition THM1176InstrumentManagerTypes.h:121
MTL::CMeasurement::Units
eTHM1176Units Units
Measurement units for Bx, By, Bz.
Definition THM1176InstrumentManagerTypes.h:58
MTL::CMeasurement::clear
void clear()
Clear the data structure to default values.
Definition THM1176InstrumentManagerTypes.h:79
MTL::CMeasurement::TriggerParms
sInputTrigger< uParm > TriggerParms
Trigger parameters used for measurement.
Definition THM1176InstrumentManagerTypes.h:63
MTL::CMeasurement::CMeasurement
CMeasurement()
Constructor.
Definition THM1176InstrumentManagerTypes.h:73
MTL::CMeasurement::TimestampList
CTimestampList TimestampList
Timestamp for each measurement.
Definition THM1176InstrumentManagerTypes.h:57
MTL::CMeasurement::RangeParms
sRange< uParm > RangeParms
Range parameters used for measurement.
Definition THM1176InstrumentManagerTypes.h:64
MTL::CMeasurement::AveragingParms
sAveraging< uParm > AveragingParms
Averaging parameters used for measurement.
Definition THM1176InstrumentManagerTypes.h:62
MTL::CMeasurement::operator==
bool operator==(CMeasurement other) const
Equality operator.
Definition THM1176InstrumentManagerTypes.h:99
MTL::CMeasurement::OutputSelect
sArbitraryMeasurements OutputSelect
Output selection parameters used for measurement.
Definition THM1176InstrumentManagerTypes.h:65
MTL::CMeasurement::SleepParm
bool SleepParm
Sleep parameters used for measurement.
Definition THM1176InstrumentManagerTypes.h:67
MTL::CMeasurement::By
CFluxList By
By value for each measurement.
Definition THM1176InstrumentManagerTypes.h:55
MTL::CMeasurement::Temp
ushort Temp
Temperature, in arbitrary units.
Definition THM1176InstrumentManagerTypes.h:59
MTL::CMeasurement::Bz
CFluxList Bz
Bz value for each measurement.
Definition THM1176InstrumentManagerTypes.h:56
MTL::CMeasurement::CommFormat
eCommunicationFormat CommFormat
Communication parameters used for measurement.
Definition THM1176InstrumentManagerTypes.h:66
MTL::CTHM1176UnitsList
List of measurement units.
Definition THM1176InstrumentManagerTypes.h:46
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::CTimestampList
List of timestamps.
Definition THM1176Types.h:576
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::knT
@ knT
Nano-Tesla.
Definition THM1176Types.h:186
MTL::Instrument::THM1176Types::kmT
@ kmT
Milli-Tesla.
Definition THM1176Types.h:184
MTL::Instrument::THM1176Types::kMHzp
@ kMHzp
Equivalent proton NMR resonant frequency, in Mega-Hertz.
Definition THM1176Types.h:190
MTL::Instrument::THM1176Types::kGauss
@ kGauss
Gauss.
Definition THM1176Types.h:187
MTL::Instrument::THM1176Types::kmGauss
@ kmGauss
Milli-Gauss.
Definition THM1176Types.h:189
MTL::Instrument::THM1176Types::kT
@ kT
Tesla.
Definition THM1176Types.h:183
MTL::Instrument::THM1176Types::kkGauss
@ kkGauss
Kilo-Gauss.
Definition THM1176Types.h:188
MTL::Instrument::THM1176Types::kuT
@ kuT
Micro-Tesla.
Definition THM1176Types.h:185
MTL
Definition CTHM1176InstrumentManager.h:179
MTL::eTHM1176OperatingMode
eTHM1176OperatingMode
Operating modes used to initiate actions or provide status.
Definition THM1176InstrumentManagerTypes.h:17
MTL::kTHM1176RestoreZeroOffset
@ kTHM1176RestoreZeroOffset
Restore the factory zero-offset setting.
Definition THM1176InstrumentManagerTypes.h:24
MTL::kTHM1176CalibrateZeroOffset
@ kTHM1176CalibrateZeroOffset
Initiate the zero-offset calibration procedure.
Definition THM1176InstrumentManagerTypes.h:23
MTL::kTHM1176Reset
@ kTHM1176Reset
Reset instrument.
Definition THM1176InstrumentManagerTypes.h:19
MTL::kTHM1176NotConnected
@ kTHM1176NotConnected
Disconnect instrument.
Definition THM1176InstrumentManagerTypes.h:18
MTL::kTHM1176Measure
@ kTHM1176Measure
Start a single measurement.
Definition THM1176InstrumentManagerTypes.h:21
MTL::kTHM1176MeasureContinuously
@ kTHM1176MeasureContinuously
Start a continuous measurement.
Definition THM1176InstrumentManagerTypes.h:22
MTL::kTHM1176Idle
@ kTHM1176Idle
Place the instrument in idle mode.
Definition THM1176InstrumentManagerTypes.h:20
MTL::eTHM1176Units
eTHM1176Units
Enumeration of possible measurement units, including "ADC".
Definition THM1176InstrumentManagerTypes.h:29
MTL::kmApm
@ kmApm
Equivalent H in a vacuum, in mA/m.
Definition THM1176InstrumentManagerTypes.h:40
MTL::kT
@ kT
Tesla.
Definition THM1176InstrumentManagerTypes.h:30
MTL::kmGauss
@ kmGauss
Milli-Gauss.
Definition THM1176InstrumentManagerTypes.h:36
MTL::knT
@ knT
Nano-Tesla.
Definition THM1176InstrumentManagerTypes.h:33
MTL::kMHzp
@ kMHzp
Equivalent proton NMR resonant frequency, in Mega-Hertz.
Definition THM1176InstrumentManagerTypes.h:37
MTL::kkApm
@ kkApm
Equivalent H in a vacuum, in kA/m.
Definition THM1176InstrumentManagerTypes.h:39
MTL::kApm
@ kApm
Equivalent H in a vacuum, in A/m.
Definition THM1176InstrumentManagerTypes.h:38
MTL::kmT
@ kmT
Milli-Tesla.
Definition THM1176InstrumentManagerTypes.h:31
MTL::kADC
@ kADC
Raw ADC values.
Definition THM1176InstrumentManagerTypes.h:41
MTL::kuT
@ kuT
Micro-Tesla.
Definition THM1176InstrumentManagerTypes.h:32
MTL::kkGauss
@ kkGauss
Kilo-Gauss.
Definition THM1176InstrumentManagerTypes.h:35
MTL::kGauss
@ kGauss
Gauss.
Definition THM1176InstrumentManagerTypes.h:34
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::sInputTrigger
Input trigger parameter.
Definition THM1176Types.h:426
MTL::Instrument::THM1176Types::sRange
Measurement range parameter.
Definition THM1176Types.h:479