10 #ifndef CNationalInstrumentsDAQ_H 11 #define CNationalInstrumentsDAQ_H 169 virtual void initialize();
183 std::vector<mrpt::obs::CObservationRawDAQPtr> &outObservations,
184 bool & hardwareError );
190 void writeAnalogOutputTask(
size_t task_index,
size_t nSamplesPerChannel,
const double * volt_values,
double timeout,
bool groupedByChannel);
196 void writeDigitalOutputTask(
size_t task_index,
bool line_value,
double timeout);
199 bool checkDAQIsWorking()
const;
211 bool has_ci_period, has_ci_count_edges,has_ci_pulse_width,has_ci_lin_encoder,has_ci_ang_encoder,
has_co_pulses;
222 desc_ai_t() : terminalConfig(
"DAQmx_Val_NRSE"),minVal(-10), maxVal(10),physicalChannelCount(0) { }
232 desc_ao_t() : physicalChannelCount(0),minVal(-10), maxVal(10) { }
295 desc_ci_ang_encoder_t() : ZidxEnable(false),ZidxVal(0),pulsesPerRev(512),initialAngle(0),decimate(1),decimate_cnt(0) { }
324 void loadConfig_sensorSpecific(
339 std::unique_ptr<mrpt::synch::CPipeReadEndPoint> read_pipe;
340 std::unique_ptr<mrpt::synch::CPipeWriteEndPoint> write_pipe;
342 std::auto_ptr<mrpt::synch::CPipeReadEndPoint>
read_pipe;
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
Each of the tasks to create in CNationalInstrumentsDAQ::initialize().
std::string line
The digital line (for example "Dev1/port0/line1")
std::string taskLabel
(Default="task###")
TaskDescription task
A copy of the original task description that generated this thread.
This class allows loading and storing values and vectors of different types from a configuration text...
std::list< TInfoPerTask > m_running_tasks
std::string sampleClkSource
Sample clock source: may be empty (default value) for some channels.
std::auto_ptr< mrpt::synch::CPipeWriteEndPoint > write_pipe
An interface to read from data acquisition boards compatible with National Instruments "DAQmx Base" o...
std::string terminalConfig
GLsizei const GLchar ** string
mrpt::synch::CAtomicCounter new_obs_available
uint32_t bufferSamplesPerChannel
(Default=0) From NI's docs: The number of samples the buffer can hold for each channel in the task...
std::string line
The digital line (for example "Dev1/port0/line1")
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
uint32_t samplesPerChannelToRead
(Default=1000) The number of samples to grab at once from each channel.
std::vector< TaskDescription > task_definitions
Publicly accessible vector with the list of tasks to be launched upon call to CNationalInstrumentsDAQ...
std::auto_ptr< mrpt::synch::CPipeReadEndPoint > read_pipe
unsigned int physicalChannelCount
IMPORTANT This must be the total number of channels listed in "physicalChannel" (e.g. 1 for "Dev1/ao0")
This structure contains the information needed to interface the threads API on each platform: ...
unsigned int physicalChannelCount
IMPORTANT This must be the total number of channels listed in "physicalChannel" (e.g. 4 for "Dev1/ai0:3")
double samplesPerSecond
Sample clock config: samples per second. Continuous (infinite) sampling is assumed.
std::vector< mrpt::obs::CObservationRawDAQPtr > m_nextObservations
A buffer for doProcess.
unsigned __int32 uint32_t
std::string physicalChannel
mrpt::system::TThreadHandle hThread
This class acts exactly as an int (or long) variable, but with atomic increment and decrement operato...