16 #define MRPT_HAS_SOME_NIDAQMX (MRPT_HAS_NIDAQMXBASE || MRPT_HAS_NIDAQMX)
18 #define MRPT_USE_NIDAQMXBASE (MRPT_HAS_NIDAQMXBASE && !MRPT_HAS_NIDAQMX)
19 #define MRPT_USE_NIDAQMX (MRPT_HAS_NIDAQMX)
22 #if MRPT_USE_NIDAQMXBASE
23 # include "NIDAQmxBase.h"
30 #if MRPT_USE_NIDAQMXBASE
31 # define MRPT_DAQmxGetExtendedErrorInfo DAQmxBaseGetExtendedErrorInfo
32 # define MRPT_DAQmxCreateTask DAQmxBaseCreateTask
33 # define MRPT_DAQmxCreateAIVoltageChan DAQmxBaseCreateAIVoltageChan
34 # define MRPT_DAQmxCreateAOVoltageChan DAQmxBaseCreateAOVoltageChan
35 # define MRPT_DAQmxCreateDIChan DAQmxBaseCreateDIChan
36 # define MRPT_DAQmxCreateDOChan DAQmxBaseCreateDOChan
37 # define MRPT_DAQmxCreateCIPeriodChan DAQmxBaseCreateCIPeriodChan
38 # define MRPT_DAQmxCreateCICountEdgesChan DAQmxBaseCreateCICountEdgesChan
39 # define MRPT_DAQmxCreateCIPulseWidthChan DAQmxBaseCreateCIPulseWidthChan
40 # define MRPT_DAQmxCreateCILinEncoderChan DAQmxBaseCreateCILinEncoderChan
41 # define MRPT_DAQmxCreateCIAngEncoderChan DAQmxBaseCreateCIAngEncoderChan
42 # define MRPT_DAQmxCreateCOPulseChanFreq DAQmxBaseCreateCOPulseChanFreq
43 # define MRPT_DAQmxCfgSampClkTiming DAQmxBaseCfgSampClkTiming
44 # define MRPT_DAQmxCfgInputBuffer DAQmxBaseCfgInputBuffer
45 # define MRPT_DAQmxCfgOutputBuffer DAQmxBaseCfgOutputBuffer
46 # define MRPT_DAQmxStartTask DAQmxBaseStartTask
47 # define MRPT_DAQmxStopTask DAQmxBaseStopTask
48 # define MRPT_DAQmxClearTask DAQmxBaseClearTask
49 # define MRPT_DAQmxReadAnalogF64 DAQmxBaseReadAnalogF64
50 # define MRPT_DAQmxReadCounterF64 DAQmxBaseReadCounterF64
51 # define MRPT_DAQmxReadDigitalU8 DAQmxBaseReadDigitalU8
52 # define MRPT_DAQmxWriteAnalogF64 DAQmxBaseWriteAnalogF64
53 # define MRPT_DAQmxWriteDigitalU32 DAQmxBaseWriteDigitalU32
54 # define MRPT_DAQmxWriteDigitalLines DAQmxBaseWriteDigitalLines
56 # define MRPT_DAQmxGetExtendedErrorInfo DAQmxGetExtendedErrorInfo
57 # define MRPT_DAQmxCreateTask DAQmxCreateTask
58 # define MRPT_DAQmxCreateAIVoltageChan DAQmxCreateAIVoltageChan
59 # define MRPT_DAQmxCreateAOVoltageChan DAQmxCreateAOVoltageChan
60 # define MRPT_DAQmxCreateDIChan DAQmxCreateDIChan
61 # define MRPT_DAQmxCreateDOChan DAQmxCreateDOChan
62 # define MRPT_DAQmxCreateCIPeriodChan DAQmxCreateCIPeriodChan
63 # define MRPT_DAQmxCreateCICountEdgesChan DAQmxCreateCICountEdgesChan
64 # define MRPT_DAQmxCreateCIPulseWidthChan DAQmxCreateCIPulseWidthChan
65 # define MRPT_DAQmxCreateCILinEncoderChan DAQmxCreateCILinEncoderChan
66 # define MRPT_DAQmxCreateCIAngEncoderChan DAQmxCreateCIAngEncoderChan
67 # define MRPT_DAQmxCreateCOPulseChanFreq DAQmxCreateCOPulseChanFreq
68 # define MRPT_DAQmxCfgSampClkTiming DAQmxCfgSampClkTiming
69 # define MRPT_DAQmxCfgInputBuffer DAQmxCfgInputBuffer
70 # define MRPT_DAQmxCfgOutputBuffer DAQmxCfgOutputBuffer
71 # define MRPT_DAQmxStartTask DAQmxStartTask
72 # define MRPT_DAQmxStopTask DAQmxStopTask
73 # define MRPT_DAQmxClearTask DAQmxClearTask
74 # define MRPT_DAQmxReadAnalogF64 DAQmxReadAnalogF64
75 # define MRPT_DAQmxReadCounterF64 DAQmxReadCounterF64
76 # define MRPT_DAQmxReadDigitalU8 DAQmxReadDigitalU8
77 # define MRPT_DAQmxWriteAnalogF64 DAQmxWriteAnalogF64
78 # define MRPT_DAQmxWriteDigitalU32 DAQmxWriteDigitalU32
79 # define MRPT_DAQmxWriteDigitalLines DAQmxWriteDigitalLines
83 #define MRPT_DAQmx_ErrChk(functionCall) \
84 if( (functionCall)<0) \
87 MRPT_DAQmxGetExtendedErrorInfo(errBuff,2048); \
88 std::string sErr = mrpt::format("DAQ error: '%s'\nCalling: '%s'",errBuff,#functionCall); \
89 THROW_EXCEPTION(sErr) \
106 new_obs_available(0),
114 mrpt::utils::COutputLogger(
"CNationalInstrumentsDAQ")
120 #define MY_LOAD_HERE_CONFIG_VAR(variableName,variableType,targetVariable,configFileObject,sectionNameStr) \
121 targetVariable = configFileObject.read_##variableType(sectionNameStr,variableName,targetVariable,false);
123 #define MY_LOAD_HERE_CONFIG_VAR_NO_DEFAULT(variableName,variableType,targetVariable,configFileObject,sectionNameStr) \
125 targetVariable = configFileObject.read_##variableType(sectionNameStr,variableName,targetVariable,true); \
126 } catch (std::exception &) \
128 THROW_EXCEPTION( format( "Value for '%s' not found in config file", std::string(variableName).c_str() )); \
143 const unsigned int nTasks = cfg.
read_uint64_t(sect,
"num_tasks", 0,
true );
145 std::cerr <<
"[CNationalInstrumentsDAQ] Warning: Number of tasks is zero. No datalogging will be done.\n";
149 for (
unsigned int i=0;i<nTasks;i++)
156 const string sChanns = cfg.
read_string(sect,sTask+
string(
".channels"),
"",
true);
157 vector<string> lstStrChanns;
159 if (lstStrChanns.empty())
166 t.taskLabel = cfg.
read_string(sect,sTask+
string(
".taskLabel"), sTask,
false );
168 for (
size_t j=0;j<lstStrChanns.size();j++)
170 if (
strCmpI(lstStrChanns[j],
"ai"))
179 else if (
strCmpI(lstStrChanns[j],
"ao"))
187 else if (
strCmpI(lstStrChanns[j],
"di"))
192 else if (
strCmpI(lstStrChanns[j],
"do"))
197 else if (
strCmpI(lstStrChanns[j],
"ci_period"))
199 t.has_ci_period =
true;
208 else if (
strCmpI(lstStrChanns[j],
"ci_count_edges"))
210 t.has_ci_count_edges =
true;
213 MY_LOAD_HERE_CONFIG_VAR( sTask+
string(
".ci_count_edges.initialCount"),
int,
t.ci_count_edges.initialCount, cfg,sect)
214 MY_LOAD_HERE_CONFIG_VAR( sTask+
string(
".ci_count_edges.countDirection"),
string,
t.ci_count_edges.countDirection, cfg,sect)
216 else if (
strCmpI(lstStrChanns[j],
"ci_pulse_width"))
218 t.has_ci_pulse_width =
true;
225 else if (
strCmpI(lstStrChanns[j],
"ci_lin_encoder"))
227 t.has_ci_lin_encoder =
true;
237 else if (
strCmpI(lstStrChanns[j],
"ci_ang_encoder"))
239 t.has_ci_ang_encoder =
true;
251 else if (
strCmpI(lstStrChanns[j],
"co_pulses"))
253 t.has_co_pulses =
true;
262 THROW_EXCEPTION_FMT(
"Unknown channel type '%s'! See the docs of CNationalInstrumentsDAQ",lstStrChanns[j].c_str())
276 #if MRPT_HAS_SOME_NIDAQMX
278 struct daqmx_str_val {
283 const daqmx_str_val daqmx_vals[] = {
284 {
"DAQmx_Val_Cfg_Default", DAQmx_Val_Cfg_Default },
285 {
"DAQmx_Val_RSE", DAQmx_Val_RSE },
286 {
"DAQmx_Val_NRSE", DAQmx_Val_NRSE },
287 {
"DAQmx_Val_Diff", DAQmx_Val_Diff },
288 {
"DAQmx_Val_Seconds", DAQmx_Val_Seconds },
289 {
"DAQmx_Val_Rising", DAQmx_Val_Rising },
290 {
"DAQmx_Val_Falling", DAQmx_Val_Falling },
291 {
"DAQmx_Val_CountUp", DAQmx_Val_CountUp },
292 {
"DAQmx_Val_CountDown", DAQmx_Val_CountDown },
293 {
"DAQmx_Val_ExtControlled", DAQmx_Val_ExtControlled },
294 {
"DAQmx_Val_AHighBHigh", DAQmx_Val_AHighBHigh },
295 {
"DAQmx_Val_AHighBLow", DAQmx_Val_AHighBLow },
296 {
"DAQmx_Val_ALowBHigh", DAQmx_Val_ALowBHigh },
297 {
"DAQmx_Val_ALowBLow", DAQmx_Val_ALowBLow },
298 {
"DAQmx_Val_X1", DAQmx_Val_X1},
299 {
"DAQmx_Val_X2", DAQmx_Val_X2},
300 {
"DAQmx_Val_X4", DAQmx_Val_X4},
301 {
"DAQmx_Val_Meters", DAQmx_Val_Meters },
302 {
"DAQmx_Val_Inches", DAQmx_Val_Inches },
303 {
"DAQmx_Val_Ticks", DAQmx_Val_Ticks },
304 {
"DAQmx_Val_Degrees", DAQmx_Val_Degrees },
305 {
"DAQmx_Val_Radians", DAQmx_Val_Radians },
306 {
"DAQmx_Val_High", DAQmx_Val_High},
307 {
"DAQmx_Val_Low", DAQmx_Val_Low}
314 for (
unsigned int i=0;i<
sizeof(daqmx_vals)/
sizeof(daqmx_vals[0]);i++)
316 if (
strCmpI(daqmx_vals[i].str,
s.c_str()))
317 return daqmx_vals[i].
val;
328 #if MRPT_HAS_SOME_NIDAQMX
342 TaskHandle &taskHandle= *
reinterpret_cast<TaskHandle*
>(&ipt.
taskHandle);
363 tf.
di.
line.c_str(),NULL,DAQmx_Val_ChanPerLine));
367 tf.
douts.
line.c_str(),NULL,DAQmx_Val_ChanPerLine));
375 DAQmx_Val_LowFreq1Ctr,
453 ipt.
read_pipe->timeout_read_start_us = 100000;
454 ipt.
read_pipe->timeout_read_between_us = 100000;
462 catch (std::exception
const &e)
464 std::cerr <<
"[CNationalInstrumentsDAQ] Error:" << std::endl << e.what() << std::endl;
467 TaskHandle &taskHandle= *
reinterpret_cast<TaskHandle*
>(&ipt.
taskHandle);
476 cerr <<
"[CNationalInstrumentsDAQ::initialize] Waiting for the grabbing thread to end due to exception...\n";
478 cerr <<
"[CNationalInstrumentsDAQ::initialize] Grabbing thread ended.\n";
484 std::cerr <<
"[CNationalInstrumentsDAQ] Error while creating tasks. Closing other tasks before returning...\n";
486 std::cerr <<
"[CNationalInstrumentsDAQ] Closing tasks done.\n";
505 if (
m_verbose) cout <<
"[CNationalInstrumentsDAQ::stop] Waiting for grabbing threads to end...\n";
514 if (
m_verbose) cout <<
"[CNationalInstrumentsDAQ::stop] All threads ended.\n";
517 #if MRPT_HAS_SOME_NIDAQMX
520 TaskHandle &taskHandle= *
reinterpret_cast<TaskHandle*
>(&it->taskHandle);
540 std::vector<mrpt::obs::CObservationRawDAQPtr> &outObservations,
541 bool &hardwareError )
543 hardwareError =
false;
544 outObservations.clear();
548 hardwareError =
true;
561 if (it->new_obs_available!=0)
563 it->read_pipe->ReadObject(&tmp_obs);
564 --(it->new_obs_available);
596 std::vector<mrpt::utils::CSerializablePtr> new_obs;
612 #if MRPT_HAS_SOME_NIDAQMX
615 TaskHandle &taskHandle= *
reinterpret_cast<TaskHandle*
>(&ipt.
taskHandle);
616 if (
m_verbose) cout <<
"[CNationalInstrumentsDAQ::grabbing_thread] Starting thread for task " << ipt.
taskHandle <<
"\n";
625 vector<uint8_t> u8Buf;
639 bool there_are_data =
false;
649 dBuf.resize(totalSamplesToRead);
650 int32 pointsReadPerChan=-1;
654 &dBuf[0],dBuf.size(),
655 &pointsReadPerChan,NULL))<0 && err!=DAQmxErrorSamplesNotYetAvailable)
659 else if (pointsReadPerChan>0) {
662 there_are_data =
true;
663 if (
m_verbose) cout <<
"[CNationalInstrumentsDAQ::grabbing_thread] " << pointsReadPerChan <<
" analog samples read.\n";
669 u8Buf.resize(totalSamplesToRead);
671 int32 pointsReadPerChan=-1;
675 &u8Buf[0],u8Buf.size(),
676 &pointsReadPerChan,NULL))<0 && err!=DAQmxErrorSamplesNotYetAvailable)
680 else if (pointsReadPerChan>0) {
683 there_are_data =
true;
684 if (
m_verbose) cout <<
"[CNationalInstrumentsDAQ::grabbing_thread] " << pointsReadPerChan <<
" digital samples read.\n";
690 dBuf.resize(totalSamplesToRead);
691 int32 pointsReadPerChan=-1;
694 totalSamplesToRead,timeout,
695 &dBuf[0],dBuf.size(),
696 &pointsReadPerChan,NULL))<0 && err!=DAQmxErrorSamplesNotYetAvailable)
700 else if (pointsReadPerChan>0) {
709 there_are_data =
true;
714 cout <<
"[CNationalInstrumentsDAQ::grabbing_thread] " << pointsReadPerChan <<
" counter samples read ([0]="<< obs.
CNTRIN_double[0] <<
").\n";
715 if (++decim>100) decim=0;
734 catch(std::exception &e)
736 std::cerr <<
"[CNationalInstrumentsDAQ::grabbing_thread] Exception:\n" << e.what() << std::endl;
746 #if MRPT_HAS_SOME_NIDAQMX
750 std::advance(it, task_index);
752 TaskHandle &taskHandle= *
reinterpret_cast<TaskHandle*
>(&ipt.
taskHandle);
754 int32 samplesWritten=0;
758 nSamplesPerChannel,
FALSE,timeout, groupedByChannel ? DAQmx_Val_GroupByChannel : DAQmx_Val_GroupByScanNumber,
759 const_cast<float64*
>(volt_values),
760 &samplesWritten, NULL) )
772 #if MRPT_HAS_SOME_NIDAQMX
776 std::advance(it, task_index);
778 TaskHandle &taskHandle= *
reinterpret_cast<TaskHandle*
>(&ipt.
taskHandle);
780 uInt8 dat = line_value ? 1:0;
782 int32 samplesWritten=0;
783 int32 nSamplesPerChannel = 1;
787 nSamplesPerChannel,
FALSE,timeout, DAQmx_Val_GroupByScanNumber,
788 &dat,&samplesWritten,NULL) )
801 has_ai(false), has_ao(false), has_di(false), has_do(false),
802 has_ci_period(false), has_ci_count_edges(false), has_ci_pulse_width(false), has_ci_lin_encoder(false),has_ci_ang_encoder(false),has_co_pulses(false),
803 samplesPerSecond(1000.0),
804 bufferSamplesPerChannel(200000),
805 samplesPerChannelToRead(1000)
#define IMPLEMENTS_GENERIC_SENSOR(class_name, NameSpace)
This must be inserted in all CGenericSensor classes implementation files:
#define MRPT_DAQmxCreateCOPulseChanFreq
#define MRPT_DAQmxCreateCICountEdgesChan
#define MRPT_DAQmxWriteDigitalLines
#define MRPT_DAQmxCfgInputBuffer
#define MRPT_DAQmxCfgSampClkTiming
#define MRPT_DAQmxStopTask
#define MY_LOAD_HERE_CONFIG_VAR(variableName, variableType, targetVariable, configFileObject, sectionNameStr)
#define MRPT_DAQmxStartTask
#define MRPT_DAQmxCreateCILinEncoderChan
#define MRPT_DAQmxCreateCIPulseWidthChan
#define MRPT_DAQmxCreateTask
#define MRPT_DAQmxReadCounterF64
#define MRPT_DAQmxCreateAIVoltageChan
#define MRPT_DAQmxReadDigitalU8
#define MY_LOAD_HERE_CONFIG_VAR_NO_DEFAULT(variableName, variableType, targetVariable, configFileObject, sectionNameStr)
#define MRPT_DAQmxCreateCIAngEncoderChan
#define MRPT_DAQmxCreateCIPeriodChan
#define MRPT_DAQmxCreateAOVoltageChan
#define MRPT_DAQmxCreateDOChan
#define MRPT_DAQmx_ErrChk(functionCall)
#define MRPT_DAQmxCreateDIChan
#define MRPT_DAQmxClearTask
#define MRPT_DAQmxReadAnalogF64
#define MRPT_DAQmxWriteAnalogF64
void appendObservations(const std::vector< mrpt::utils::CSerializablePtr > &obj)
This method must be called by derived classes to enqueue a new observation in the list to be returned...
std::string m_sensorLabel
See CGenericSensor.
An interface to read from data acquisition boards compatible with National Instruments "DAQmx Base" o...
void stop()
Stop the grabbing threads for DAQ tasks.
virtual void initialize()
Setup and launch the DAQ tasks, in parallel threads.
std::list< TInfoPerTask > m_running_tasks
void loadConfig_sensorSpecific(const mrpt::utils::CConfigFileBase &configSource, const std::string &iniSection)
See the class documentation at the top for expected parameters.
std::vector< mrpt::obs::CObservationRawDAQPtr > m_nextObservations
A buffer for doProcess.
void readFromDAQ(std::vector< mrpt::obs::CObservationRawDAQPtr > &outObservations, bool &hardwareError)
Receives data from the DAQ thread(s).
void writeAnalogOutputTask(size_t task_index, size_t nSamplesPerChannel, const double *volt_values, double timeout, bool groupedByChannel)
Set voltage outputs to all the outputs in an AOUT task For the meaning of parameters,...
bool checkDAQIsWorking() const
Returns true if initialize() was called and at least one task is running.
void writeDigitalOutputTask(size_t task_index, bool line_value, double timeout)
Changes the boolean state of one digital output line.
virtual ~CNationalInstrumentsDAQ()
Destructor.
std::vector< TaskDescription > task_definitions
Publicly accessible vector with the list of tasks to be launched upon call to CNationalInstrumentsDAQ...
void grabbing_thread(TInfoPerTask &ipt)
Method to be executed in each parallel thread.
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
CNationalInstrumentsDAQ()
Constructor.
std::string sensorLabel
An arbitrary label that can be used to identify the sensor.
mrpt::system::TTimeStamp timestamp
The associated UTC time-stamp. Where available, this should contain the accurate satellite-based time...
Store raw data from a Data Acquisition (DAQ) device, such that input or output analog and digital cha...
std::vector< double > CNTRIN_double
Readings from ticks counters, such as quadrature encoders.
uint16_t AIN_channel_count
Readings from analog input (ADCs) channels (vector length=channel count) in Volts.
double sample_rate
Readings from ticks counters, such as quadrature encoders.
bool AIN_interleaved
Whether the channels are interleaved (A0 A1 A2 A0 A1 A2...) or not (A0 A0 A0 A1 A1 A1 A2 A2 A2....
std::vector< double > AIN_double
Readings from analog input (ADCs) channels (vector length=channel count) in Volts.
std::vector< uint8_t > DIN
Present output values for 16-bit analog output (DACs) channels (vector length=channel count) in volts...
static void createPipe(ReadPtr &outReadPipe, WritePtr &outWritePipe)
Creates a new pipe and returns the read & write end-points as newly allocated objects.
This class allows loading and storing values and vectors of different types from a configuration text...
std::string read_string(const std::string §ion, const std::string &name, const std::string &defaultValue, bool failIfNotFound=false) const
uint64_t read_uint64_t(const std::string §ion, const std::string &name, uint64_t defaultValue, bool failIfNotFound=false) const
GLsizei const GLchar ** string
void BASE_IMPEXP joinThread(TThreadHandle &threadHandle)
Waits until the given thread ends.
void BASE_IMPEXP sleep(int time_ms) MRPT_NO_THROWS
An OS-independent method for sending the current thread to "sleep" for a given period of time.
std::string BASE_IMPEXP trim(const std::string &str)
Removes leading and trailing spaces.
bool BASE_IMPEXP strCmpI(const std::string &s1, const std::string &s2)
Return true if the two strings are equal (case insensitive)
void BASE_IMPEXP tokenize(const std::string &inString, const std::string &inDelimiters, std::deque< std::string > &outTokens, bool skipBlankTokens=true) MRPT_NO_THROWS
Tokenizes a string according to a set of delimiting characters.
mrpt::system::TTimeStamp now()
A shortcut for system::getCurrentTime.
#define ASSERT_EQUAL_(__A, __B)
#define ASSERT_ABOVE_(__A, __B)
#define THROW_EXCEPTION(msg)
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
#define ASSERTMSG_(f, __ERROR_MSG)
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
Contains classes for various device interfaces.
This namespace contains representation of robot actions and observations.
This namespace provides a OS-independent interface to many useful functions: filenames manipulation,...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
std::string BASE_IMPEXP format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
unsigned __int32 uint32_t
unsigned __int64 uint64_t
std::unique_ptr< mrpt::synch::CPipeReadEndPoint > read_pipe
std::atomic< long > new_obs_available
mrpt::system::TThreadHandle hThread
TaskDescription task
A copy of the original task description that generated this thread.
std::unique_ptr< mrpt::synch::CPipeWriteEndPoint > write_pipe
std::string physicalChannel
std::string terminalConfig
unsigned int physicalChannelCount
IMPORTANT This must be the total number of channels listed in "physicalChannel" (e....
unsigned int physicalChannelCount
IMPORTANT This must be the total number of channels listed in "physicalChannel" (e....
std::string physicalChannel
std::string countDirection
std::string line
The digital line (for example "Dev1/port0/line1")
std::string line
The digital line (for example "Dev1/port0/line1")
Each of the tasks to create in CNationalInstrumentsDAQ::initialize().
struct HWDRIVERS_IMPEXP mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_count_edges_t ci_count_edges
Counter: period of a digital signal.
struct HWDRIVERS_IMPEXP mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ao_t ao
Analog outputs.
struct HWDRIVERS_IMPEXP mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_di_t di
Digital inputs (di)
struct HWDRIVERS_IMPEXP mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_do_t douts
Digital outs (do)
struct HWDRIVERS_IMPEXP mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_ang_encoder_t ci_ang_encoder
Counter: uses an angular encoder to measure angular position.
double samplesPerSecond
Sample clock config: samples per second. Continuous (infinite) sampling is assumed.
struct HWDRIVERS_IMPEXP mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_period_t ci_period
Counter: period of a digital signal.
struct HWDRIVERS_IMPEXP mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_co_pulses_t co_pulses
Output counter: digital pulses output.
uint32_t samplesPerChannelToRead
(Default=1000) The number of samples to grab at once from each channel.
struct HWDRIVERS_IMPEXP mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_pulse_width_t ci_pulse_width
Counter: measure the width of a digital pulse.
struct HWDRIVERS_IMPEXP mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ai_t ai
Analog inputs.
uint32_t bufferSamplesPerChannel
(Default=0) From NI's docs: The number of samples the buffer can hold for each channel in the task....
struct HWDRIVERS_IMPEXP mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_lin_encoder_t ci_lin_encoder
Counter: uses a linear encoder to measure linear position.
std::string sampleClkSource
Sample clock source: may be empty (default value) for some channels.
std::string taskLabel
(Default="task###")
bool isClear() const
Returns true if the handle is uninitialized.