20#define PT2026_CPP_DRIVER_BCD_VERSION 0x0106
36 std::queue<sError> m_ErrorList;
45 : Major(0), Minor(0), IsLegacy0122(
false), IsLegacy0121(
false), IsLegacyPT2026(
false)
48 struct sInstrInformation {
50 std::string Manufacturer;
52 std::string SerialNumber;
53 std::string FirmwareInfo;
55 : Idn(
""), Manufacturer(
""), Model(
""), SerialNumber(
""), FirmwareInfo(
"")
62 bool l_GetErrorList(
const std::string & rContext);
63 bool l_WriteAndRead(
const std::string & rWriteStr,
CVISABuffer & rReadBuffer,
bool WaitForMAV =
false);
100 bool Connect(U32 InitialTimeout_ms);
343 bool ReadFile(std::string Path, std::string & rContent);
344 bool WriteFile(std::string Path,
const std::string & rContent);
359 bool Initiate(
bool Continuous =
false);
360 bool Abort(
bool CancelContinuous =
true);
393 bool StatusGet(std::vector<sStatusRegister> Regs, std::vector<U16> & rStatus);
430 bool LowLevelTransfer(
const std::vector<U8> & rDataToSend, std::vector<U8> & rRcvdData, U8 & rReturnedStatus);
C++ wrapper for NI-VISA: interface definition.
std::string tResourceName
std::vector< tNormalizationFactor_Hz > tNormalizationTable
std::vector< sFile > tFileList
std::vector< tChannel > tChannelList
SCPI channel list
std::vector< unsigned char > tChannel
SCPI channel
bool ParmSearchSet(const sSearch< uParm > &rSearch, F64 Lgc0122_DetectionLevel_V=0.15)
Configure the search operation, including frequency steps and the search bounds specified in the sele...
bool ParmRefClockSet(eReferenceClock RefClock)
bool NormalizationSet(const MTL::SCPI::tChannel &rChannel, const tNormalizationTable &rNormalizationTable)
bool LowLevelTransfer(const std::vector< U8 > &rDataToSend, std::vector< U8 > &rRcvdData, U8 &rReturnedStatus)
bool ParmMeasureGet(sMeasure< uParm > &rMeasure)
const std::vector< sError > ErrorList()
bool ReadDebugLog(std::string &rDebugLog)
Returns a long string containing all the operations that were processed before the last proper instru...
bool MeasurementsGet(U32 NoMeasurements, std::vector< tFlux > &rFlux, eUnits &rUnits)
Returns the NMR magnetic field density measurements, including the unit used. A measurement vector is...
bool ParmComVXI11Get(bool &rEnabled)
bool ParmSearchGet(sSearch< uParm > &rSearch)
bool ParmSearchSetHallEnable(bool Enabled)
Allow the Hall probe to take control over the search range.
bool GetSearchProgress(U8 &rSPR, F32 &rHallMeasurement_UNITS)
bool ChannelGetHall(sProbeHall &rHall)
Returns in the current units the calibrated Hall measurements.
bool Abort(bool CancelContinuous=true)
Abort the current operation (Search or measure). Once the operation is aborted, the instrument will b...
bool ChannelGetRemoteLEDMode(eRemoteBusyLEDmode &rMode)
bool ReadFile(std::string Path, std::string &rContent)
bool GetSettingFileList(std::vector< std::string > &rSettingFileList)
bool ChannelsGetInfo(const MTL::SCPI::tChannelList &rChanList, std::vector< sChannelIformation > &rChanInfo)
bool ParmMatchingTuningSet(const sMatchingTuning< uParm > &rMatchingTuning)
bool NormalizationGet(const MTL::SCPI::tChannel &rChannel, tNormalizationTable &rNormalizationTable)
bool ChannelsGetState(MTL::SCPI::tChannelList &rSelChanList, MTL::SCPI::tChannelList &rActiveChan)
bool ParmUnitsSetPPMRef(tPPMReference_UNITS Ref)
bool ParmSearchSetLimits(F64 LowLimit_UNITS, F64 HighLimit_UNITS)
Set the search bounds in the selected unit.
bool RecallSettings(std::string Name)
const sInstrInformation & InstrumentInfo()
CPT2026Instrument(CVISAResourceManager &rRM, tResourceName Rsrc)
Constructors / destructors.
bool WriteFile(std::string Path, const std::string &rContent)
bool ParmTriggerInputGet(sInputTrigger< uParm > &rInputTrig)
bool SendBusTrigger()
Send a trigger to the instrument. If configured to react to this bus trigger, the acquisition sub sys...
bool ChannelGetRawHall(sProbeRawHall &rRawHall)
Returns the raw 16-bit ADC measurements performed by the hall sensor located at the tip of the NMR pr...
virtual ~CPT2026Instrument()
bool ChannelsSelect(const MTL::SCPI::tChannelList &rChanList)
bool ParmComVXI11Set(bool Enabled)
bool ParmUnitsSet(eUnits Units)
bool ChannelsSetLimitedListState(bool State)
bool ParmRFPulseSet(const sPulse< uParm > &rPulse)
bool ChannelsGetLimits(const MTL::SCPI::tChannelList &rChanList, std::vector< F64 > &rLowLimit_UNITS, std::vector< F64 > &rHighLimit_UNITS)
bool ParmRFPulseGet(sPulse< uParm > &rPulse)
bool SetFormat(eCommunicationFormat Format)
One can request the data in ASCII or binary format. The binary format, which needs extra operation to...
bool ParmComUsbSet(bool Enabled)
bool ParmTriggerInputSet(const sInputTrigger< uParm > &rInputTrig)
bool ParmUnitsGet(eUnits &rUnits, tPPMReference_UNITS &rRef)
bool ParmRefClockGet(eReferenceClock &rRefClock)
bool ChannelSetRemoteLEDMode(eRemoteBusyLEDmode Mode)
bool StandardStatusSetEnableRegister(eStandardStatusRegister Set, U16 DisableMask, U16 EnableMask)
bool ParmSearchGetHallEnable(bool &rEnabled)
bool GetIdentification(std::string &rIdentification)
Returns the instrument identification string including its serial number and make....
bool ParmDigitizationSet(const sDigitization< uParm > &rDigitization)
bool ReadFileDirectory(U32 &rUsedBytes, U32 &rAvailableBytes, tFileList &rFileList)
bool DeviceROMRead(const MTL::SCPI::tChannel &rChannel, std::vector< U8 > &rROMContent)
bool SaveSettings(eSettingType Type, std::string Name)
bool ParmComEthernetSet(const sEthernet &rSettings)
bool ReadManufacturingDate(std::string &rSManufacturingDate, std::time_t &rManufacturingDate)
Returns the manufacturing date in plain text or a number representing the amount of seconds since 00:...
bool ParmAveragingMeasurementSet(const sMeasurementAveraging< uParm > &rMeasAvg)
bool AuthenticationRequest(const std::string &rCipherMsgSet, bool &rIsAuthenticated)
bool ParmAveragingMeasurementGet(sMeasurementAveraging< uParm > &rMeasAvg)
bool DeviceROMWrite(const MTL::SCPI::tChannel &rChannel, const std::vector< U8 > &rROMContent)
bool AuthenticationStatus(bool &rIsAuthenticated, std::string &rCipherMsgGet)
bool StatusGet(sStatusRegister Reg, U16 &rStatus)
bool ForceOutputTrigger()
Set the output trigger according to current output trigger parametrization. This method is very speci...
bool ParmMatchingTuningGet(sMatchingTuning< uParm > &rMatchingTuning)
bool ParmMeasureSet(const sMeasure< uParm > &rMeasure)
bool ParmComEthernetGet(sEthernet &rSettings)
bool ReadCalibrationDate(std::string &rSCalibrationDate, std::time_t &rCalibrationDate)
Returns the calibration date in plain text or a number representing the amount of seconds since 00:00...
bool ParmDigitizationGet(sDigitization< uParm > &rDigitization)
bool Connect(U32 InitialTimeout_ms)
bool SwitchToDFUMode()
Restart the instrument in USB DFU mode, allowing the firmware to be upgraded.
bool SetCalibrationDate(std::string &rNewCalibrationDate)
Sets the new calibration date, given in YYMMDD format.
bool WriteCustomCommand(const std::string &rWriteStr)
bool ChannelsGetList(MTL::SCPI::tChannelList &rChanList)
bool StatusSetEnableRegister(eStatusRegisterSet Set, U16 DisableMask, U16 EnableMask)
bool DeleteFile(std::string Path)
bool ParmAveragingSignalGet(sSignalAveraging< uParm > &rSigAvg)
bool Reset()
Calling this method will wipe out all user parameters that are stored in the file system and revert t...
bool StatusSetTransitionFilter(eStatusRegisterSet Set, eTransition Transition, U16 ClearMask, U16 SetMask)
bool PowerOff(bool Reboot=false)
Sending this command will shut the instrument down. Setting the reboot parameter to true will initiat...
bool ReadCaseTemperature(F32 &rTemperatureDegC)
Returns the internal instrument temperature. An internal survey will shut the instrument down if this...
bool ChannelsGetLimitedListState(bool &rState)
bool GetSystemVersionAll(std::string &rSystVersion)
Returns all versions information (Hardware & Firmware) for the entire instrument. Available command w...
bool Initiate(bool Continuous=false)
Starts the search operation and then immediately after NMR resonance detection proceed to NMR measure...
bool ParmComUsbGet(bool &rEnabled)
bool ParmAveragingSignalSet(const sSignalAveraging< uParm > &rSigAvg)
bool ParmSearchSetManualValue(F64 ManualValue_UNITS)
Ask the instrument to perform a measurement at fixed frequency. Automatic search mode is left.
bool ParmTriggerOutputGet(sOutputTrigger< uParm > &rOutputTrig)
bool ParmTriggerOutputSet(const sOutputTrigger< uParm > &rOutputTrig)
const sFwVersion & FwVerInfo()
VISA Resource Manager class.
CVISAInstrument(CVISAResourceManager &rRM, tResourceName Rsrc)