| THM1176InstrumentDriver 1.2 C++ API for Metrolab THM1176

Loading...
Searching...
No Matches
MTL::Instrument::THM1176Types Namespace Reference

## Classes
struct | sStatusRegister
| Complete identification of a SCPI status register. More...
class | RegisterList
| List of SCPI status registers. More...
class | StatusValues
| List of values returned for several SCPI status registers. More...
union | uStatusByte
| Union to access the Status Byte as integer or bit fields. More...
union | uStandardEvent
| Union to access the Standard Event Status Register as integer or bit fields. More...
union | uOPERation
| Union to access the Operation Status Register as integer or bit fields. More...
union | uQUEStionable
| Union to access the Questionable Status Register as integer or bit fields. More...
class | CFluxList
| List of flux density values. More...
class | CUnitsList
| List of measurement units. More...
class | CDivisorList
| List of divisors, one per measurement unit. More...
struct | sError
| Error returned by the instrument. More...
class | CErrorList
| List of errors returned by the instrument. More...
struct | sBoundedParm
| Parameter template, with current/min/max/default values. More...
struct | sExample
| Sample parameter template. More...
struct | sVersion
| Major and minor version numbers. More...
struct | sIdentifier
| Instrument's identification string - parsed version. More...
struct | sAveraging
| Averaging parameter. More...
struct | sInputTrigger
| Input trigger parameter. More...
struct | sRange
| Measurement range parameter. More...
struct | sFile
| Directory entry in the instrument's file system. More...
class | CAbsoluteTimestamp
| Timestamp for a measurement. More...
class | CTimestampList
| List of timestamps. More...
struct | sArbitraryMeasurements
| Specify the measurement data to be returned. More...
struct | sMeasurementConditions
| Summary of the parameters used to make a measurement. More...

## Typedefs
typedef F32 | tFlux
| Flux density value, as 32-bit floating-point number.
template<class DataType>
using | uParm = DataType
| Parameter template, with only current value.
typedef std::vector< sFile > | tFileList
| List of directory entries.

## Enumerations
enum | eStatusRegisterSet { kStatusByte = 0 , kStandardEventStatusRegister , kStatusQuestionableStatusRegister , kStatusOperationStatusRegister }
| Enumeration of SCPI status register sets. More...
enum | eStatusRegisterType { kStatusEvent = 0 , kStatusCondition , kStatusEnable }
| Enumeration of SCPI status register types. More...
enum | eUnits { kT , kmT , kuT , knT , kGauss , kkGauss , kmGauss , kMHzp }
| Enumeration of possible measurement units. More...
enum class | eInstrModel { kTHM1176LF , kTHM1176MF , kTHM1176HF , kTHM1176HFC , kTFM1186 , kUnknown }
| Enumeration of instrument (THM1176-LF, THM1176-MF, ...) model. More...
enum | eModelRevision { kA , kB }
| THM1176 type A or B. More...
enum | eInputTriggerSource { kInputTrigSrcImmediate , kInputTrigSrcTimer , kInputTrigSrcBus }
| Enumeration of possible trigger sources. More...
enum | eCommunicationFormat { kComFormatAscii , kComFormatInteger , kComFormatPacked2Byte , kComFormatPacked1Byte }
| Enumeration of possible formats for returned data. More...

## Functions
U16 | BinaryToU16 (const char pBinary[2])
| Convert binary to U16 (unimplemented).
I16 | BinaryToI16 (const char pBinary[2])
| Convert binary to I16, taking into account endedness.
U32 | BinaryToU32 (const char pBinary[4])
| Convert binary to U32 (unimplemented).
I32 | BinaryToI32 (const char pBinary[4])
| Convert binary to I32, taking into account endedness.
F32 | BinaryToF32 (const char pBinary[4])
| Convert binary to F32 (unimplemented).
U64 | BinaryToU64 (const char pBinary[8])
| Convert binary to U64 (unimplemented).
F64 | BinaryToF64 (const char pBinary[8])
| Convert binary to F64 (unimplemented).
bool | StringToUnits (std::string SUnits, eUnits &rUnits)
| Convert measurement units from string to enumeration.
std::string | UnitsToString (eUnits Units)
| Convert measurement units from enumeration to string.
bool | TestTHM1176Types ()
| Test the conversion routines.
std::ostream & | operator<< (std::ostream &Stream, const eStatusRegisterSet &RegSet)
| Status register set stream output.
std::ostream & | operator<< (std::ostream &Stream, const eStatusRegisterType &RegType)
| Status register type stream output.
std::ostream & | operator<< (std::ostream &Stream, const sStatusRegister &RegDef)
| Status register definition stream output.
std::ostream & | operator<< (std::ostream &Stream, const RegisterList &RegList)
| Status register list stream output.
std::ostream & | operator<< (std::ostream &Stream, const StatusValues &StatusList)
| Status value list stream output.
std::ostream & | operator<< (std::ostream &Stream, const uStatusByte &StatusByte)
| Status byte stream output.
std::ostream & | operator<< (std::ostream &Stream, const uStandardEvent &StdEventReg)
| Standard event register stream output.
std::ostream & | operator<< (std::ostream &Stream, const uOPERation &OperReg)
| OPERation register stream output.
std::ostream & | operator<< (std::ostream &Stream, const uQUEStionable &QuestReg)
| QUEStionable register stream output.
std::ostream & | operator<< (std::ostream &Stream, const CFluxList &FluxList)
| Flux list stream output.
std::ostream & | operator<< (std::ostream &Stream, const eUnits &Units)
| Units stream output.
std::ostream & | operator<< (std::ostream &Stream, const CUnitsList &UnitsList)
| Units list stream output.
std::ostream & | operator<< (std::ostream &Stream, const CDivisorList &DivisorList)
| Divisor list stream output.
std::ostream & | operator<< (std::ostream &Stream, const sError &Error)
| Error stream output.
std::ostream & | operator<< (std::ostream &Stream, const CErrorList &ErrorList)
| Error list stream output.
std::ostream & | operator<< (std::ostream &Stream, const sVersion &Version)
| Version stream output.
std::ostream & | operator<< (std::ostream &Stream, const sIdentifier &ID)
| Identifier stream output.
std::ostream & | operator<< (std::ostream &Stream, const sAveraging< uParm > &AvgParm)
| Averaging parameters stream output.
std::ostream & | operator<< (std::ostream &Stream, const sAveraging< sBoundedParm > &AvgParm)
| Averaging bounds stream output.
std::ostream & | operator<< (std::ostream &Stream, const eInputTriggerSource &TrgSrc)
std::ostream & | operator<< (std::ostream &Stream, const sInputTrigger< uParm > &TrigParm)
| Trigger parameters stream output.
std::ostream & | operator<< (std::ostream &Stream, const sInputTrigger< sBoundedParm > &TrigParm)
| Trigger bounds stream output.
std::ostream & | operator<< (std::ostream &Stream, const eCommunicationFormat &CommFormat)
| Comm format stream output.
std::ostream & | operator<< (std::ostream &Stream, const sRange< uParm > &RangeParm)
| Range parameters stream output.
std::ostream & | operator<< (std::ostream &Stream, const sRange< sBoundedParm > &RangeParm)
| Range bounds stream output.
std::ostream & | operator<< (std::ostream &Stream, const sFile &FileInfo)
| File info stream output.
std::ostream & | operator<< (std::ostream &Stream, const tFileList &FileList)
| File List stream output.
CAbsoluteTimestamp | operator+ (CAbsoluteTimestamp a, CAbsoluteTimestamp b)
| Timestamp addition operator.
CAbsoluteTimestamp | operator- (CAbsoluteTimestamp a, CAbsoluteTimestamp b)
| Timestamp subtraction operator.
std::ostream & | operator<< (std::ostream &Stream, const CAbsoluteTimestamp &Timestamp)
| Timestamp stream output.
std::ostream & | operator<< (std::ostream &Stream, const CTimestampList &TimestampList)
| Timestamp list stream output.
std::ostream & | operator<< (std::ostream &Stream, const sArbitraryMeasurements &MeasSpec)
| Arbitrary measurement specification stream output.
std::ostream & | operator<< (std::ostream &Stream, const sMeasurementConditions &MeasCond)
| Measurement conditions stream output.

## Typedef Documentation

## ◆ tFileList

typedef std::vector<sFile> MTL::Instrument::THM1176Types::tFileList

List of directory entries.

Definition at line 532 of file THM1176Types.h.

## ◆ tFlux

typedef F32 MTL::Instrument::THM1176Types::tFlux

Flux density value, as 32-bit floating-point number.

Definition at line 30 of file THM1176Types.h.

## ◆ uParm

template<class DataType>

using MTL::Instrument::THM1176Types::uParm = DataType

Parameter template, with only current value.

Template Parameters

  DataType | Parameter's data type.

Definition at line 294 of file THM1176Types.h.

## Enumeration Type Documentation

## ◆ eCommunicationFormat

enum MTL::Instrument::THM1176Types::eCommunicationFormat

Enumeration of possible formats for returned data.

Enumerator
kComFormatAscii | Human-legible text.
kComFormatInteger | Binary (32-bit integers).
kComFormatPacked2Byte | Binary packed: first field value as I32, remainder deltas as I16.
kComFormatPacked1Byte | Binary packed: first field value as I32, remainder deltas as I8.

Definition at line 465 of file THM1176Types.h.

## ◆ eInputTriggerSource

enum MTL::Instrument::THM1176Types::eInputTriggerSource

Enumeration of possible trigger sources.

Enumerator
kInputTrigSrcImmediate | Immediate trigger: start measurement immediately after previous one completes.
kInputTrigSrcTimer | Timed trigger: start measurement at regular intervals.
kInputTrigSrcBus | Bus trigger: start measurement upon USB trigger message.

Definition at line 416 of file THM1176Types.h.

## ◆ eInstrModel

enum class MTL::Instrument::THM1176Types::eInstrModel
| strong

Enumeration of instrument (THM1176-LF, THM1176-MF, ...) model.

Enumerator
kTHM1176LF |
kTHM1176MF |
kTHM1176HF |
kTHM1176HFC |
kTFM1186 |
kUnknown |

Definition at line 335 of file THM1176Types.h.

## ◆ eModelRevision

enum MTL::Instrument::THM1176Types::eModelRevision

THM1176 type A or B.

Enumerator
kA |
kB |

Definition at line 347 of file THM1176Types.h.

## ◆ eStatusRegisterSet

enum MTL::Instrument::THM1176Types::eStatusRegisterSet

Enumeration of SCPI status register sets.

Enumerator
kStatusByte | Status Byte.
kStandardEventStatusRegister | Standard Event Status Register.
kStatusQuestionableStatusRegister | Questionable Status Register.
kStatusOperationStatusRegister | Operation Status Register.

Definition at line 36 of file THM1176Types.h.

## ◆ eStatusRegisterType

enum MTL::Instrument::THM1176Types::eStatusRegisterType

Enumeration of SCPI status register types.

Enumerator
kStatusEvent | Event register.
kStatusCondition | Condition register.
kStatusEnable | Enable register.

Definition at line 44 of file THM1176Types.h.

## ◆ eUnits

enum MTL::Instrument::THM1176Types::eUnits

Enumeration of possible measurement units.

Note: Not all models support all measurement units.

Enumerator
kT | Tesla.
kmT | Milli-Tesla.
kuT | Micro-Tesla.
knT | Nano-Tesla.
kGauss | Gauss.
kkGauss | Kilo-Gauss.
kmGauss | Milli-Gauss.
kMHzp | Equivalent proton NMR resonant frequency, in Mega-Hertz.

Definition at line 181 of file THM1176Types.h.

## Function Documentation

## ◆ BinaryToF32()

F32 MTL::Instrument::THM1176Types::BinaryToF32 | ( | const char | pBinary[4] | ) |

Convert binary to F32 (unimplemented).

## ◆ BinaryToF64()

F64 MTL::Instrument::THM1176Types::BinaryToF64 | ( | const char | pBinary[8] | ) |

Convert binary to F64 (unimplemented).

## ◆ BinaryToI16()

I16 MTL::Instrument::THM1176Types::BinaryToI16 | ( | const char | pBinary[2] | ) |

Convert binary to I16, taking into account endedness.

Definition at line 37 of file THM1176TypeConversions.cpp.

## ◆ BinaryToI32()

I32 MTL::Instrument::THM1176Types::BinaryToI32 | ( | const char | pBinary[4] | ) |

Convert binary to I32, taking into account endedness.

Definition at line 48 of file THM1176TypeConversions.cpp.

## ◆ BinaryToU16()

U16 MTL::Instrument::THM1176Types::BinaryToU16 | ( | const char | pBinary[2] | ) |

Convert binary to U16 (unimplemented).

## ◆ BinaryToU32()

U32 MTL::Instrument::THM1176Types::BinaryToU32 | ( | const char | pBinary[4] | ) |

Convert binary to U32 (unimplemented).

## ◆ BinaryToU64()

U64 MTL::Instrument::THM1176Types::BinaryToU64 | ( | const char | pBinary[8] | ) |

Convert binary to U64 (unimplemented).

## ◆ operator+()

CAbsoluteTimestamp MTL::Instrument::THM1176Types::operator+ | ( | CAbsoluteTimestamp | a,
|  | CAbsoluteTimestamp | b )

Timestamp addition operator.

Definition at line 380 of file THM1176Types.cpp.

## ◆ operator-()

CAbsoluteTimestamp MTL::Instrument::THM1176Types::operator- | ( | CAbsoluteTimestamp | a,
|  | CAbsoluteTimestamp | b )

Timestamp subtraction operator.

Definition at line 394 of file THM1176Types.cpp.

## ◆ operator<<() [1/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const CAbsoluteTimestamp & | Timestamp )

Timestamp stream output.

Definition at line 413 of file THM1176Types.cpp.

## ◆ operator<<() [2/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const CDivisorList & | DivisorList )

Divisor list stream output.

Definition at line 133 of file THM1176Types.cpp.

## ◆ operator<<() [3/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const CErrorList & | ErrorList )

Error list stream output.

Definition at line 164 of file THM1176Types.cpp.

## ◆ operator<<() [4/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const CFluxList & | FluxList )

Flux list stream output.

Definition at line 101 of file THM1176Types.cpp.

## ◆ operator<<() [5/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const CTimestampList & | TimestampList )

Timestamp list stream output.

Definition at line 476 of file THM1176Types.cpp.

## ◆ operator<<() [6/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const CUnitsList & | UnitsList )

Units list stream output.

Definition at line 125 of file THM1176Types.cpp.

## ◆ operator<<() [7/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const eCommunicationFormat & | CommFormat )

Comm format stream output.

Definition at line 280 of file THM1176Types.cpp.

## ◆ operator<<() [8/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const eInputTriggerSource & | TrgSrc )

Definition at line 252 of file THM1176Types.cpp.

## ◆ operator<<() [9/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const eStatusRegisterSet & | RegSet )

Status register set stream output.

Definition at line 27 of file THM1176Types.cpp.

## ◆ operator<<() [10/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const eStatusRegisterType & | RegType )

Status register type stream output.

Definition at line 35 of file THM1176Types.cpp.

## ◆ operator<<() [11/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const eUnits & | Units )

Units stream output.

Definition at line 113 of file THM1176Types.cpp.

## ◆ operator<<() [12/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const RegisterList & | RegList )

Status register list stream output.

Definition at line 47 of file THM1176Types.cpp.

## ◆ operator<<() [13/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sArbitraryMeasurements & | MeasSpec )

Arbitrary measurement specification stream output.

Definition at line 529 of file THM1176Types.cpp.

## ◆ operator<<() [14/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sAveraging< sBoundedParm > & | AvgParm )

Averaging bounds stream output.

Definition at line 243 of file THM1176Types.cpp.

## ◆ operator<<() [15/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sAveraging< uParm > & | AvgParm )

Averaging parameters stream output.

Definition at line 238 of file THM1176Types.cpp.

## ◆ operator<<() [16/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sError & | Error )

Error stream output.

Definition at line 157 of file THM1176Types.cpp.

## ◆ operator<<() [17/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sFile & | FileInfo )

File info stream output.

Definition at line 326 of file THM1176Types.cpp.

## ◆ operator<<() [18/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sIdentifier & | ID )

Identifier stream output.

Definition at line 224 of file THM1176Types.cpp.

## ◆ operator<<() [19/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sInputTrigger< sBoundedParm > & | TrigParm )

Trigger bounds stream output.

Definition at line 266 of file THM1176Types.cpp.

## ◆ operator<<() [20/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sInputTrigger< uParm > & | TrigParm )

Trigger parameters stream output.

Definition at line 259 of file THM1176Types.cpp.

## ◆ operator<<() [21/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sMeasurementConditions & | MeasCond )

Measurement conditions stream output.

Definition at line 539 of file THM1176Types.cpp.

## ◆ operator<<() [22/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sRange< sBoundedParm > & | RangeParm )

Range bounds stream output.

Definition at line 295 of file THM1176Types.cpp.

## ◆ operator<<() [23/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sRange< uParm > & | RangeParm )

Range parameters stream output.

Definition at line 289 of file THM1176Types.cpp.

## ◆ operator<<() [24/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sStatusRegister & | RegDef )

Status register definition stream output.

Definition at line 42 of file THM1176Types.cpp.

## ◆ operator<<() [25/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const StatusValues & | StatusList )

Status value list stream output.

Definition at line 55 of file THM1176Types.cpp.

## ◆ operator<<() [26/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const sVersion & | Version )

Version stream output.

Definition at line 189 of file THM1176Types.cpp.

## ◆ operator<<() [27/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const tFileList & | FileList )

File List stream output.

Definition at line 333 of file THM1176Types.cpp.

## ◆ operator<<() [28/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const uOPERation & | OperReg )

OPERation register stream output.

Definition at line 83 of file THM1176Types.cpp.

## ◆ operator<<() [29/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const uQUEStionable & | QuestReg )

QUEStionable register stream output.

Definition at line 91 of file THM1176Types.cpp.

## ◆ operator<<() [30/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const uStandardEvent & | StdEventReg )

Standard event register stream output.

Definition at line 73 of file THM1176Types.cpp.

## ◆ operator<<() [31/31]

std::ostream & MTL::Instrument::THM1176Types::operator<< | ( | std::ostream & | Stream,
|  | const uStatusByte & | StatusByte )

Status byte stream output.

Definition at line 63 of file THM1176Types.cpp.

## ◆ StringToUnits()

bool MTL::Instrument::THM1176Types::StringToUnits | ( | std::string | SUnits,
|  | eUnits & | rUnits )

Convert measurement units from string to enumeration.

Parameters

  [in] | SUnits | Measurement units as a string.
  [out] | rUnits | Measurement units as an enumeration.

Returns
  True if successful.

Definition at line 59 of file THM1176TypeConversions.cpp.

## ◆ TestTHM1176Types()

bool MTL::Instrument::THM1176Types::TestTHM1176Types | ( |  | ) |

Test the conversion routines.

Returns
  True if successful.

Definition at line 88 of file THM1176TypeConversions.cpp.

## ◆ UnitsToString()

std::string MTL::Instrument::THM1176Types::UnitsToString | ( | eUnits | Units | ) |

Convert measurement units from enumeration to string.

Parameters

  [in] | Units | Measurement units as an enumeration.

Returns
  Corresponding string.

Definition at line 73 of file THM1176TypeConversions.cpp.