| THM1176InstrumentManager 1.2 Qt Object abstraction for Metrolab THM1176

Loading...
Searching...
No Matches
THM1176.cpp File Reference

THM1176 API. More...

`#include <regex>`
`#include <thread>`
`#include <chrono>`
`#include <set>`
`#include <iostream>`
`#include "THM1176.h"`
`#include "THM1176TypeConversions.h"`
`#include "OSDefines.h"`
`#include "Helpers.h"`
`#include "Exception.h"`
`#include "SCPIParsing.h"`
`#include <sstream>`
`#include <iomanip>`
`#include <locale>`
Include dependency graph for THM1176.cpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | DEBUG_MTL_INSTRUMENT_THM1176 1
#define | DEBUG_MTL_INSTRUMENT_THM1176_ERRORS_ONLY 0
#define | MTL_INSTRUMENT_THM1176_DEBUG_COUT(__X__)
#define | MTL_INSTRUMENT_THM1176_DEBUG_CERR(__X__)

## Functions
static const I32 | THM1176_FATAL_ERROR_CODE_LIMIT (200)
static const I32 | THM1176_ERROR_CODE_MEAS_OVERRANGE (205)
static const U32 | THM1176_FILE_ACCESS_TIMEOUT (20000)
static const U32 | THM1176_CALIBRATION_TIMEOUT (30000)
static const std::string | THM1176_CALIBRATION_FILE_NAME ("cal.dat")
static const std::string | THM1176_INFO_FILE_NAME ("info.dat")
static const U32 | THM1176_CAL_FILE_OFFSET_VERSION (32)
static const U32 | THM1176_CAL_FILE_OFFSET_MATRIX_V2 (116)
static const F64 | THM1176_IMMEDIATE_TIME_PER_ACQ_A (1.0281823091218700E-04)
static const F64 | THM1176_IMMEDIATE_TIME_PER_ACQ_B (0.0000116103073008506)
static const F64 | THM1176_IMMEDIATE_TIME_PER_MEAS_A (4.4532792007542600E-05)
static const F64 | THM1176_IMMEDIATE_TIME_PER_MEAS_B (0.0000285930870825438)
static std::string | l_ToString (F32 number, int precision=7, const char *locale="C")
static std::string | l_ToString (F64 number, int precision=15, const char *locale="C")
static void | l_ParseErrorString (std::string &rErrStr, const std::string &rContext, sError &rError)
static std::string | l_ParseRegexError (std::regex_error &rE)

## Variables
static const char * | STATUS_SET_CMDS [4][3]
static const char * | STATUS_GET_CMDS [4][3]
static const std::set< std::string > | MODELS_NOT_TO_CALIBRATE

## Detailed Description

THM1176 API.

Definition in file THM1176.cpp.

## Macro Definition Documentation

## ◆ DEBUG_MTL_INSTRUMENT_THM1176

#define DEBUG_MTL_INSTRUMENT_THM1176 1

Definition at line 26 of file THM1176.cpp.

## ◆ DEBUG_MTL_INSTRUMENT_THM1176_ERRORS_ONLY

#define DEBUG_MTL_INSTRUMENT_THM1176_ERRORS_ONLY 0

Definition at line 27 of file THM1176.cpp.

## ◆ MTL_INSTRUMENT_THM1176_DEBUG_CERR

#define MTL_INSTRUMENT_THM1176_DEBUG_CERR | ( |  | __X__ | ) |

Definition at line 37 of file THM1176.cpp.

## ◆ MTL_INSTRUMENT_THM1176_DEBUG_COUT

#define MTL_INSTRUMENT_THM1176_DEBUG_COUT | ( |  | __X__ | ) |

Definition at line 36 of file THM1176.cpp.

## Function Documentation

## ◆ l_ParseErrorString()

void l_ParseErrorString | ( | std::string & | rErrStr,
|  | const std::string & | rContext,
|  | sError & | rError )
| static

Definition at line 114 of file THM1176.cpp.

## ◆ l_ParseRegexError()

std::string l_ParseRegexError | ( | std::regex_error & | rE | ) |
| static

Definition at line 126 of file THM1176.cpp.

## ◆ l_ToString() [1/2]

std::string l_ToString | ( | F32 | number,
|  | int | precision = 7,
|  | const char * | locale = "C" )
| static

Definition at line 87 of file THM1176.cpp.

## ◆ l_ToString() [2/2]

std::string l_ToString | ( | F64 | number,
|  | int | precision = 15,
|  | const char * | locale = "C" )
| static

Definition at line 99 of file THM1176.cpp.

## ◆ THM1176_CAL_FILE_OFFSET_MATRIX_V2()

const U32 THM1176_CAL_FILE_OFFSET_MATRIX_V2 | ( | 116 |  | ) |
| static

## ◆ THM1176_CAL_FILE_OFFSET_VERSION()

const U32 THM1176_CAL_FILE_OFFSET_VERSION | ( | 32 |  | ) |
| static

## ◆ THM1176_CALIBRATION_FILE_NAME()

const std::string THM1176_CALIBRATION_FILE_NAME | ( | "cal.dat" |  | ) |
| static

## ◆ THM1176_CALIBRATION_TIMEOUT()

const U32 THM1176_CALIBRATION_TIMEOUT | ( | 30000 |  | ) |
| static

## ◆ THM1176_ERROR_CODE_MEAS_OVERRANGE()

const I32 THM1176_ERROR_CODE_MEAS_OVERRANGE | ( | 205 |  | ) |
| static

## ◆ THM1176_FATAL_ERROR_CODE_LIMIT()

const I32 THM1176_FATAL_ERROR_CODE_LIMIT | ( | 200 |  | ) |
| static

## ◆ THM1176_FILE_ACCESS_TIMEOUT()

const U32 THM1176_FILE_ACCESS_TIMEOUT | ( | 20000 |  | ) |
| static

## ◆ THM1176_IMMEDIATE_TIME_PER_ACQ_A()

const F64 THM1176_IMMEDIATE_TIME_PER_ACQ_A | ( | 1.0281823091218700E- | 04 | ) |
| static

## ◆ THM1176_IMMEDIATE_TIME_PER_ACQ_B()

const F64 THM1176_IMMEDIATE_TIME_PER_ACQ_B | ( | 0. | 0000116103073008506 | ) |
| static

## ◆ THM1176_IMMEDIATE_TIME_PER_MEAS_A()

const F64 THM1176_IMMEDIATE_TIME_PER_MEAS_A | ( | 4.4532792007542600E- | 05 | ) |
| static

## ◆ THM1176_IMMEDIATE_TIME_PER_MEAS_B()

const F64 THM1176_IMMEDIATE_TIME_PER_MEAS_B | ( | 0. | 0000285930870825438 | ) |
| static

## ◆ THM1176_INFO_FILE_NAME()

const std::string THM1176_INFO_FILE_NAME | ( | "info.dat" |  | ) |
| static

## Variable Documentation

## ◆ MODELS_NOT_TO_CALIBRATE

const std::set<std::string> MODELS_NOT_TO_CALIBRATE
| static

Initial value:
=
{
std::string("TFM1186")
}

Definition at line 69 of file THM1176.cpp.

## ◆ STATUS_GET_CMDS

const char* STATUS_GET_CMDS[4][3]
| static

Initial value:
=
{
{ "*STB?", "", "*SRE?" },
{ "*ESR?", "", "*ESE?" },
{ ":STAT:QUES:EVEN?", ":STAT:QUES:COND?", ":STAT:QUES:ENAB?" },
{ ":STAT:OPER:EVEN?", ":STAT:OPER:COND?", ":STAT:OPER:ENAB?" }
}

Definition at line 61 of file THM1176.cpp.

## ◆ STATUS_SET_CMDS

const char* STATUS_SET_CMDS[4][3]
| static

Initial value:
=
{
{ "", "", "*SRE" },
{ "", "", "*ESE" },
{ "", "", ":STAT:QUES:ENAB" },
{ "", "", ":STAT:OPER:ENAB" }
}

Definition at line 53 of file THM1176.cpp.