 |
THM1176InstrumentManager
1.0
Qt Object abstraction for Metrolab THM1176
|
Go to the documentation of this file.
21 namespace Instrument {
22 namespace THM1176Types {
44 Stream <<
"regdef(" << RegDef.
Set <<
" " << RegDef.
Type <<
")";
50 for (
auto l_Reg : RegList)
51 Stream << l_Reg <<
" ";
58 for (
auto l_Value : StatusList)
59 Stream << l_Value <<
" ";
104 for (
auto l_Flux : FluxList)
105 Stream << l_Flux <<
" ";
115 Stream << ((Units ==
kT) ?
"T" :
116 (Units ==
kmT) ?
"mT" :
117 (Units ==
kuT) ?
"uT" :
118 (Units ==
knT) ?
"nT" :
119 (Units ==
kGauss) ?
"Gauss" :
122 (Units ==
kMHzp) ?
"MHzp" :
"?");
128 for (
auto l_Units : UnitsList)
129 Stream << l_Units <<
" ";
136 for (
auto l_Divisor : DivisorList)
137 Stream << l_Divisor <<
" ";
148 Code == other.
Code &&
155 return (!
operator==(other));
159 Stream <<
"err(code=" << Error.
Code <<
161 " ctxt=" << Error.
Context <<
")";
166 for (
auto l_Error : ErrorList)
167 Stream << l_Error << std::endl;
182 Major == other.
Major &&
183 Minor == other.
Minor);
187 return (!
operator==(other));
191 Stream << Version.
Major <<
"." << Version.
Minor;
200 Manufacturer.clear();
203 ElectronicsVersion.clear();
204 ProbeVersion.clear();
205 FirmwareVersion.clear();
211 Model == other.
Model &&
220 return (!
operator==(other));
225 " mdl=" << ID.
Model <<
259 Stream <<
"trg(src=" << TrigParm.
Source <<
261 " cnt=" << TrigParm.
Count <<
")";
266 Stream <<
"trg(src=" << TrigParm.
Source <<
271 " cnt(val=" << TrigParm.
Count.
Val <<
274 " def=" << TrigParm.
Count.
Def <<
"))";
289 Stream <<
"range(auto=" << RangeParm.
Auto <<
290 " rng=" << RangeParm.
Range <<
")";
295 Stream <<
"range(auto=" << RangeParm.
Auto <<
296 " rng(val=" << RangeParm.
Range.
Val <<
299 " def=" << RangeParm.
Range.
Def <<
"))";
315 Path == other.
Path &&
316 Type == other.
Type &&
322 return (!
operator==(other));
326 Stream <<
"file(siz=" << FileInfo.
Size <<
327 " path=" << FileInfo.
Path <<
328 " type=" << FileInfo.
Type <<
")";
333 for (
auto l_FileInfo : FileList)
334 Stream << l_FileInfo << std::endl;
342 s(Seconds), ns(Nanoseconds)
355 return (s == other.s && ns == other.ns);
359 return (!
operator==(other));
410 std::time_t l_Seconds = Timestamp.
seconds();
412 char l_DateTimeString[32];
413 std::strftime(l_DateTimeString, 31,
"%FT%T", std::localtime(&l_Seconds));
414 Stream << std::string(l_DateTimeString) <<
"."
415 << std::setfill(
'0') << std::setw(9)
417 << std::setfill(
' ') << std::setw(0);
427 if (this->size() < 2)
449 size_t l_n = this->size();
454 U64 l_T0 = this->at(0);
455 for (
U32 l_i = 0; l_i < l_n; l_i++)
459 l_Y(l_i) =
static_cast<F64> (this->at(l_i) - l_T0);
464 l_b = l_X.jacobiSvd(ComputeThinU | ComputeThinV).solve(l_Y);
474 for (
auto l_TimeStamp : TimestampList)
475 Stream << l_TimeStamp <<
" ";
501 return (!
operator==(other));
520 return (!
operator==(other));
524 Stream <<
"arb(Bx=" << MeasSpec.
Bx <<
525 " By=" << MeasSpec.
By <<
526 " Bz=" << MeasSpec.
Bz <<
U8 PowerOn
THM1176 has been powered up.
bool UseCalibration
Use calibration data.
@ kInputTrigSrcBus
Bus trigger: start measurement upon USB trigger message.
Union to access the Status Byte as integer or bit fields.
std::string Type
File type ("ASCII" or "BINARY").
eStatusRegisterType Type
SCPI register type.
List of SCPI status registers.
U8 QueryError
Error in preceding query.
ParmType< tFlux > Range
Measurement range, if auto-ranging is not enabled.
@ kStatusOperationStatusRegister
Operation Status Register.
eStatusRegisterSet
Enumeration of SCPI status register sets.
eUnits
Enumeration of possible measurement units.
@ kStatusCondition
Condition register.
void clear()
Clear to default values.
sAveraging< uParm > AveragingParms
Averaging parameters.
@ kStatusEnable
Enable register.
bool operator!=(sFile other) const
Inequality operator.
struct MTL::Instrument::THM1176Types::uStandardEvent::sStandardEvent StandardEvent
Access the Standard Event Status Register as bit fields.
unsigned long long U64
64-bit unsigned integer.
bool operator!=(sArbitraryMeasurements other) const
Inequality operator.
U8 OSB
OPERation status summary bit.
eStatusRegisterType
Enumeration of SCPI status register types.
bool operator!=(sVersion other) const
Inequality operator.
struct MTL::Instrument::THM1176Types::uStatusByte::sStatusByte StatusByte
Access the Status Byte as bit fields.
Specify the measurement data to be returned.
bool GetEstimatedPeriod(F64 &Period)
Estimate the measurement period from this timestamp list, by means of a least-squares fit.
Summary of the parameters used to make a measurement.
void clear(void)
Clear to default (zero).
U8 ExecutionError
Error detected during command execution.
void clear(void)
Clear to default (zeroes).
std::string Description
Error description.
U16 Frequency
Acquisition buffer or the timed trigger has been overrun.
U8 ESB
Standard Event Status Register summary bit.
std::string Path
File path.
@ kComFormatAscii
Human-legible text.
void clear()
Clear to default values.
U32 NoMeasurements
Return this number of measurements.
U8 CommandError
Error in preceding command.
List of divisors, one per measurement unit.
struct sVersion FirmwareVersion
Version numbers of firmware.
void clear()
Clear to default values.
eStatusRegisterSet Set
SCPI register set.
CAbsoluteTimestamp operator-(CAbsoluteTimestamp a, CAbsoluteTimestamp b)
Timestamp subtraction operator.
bool operator!=(sError other) const
Inequality operator.
Instrument's identification string - parsed version.
U16 WaitingForTRIGger
Waiting for trigger.
CAbsoluteTimestamp operator+(CAbsoluteTimestamp a, CAbsoluteTimestamp b)
Timestamp addition operator.
bool Auto
Auto-ranging enabled.
eCommunicationFormat
Enumeration of possible formats for returned data.
U16 Overrange
Measurement was over-range.
U8 Minor
Minor version number.
std::ostream & operator<<(std::ostream &Stream, const eStatusRegisterSet &RegSet)
Status register set stream output.
@ kStatusQuestionableStatusRegister
Questionable Status Register.
DataType Val
Current value.
@ kStandardEventStatusRegister
Standard Event Status Register.
bool Bz
Return the flux density Z-component.
eInputTriggerSource
Enumeration of possible trigger sources.
bool operator==(sVersion other) const
Equality operator.
bool operator==(sIdentifier other) const
Equality oeprator.
@ kInputTrigSrcImmediate
Immediate trigger: start measurement immediately after previous one completes.
U8 RQS
ReQuest for Service.
bool operator!=(sMeasurementConditions other) const
Inequality operator.
@ kStatusByte
Status Byte.
bool operator!=(CAbsoluteTimestamp other)
Inequality operator.
U64 nanoseconds(void) const
Fetch the number of nanoseconds.
@ kStatusEvent
Event register.
U8 EAV
Error Available in Error / Event Queue.
std::string Manufacturer
Manufacturer name ("Metrolab Technology SA")
std::vector< sFile > tFileList
List of directory entries.
bool operator==(sMeasurementConditions other) const
Equality operator.
bool Timestamp
Return the timestamp.
Timestamp for a measurement.
Union to access the Questionable Status Register as integer or bit fields.
std::string Model
Model name (e.g. "THM1176-MF")
List of values returned for several SCPI status registers.
std::string Context
SCPI commands being executed at time of error.
static const U64 NS_PER_SEC
U16 RANGing
Changing range.
CAbsoluteTimestamp(std::time_t Seconds=0, U64 Nanoseconds=0)
Constructor.
@ kMHzp
Equivalent proton NMR resonant frequency, in Mega-Hertz.
struct MTL::Instrument::THM1176Types::uQUEStionable::sQUEStionable QUEStionable
Access the Questionable Status Register as bit fields.
U8 Major
Major version number.
Union to access the Operation Status Register as integer or bit fields.
U8 DeviceDependentError
Errors specific to the THM1176, including internal errors.
Complete identification of a SCPI status register.
List of measurement units.
U16 CALibrating
Measuring zero-offset.
sInputTrigger< uParm > TriggerParms
Trigger parameters.
U8 OperationComplete
*OPC has flagged operation complete
@ kComFormatInteger
Binary (32-bit integers)
List of flux density values.
bool operator==(sError other) const
Equality operator.
Error returned by the instrument.
bool operator==(sFile other) const
Equality operator.
bool Temperature
Return the sensor temperature.
U16 MEASuring
Measuring magnetic field strength.
struct MTL::Instrument::THM1176Types::uOPERation::sOPERation OPERation
Access the Operation Status Register as bit fields.
List of errors returned by the instrument.
Interface definition for C++ API for Metrolab THM1176/TFM1186.
struct sVersion ElectronicsVersion
Version numbers of electronics.
bool operator==(CAbsoluteTimestamp other)
Equality operator.
bool Bx
Return the flux density X-component.
double F64
64-bit floating-point number.
size_t Size
File size, in bytes.
Directory entry in the instrument's file system.
unsigned int U32
32-bit unsigned integer.
DataType Def
Default value.
ParmType< U16 > NoPoints
Number of points in block average.
void clear(void)
Clear to default.
U8 QSB
QUEStionable status summary bit.
Major and minor version numbers.
std::time_t seconds(void) const
Fetch the number of seconds.
CAbsoluteTimestamp & operator=(const CAbsoluteTimestamp &Value)
Assignment operator.
void clear(void)
Clear to default values (zeroes)
bool operator==(sArbitraryMeasurements other) const
Equality operator.
@ kComFormatPacked2Byte
Binary packed: first field value as I32, remainder deltas as I16.
struct sVersion ProbeVersion
Version numbers of probe.
bool By
Return the flux density Y-component.
Union to access the Standard Event Status Register as integer or bit fields.
bool operator!=(sIdentifier other) const
Inequality operator.
U32 SerialNumber
Serial number.
@ kComFormatPacked1Byte
Binary packed: first field value as I32, remainder deltas as I8.
@ kInputTrigSrcTimer
Timed trigger: start measurement at regular intervals.