struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription

Overview

Each of the tasks to create in CNationalInstrumentsDAQ::initialize().

Refer to the docs on config file formats of mrpt::hwdrivers::CNationalInstrumentsDAQ to learn on the meaning of each field. Also, see National Instruments’ DAQmx API docs online.

#include <mrpt/hwdrivers/CNationalInstrumentsDAQ.h>

struct TaskDescription
{
    // structs

    struct desc_ai_t;
    struct desc_ao_t;
    struct desc_ci_ang_encoder_t;
    struct desc_ci_count_edges_t;
    struct desc_ci_lin_encoder_t;
    struct desc_ci_period_t;
    struct desc_ci_pulse_width_t;
    struct desc_co_pulses_t;
    struct desc_di_t;
    struct desc_do_t;

    // fields

    bool has_ai {false};
    bool has_ao {false};
    bool has_di {false};
    bool has_do {false};
    bool has_ci_period {false};
    bool has_ci_count_edges {false};
    bool has_ci_pulse_width {false};
    bool has_ci_lin_encoder {false};
    bool has_ci_ang_encoder {false};
    bool has_co_pulses {false};
    double samplesPerSecond {1000.0};
    std::string sampleClkSource;
    uint32_t bufferSamplesPerChannel {200000};
    uint32_t samplesPerChannelToRead {1000};
    std::string taskLabel;
    struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ai_t ai;
    struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ao_t ao;
    struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_di_t di;
    struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_do_t douts;
    struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_period_t ci_period;
    struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_count_edges_t ci_count_edges;
    struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_pulse_width_t ci_pulse_width;
    struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_lin_encoder_t ci_lin_encoder;
    struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_ang_encoder_t ci_ang_encoder;
    struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_co_pulses_t co_pulses;

    // construction

    TaskDescription();
};

Fields

double samplesPerSecond {1000.0}

Sample clock config: samples per second.

Continuous (infinite) sampling is assumed.

std::string sampleClkSource

Sample clock source: may be empty (default value) for some channels.

uint32_t bufferSamplesPerChannel {200000}

(Default=0) From NI’s docs: The number of samples the buffer can hold for each channel in the task.

Zero indicates no buffer should be allocated. Use a buffer size of 0 to perform a hardware-timed operation without using a buffer.

uint32_t samplesPerChannelToRead {1000}

(Default=1000) The number of samples to grab at once from each channel.

std::string taskLabel

(Default=”task###”)

struct mrpt::hwdrivers::CNationalInstrumentsDAQ::TaskDescription::desc_ci_period_t ci_period

Counter: period of a digital signal.