18#define MFC3045_CPP_DRIVER_BCD_VERSION 0x0102
33 U32 m_WaitTimeRdData_ms;
35 bool m_AbortSerialTransfert;
51 bool l_ClearHostSerialBufferRxTx();
52 bool l_GetNewDataRxBufferLength(U32 & rRxBufferLength);
53 bool l_WaitAvailableDataRX(
const U32 & rTimeoutRx, U32 & rRXBufferLength,
const bool & rErrorOnTimoute=
true);
54 bool l_ExtractSmaMsgFromDataRX(
const std::string & rNewRxBufferStrIn,
uSMAByte & rSMAValue, std::string & rNewRxBufferStrOut);
55 bool l_ExtractPaDrSmaMsgFromDataRX(
const std::string & rNewRxBufferStrIn,
uSMAByte & rSMAValue, std::string & rNewRxBufferStrOut);
57 bool l_Write(
const std::string & rWriteStr,
const bool & rForceWrite=
false);
58 bool l_ReadString(std::string & rRxBufferStr,
const U8 & rNStringAssembly=1,
const bool & rCheckSmaMsg=
false,
const bool & rAddDelay=
true);
59 bool l_ReadNCharNoTerm(
CVISABuffer & rReadBuffer,
const U16 & rReadNChar,
const bool & rAddDelay=
true);
62 bool l_DateStrToDateTimeUtc(
const std::string & rUtcDateStr, std::time_t & rUtcDateTime);
63 bool l_DateTimeToDateStrUtc(
const std::time_t & rUtcDateTime, std::string & rUtcDateStr);
98 bool ReadWithCustomCmd(
const std::string & rCommandStr, std::string & rRegValStr);
129 bool VersionGet(std::string & rVersionInfo, F32 & rFwVersion);
153 bool StatusGet(
const std::vector<eStatusRegister> & rStatRegSel, std::vector<U8> & rStatus);
156 bool SMAGet(U8 & rRegVal);
160 bool l_SMASet(
const U8 & rRegVal);
255 bool l_ReadEndTransmissionBlockChar();
256 bool l_ReadMeasurementTableBlock(
const std::string rStringCMD, std::vector<U32> & rData);
346 bool CalibrationDatePASet(
const U8 & rDayDD,
const U8 & rMonthMM,
const U8 & rYearYY,
const bool & rSaveInEeprom =
false);
350 bool CalibrationDateMUSet(
const U8 & rDayDD,
const U8 & rMonthMM,
const U8 & rYearYY,
const bool & rSaveInEeprom =
false);
Types definition for C++ API for Metrolab MFC3045.
#define RS_RDWR_VISA_TIMEOUT_MS
#define RS_WAIT_DATARD_MS
C++ wrapper for NI-VISA: interface definition.
std::string tResourceName
bool NmrThresholdSet(const U8 &rRegVal)
bool SerialRSPSet(const U16 &rRegVal)
bool RfHarmonicGet(eRFH &rRegVal)
bool CalibrationProbeMeasurementTableGet(std::vector< U32 > &rData)
void SetTimeoutRdNewDataMs(const U32 &rNewdataTimeout_ms=RS_WAIT_DATARD_MS)
virtual ~CMFC3045Instrument()
bool FrequencySweepShiftSet(const eShiftFreq &rShiftDirection)
bool NumberMeasCycleSet(const U16 &rRegVal)
bool DataLowestFrequencyGet(U32 &rData)
bool ModulationPeriodGet(U16 &rRegVal)
bool DataBlockModeDecimalSet()
bool CalibrationEditTableGetProbePointed(U8 &rProbeIdxCET)
void GetDelayWrRd(U32 &rDelayWrRd_ms)
bool DdsFrequencyGet(U32 &rRegVal)
bool ContinuousMeasStart()
CMFC3045Instrument(CVISAResourceManager &rRM, tResourceName Rsrc)
Constructors / destructors.
bool ReadWithCustomCmd(const std::string &rCommandStr, std::string &rRegValStr)
bool PaLowestFreqGet(U32 &rRegVal)
bool ModulationHighestFreqGet(U32 &rRegVal)
bool SerialNumberGet(std::string &rSerialNum)
void GetCurrentTimeoutRdDataMs(U32 &rRdDataTimeout_ms)
bool NmrThresholdGet(U8 &rRegVal)
bool ParseParmForRSP(const sSerialPortSettings &rSerialSettings, U16 &rParmRSPSettings)
bool RejectionOffsetSet(const U16 &rRegVal)
bool ModulationNumberStepRampGet(U32 &rRegVal)
bool FrequencySweepSet(const eSweepFreqMode &rSweepMode, const U32 &rFreqStepVal=0)
bool TimeVsPrecisionSet(const ePrecision &rRegVal)
bool DataIndividualFrequencyGet(U32 &rDataUp, U32 &rDataDown)
bool CalibrationDatePAGet(std::string &rStrDate, std::time_t &rUtcDate)
bool DataStdDeviationGet(std::vector< U32 > &rData)
bool RejectionOffsetGet(U16 &rRegVal)
bool DdsFrequencySet(const U32 &rRegVal)
bool ModulationAmplitudeGet(U32 &rRegVal)
bool ProbeArrayEepromRead(std::vector< char > &rEEPROMContent)
bool ModulationReferenceSet(const eModulationRef &rRegVal)
bool CalibrationMeasurementAverageProbeGet(U32 &rData)
bool ModulationCentralFreqGet(U32 &rRegVal)
bool RemoteBusyLedSet(const eRemoteBusyLed &rRemoteLed)
bool NumberMeasCycleGet(U16 &rRegVal)
bool ModulationNumberStepPlateauGet(U32 &rRegVal)
bool NumberPreCycleGet(U16 &rRegVal)
bool NumberPreCycleSet(const U16 &rRegVal)
bool CalibrationBuildProbeGet(I32 &rData, const U8 &rProbeSel)
bool AdvancedCommandModeGet(eAdvancedMode &rRegVal)
bool ModulationPeriodSet(const U16 &rRegVal)
bool CalibrationProbeMeasurementTableClear()
bool RejectionGapSet(const U16 &rRegVal)
bool RfHarmonicSet(const eRFH &rRegVal)
bool CheckInstrumentConnection(const U8 &rl_Retry=3)
bool NumberProbesSet(const U8 &rRegVal)
bool CalibrationBuildTableCopyEEPROMToRAM()
bool CalibrationDateMUSet(const U8 &rDayDD, const U8 &rMonthMM, const U8 &rYearYY, const bool &rSaveInEeprom=false)
bool DataNumberValidCycleGet(std::vector< U32 > &rData)
bool ConnectInstrument(const sSerialPortSettings &rSerialSettings, const U32 &rInitialTimeout_ms=RS_RDWR_VISA_TIMEOUT_MS)
bool PaCentralFreqSet(const U32 &rRegVal)
bool ModulationLowestFreqSet(const U32 &rRegVal)
bool PaHighestFreqSet(const U32 &rRegVal)
bool ModulationLowestFreqGet(U32 &rRegVal)
bool DataBlockModeGet(eDataBlockMode &rRegVal)
bool ModulationReferenceGet(eModulationRef &rRegVal)
bool ProbeArrayEepromWrite()
bool CalibrationDatePASet(const U8 &rDayDD, const U8 &rMonthMM, const U8 &rYearYY, const bool &rSaveInEeprom=false)
bool NumberProbesGet(U8 &rRegVal)
bool DataMagneticFieldGet(std::vector< U32 > &rData)
bool TimeVsPrecisionGet(ePrecision &rRegVal)
bool CalibrationEditTableSet(const I32 &rData)
bool RemoteBusyLedGet(eRemoteBusyLed &rRemoteLed)
bool ModulationHighestFreqSet(const U32 &rRegVal)
bool PaHighestFreqGet(U32 &rRegVal)
bool ModulationCentralFreqSet(const U32 &rRegVal)
bool DataCentralFrequencyGet(U32 &rData)
bool MainUnitEepromWrite()
bool CalibrationBuildTableWithTargetSet(const U32 &rTarget)
bool DataDifferenceFrequencyGet(U32 &rData)
bool DataHighestFrequencyGet(U32 &rData)
bool ModulationAmplitudeSet(const U32 &rRegVal)
bool CalibrationDateMUGet(std::string &rStrDate, std::time_t &rUtcDate)
bool RejectionGapGet(U16 &rRegVal)
bool MainUnitEepromRead(std::vector< char > &rEEPROMContent)
bool SerialRSPGet(U16 &rRegVal)
bool DdsBitResolutionFdhzGet(F32 &rDdsResolutionFdhz)
bool StatusGet(const eStatusRegister &rStatRegSel, U8 &rStatus)
void SetDelayWrRd(const U32 &rDelayWrRd_ms)
bool WaitSmaMeasureDataReady(const U32 &rMeasWaitTimeout_ms, uSMAByte &rDataReady)
bool CalibrationBuildTableGet(std::vector< I32 > &rData)
bool TimePreCycleGet(U16 &rRegVal)
bool SearchStartWithSMA()
bool VersionGet(std::string &rVersionInfo, F32 &rFwVersion)
bool TimePreCycleSet(const U16 &rRegVal)
bool AdvancedCommandModeSet(const eAdvancedMode &rRegVal)
bool CalibrationBuildTableClearRAM()
bool ParseParmFromRSP(const U16 &rParmRSPSettings, sSerialPortSettings &rSerialSettings)
bool LastCmdErrorGet(std::string &rCmdError)
bool CalibrationProbeMeasurementSet(const U8 &rProbeSel)
bool PaCentralFreqGet(U32 &rRegVal)
bool DdsBitResolutionGet(U32 &rRegVal)
bool PaLowestFreqSet(const U32 &rRegVal)
bool DisconnectInstrument()
VISA Resource Manager class.
CVISAInstrument(CVISAResourceManager &rRM, tResourceName Rsrc)