66 #define THM1176_SUPPORTED_VERSION_MIN_MAJOR 3
67 #define THM1176_SUPPORTED_VERSION_MIN_MINOR 0
68 #define THM1176_SUPPORTED_VERSION_MAX_MAJOR 3
69 #define THM1176_SUPPORTED_VERSION_MAX_MINOR 1
72 using namespace Eigen;
75 namespace Instrument {
97 template <
class InstrType,
class RsrcMgrType>
107 std::string m_Identification;
113 std::map<eUnits,U32> m_Units;
114 Matrix3f m_RotationMatrix;
115 std::string m_ManufacturingDate;
116 std::string m_CalibrationDate;
123 bool m_UseCalibration;
126 std::vector<std::chrono::high_resolution_clock::time_point> m_TriggerTimes;
127 std::atomic_bool m_AbortRead;
133 bool ReadIdentification(std::string & rIdentification);
134 bool ParseIdentification(
struct sIdentifier & rIdentification);
135 bool GetErrorList(
CErrorList & rList,
const std::string & rContext);
138 bool ReadAllUnits(std::map<eUnits,U32> & rAllUnits);
139 bool ReadUseCalibration(
bool & rUseCal);
140 bool ReadManufacturingDate(std::string & rDate);
141 bool ReadRotationMatrix(Matrix3f & rMatrix, std::string & rCalibrationDate);
167 void ClearErrorList();
174 bool Connect(
U32 InitialTimeout,
bool Exclusive =
true);
201 bool ParmSleepSet(
bool Sleep);
206 bool ParmSleepGet(
bool & rSleep);
228 bool ParmUnitsSet(
eUnits Units);
233 bool ParmUnitsGet(
eUnits & rUnits);
239 bool ParmUseCalibrationSet(
bool UseCal);
244 bool ParmUseCalibrationGet(
bool & rUseCal);
269 bool ReadFileDirectory(
U32 & rUsedBytes,
U32 & rAvailableBytes,
tFileList & rFileList);
275 bool ReadFile(std::string Path, std::string & rContent);
282 bool Initiate(
bool Continuous =
false);
290 bool SendBusTrigger();
308 bool MeasurementsGet(
U32 NoMeasurements,
354 bool DefaultParms =
true,
eUnits Units =
kT,
355 tFlux ExpectedField = 0.,
unsigned int NoDigits = 0);
368 bool DefaultParms =
true,
eUnits Units =
kT,
369 tFlux ExpectedField = 0.,
unsigned int NoDigits = 0);
405 bool WriteAndRead(
const std::string & rWriteStr,
CSCPIBuffer & rReadBuffer);
410 bool GetIdentification(std::string & rIdentification);
415 bool GetIdentification(
sIdentifier & rIdentification);
441 bool GetDivisor(
eUnits Units,
U32 & rDivisor);
446 bool GetRotationMatrix(Matrix3f & Matrix);
461 bool CalibrateZeroOffset(
bool ForceCalibration =
false);
465 bool RestoreZeroOffset();
477 bool SwitchToDFUMode();
485 bool ReadInformationDates(std::string & rSManufacturingDate, std::time_t & rManufacturingDate, std::string & rSCalibrationDate, std::time_t & rCalibrationDate);