Go to the documentation of this file.
10 #ifndef CNationalInstrumentsDAQ_H
11 #define CNationalInstrumentsDAQ_H
250 std::vector<mrpt::obs::CObservationRawDAQ::Ptr>& outObservations,
251 bool& hardwareError);
260 size_t task_index,
size_t nSamplesPerChannel,
const double* volt_values,
261 double timeout,
bool groupedByChannel);
270 size_t task_index,
bool line_value,
double timeout);
struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_di_t di
Digital inputs (di)
std::string line
The digital line (for example "Dev1/port0/line1")
uint32_t bufferSamplesPerChannel
(Default=0) From NI's docs: The number of samples the buffer can hold for each channel in the task.
struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_lin_encoder_t ci_lin_encoder
Counter: uses a linear encoder to measure linear position.
std::string physicalChannel
void readFromDAQ(std::vector< mrpt::obs::CObservationRawDAQ::Ptr > &outObservations, bool &hardwareError)
Receives data from the DAQ thread(s).
std::atomic< int > new_obs_available
std::string line
The digital line (for example "Dev1/port0/line1")
struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_period_t ci_period
Counter: period of a digital signal.
struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_do_t douts
Digital outs (do)
virtual void initialize()
Setup and launch the DAQ tasks, in parallel threads.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_GENERIC_SENSOR(class_name)
This declaration must be inserted in all CGenericSensor classes definition, within the class declarat...
void grabbing_thread(TInfoPerTask &ipt)
Method to be executed in each parallel thread.
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,...
An interface to read from data acquisition boards compatible with National Instruments "DAQmx Base" o...
void doProcess()
This method will be invoked at a minimum rate of "process_rate" (Hz)
This class allows loading and storing values and vectors of different types from a configuration text...
struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ao_t ao
Analog outputs.
std::string taskLabel
(Default="task###")
TaskDescription task
A copy of the original task description that generated this thread.
double samplesPerSecond
Sample clock config: samples per second.
std::string physicalChannel
unsigned int physicalChannelCount
IMPORTANT This must be the total number of channels listed in "physicalChannel" (e....
std::string terminalConfig
std::unique_ptr< mrpt::io::CPipeWriteEndPoint > write_pipe
struct 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.
void stop()
Stop the grabbing threads for DAQ tasks.
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
Versatile class for consistent logging and management of output messages.
struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_pulse_width_t ci_pulse_width
Counter: measure the width of a digital pulse.
void writeDigitalOutputTask(size_t task_index, bool line_value, double timeout)
Changes the boolean state of one digital output line.
void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection)
See the class documentation at the top for expected parameters.
struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_count_edges_t ci_count_edges
Counter: period of a digital signal.
virtual ~CNationalInstrumentsDAQ()
Destructor.
struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ai_t ai
Analog inputs.
Each of the tasks to create in CNationalInstrumentsDAQ::initialize().
std::list< TInfoPerTask > m_running_tasks
CNationalInstrumentsDAQ()
Constructor.
struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_ang_encoder_t ci_ang_encoder
Counter: uses an angular encoder to measure angular position.
bool checkDAQIsWorking() const
Returns true if initialize() was called and at least one task is running.
std::vector< mrpt::obs::CObservationRawDAQ::Ptr > m_nextObservations
A buffer for doProcess.
std::vector< TaskDescription > task_definitions
Publicly accessible vector with the list of tasks to be launched upon call to CNationalInstrumentsDAQ...
GLsizei const GLchar ** string
std::unique_ptr< mrpt::io::CPipeReadEndPoint > read_pipe
unsigned __int32 uint32_t
std::string countDirection
std::string sampleClkSource
Sample clock source: may be empty (default value) for some channels.
unsigned int physicalChannelCount
IMPORTANT This must be the total number of channels listed in "physicalChannel" (e....
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |