Scope
|
#include <DAQmxTask.h>
Inherited by DAQmx::CDAQmxAnalogInTask, DAQmx::CDAQmxAnalogOutTask, DAQmx::CDAQmxCounterOutTask, and DAQmx::CDAQmxDigitalOutTask.
Public Member Functions | |
~CDAQmxTask (void) | |
void | CreateTask (const std::wstring &_name=L"") |
bool | Created () const |
void | ConfigureImplicitTiming (const int32 &_mode, const int32 &_samplesperchan) |
void | ConfigureSampleTiming (const std::wstring &_src, const float64 &_rate, const int32 &_samplesperchan, const int32 &_samplingtype=DAQmx_Val_ContSamps, const int32 &_actedge=DAQmx_Val_Rising) |
void | ConfigureReferenceClock (const std::wstring &_src, const float64 &_rate) |
void | ConfigureDigStartTrigger (const std::wstring &_src, const int32 &_trigedge=DAQmx_Val_Rising) |
void | Start (void) |
void | Stop (void) |
void | Clear (void) |
bool | IsTaskDone (void) |
int32_t | WaitUntilDone (const float64 &_waittime) |
void | ExportSignal (int32 _signal, const std::wstring &_terminal) |
void | SetWriteOffset (int32 posreltofirst) |
void | SetRegeneration (const bool &_regenerate) |
Protected Attributes | |
TaskHandle | task_handle |
Base class for DAQmx tasks.
Definition at line 54 of file DAQmxTask.h.
DAQmx::CDAQmxTask::~CDAQmxTask | ( | void | ) |
Clear the task.
Definition at line 86 of file DAQmxTask.cpp.
void DAQmx::CDAQmxTask::CreateTask | ( | const std::wstring & | _name = L"" | ) |
[in] | _name | name of the task, leave empty |
Definition at line 91 of file DAQmxTask.cpp.
bool DAQmx::CDAQmxTask::Created | ( | ) | const |
Definition at line 96 of file DAQmxTask.cpp.
void DAQmx::CDAQmxTask::ConfigureImplicitTiming | ( | const int32 & | _mode, |
const int32 & | _samplesperchan | ||
) |
Configures implicit timing for the task.
[in] | _mode | Timing mode, possible values (from NIDAQmx.h) are DAQmx_Val_FiniteSamps or DAQmx_Val_ContSamps |
[in] | _samplesperchan | how many samples per channel are expected |
Definition at line 100 of file DAQmxTask.cpp.
void DAQmx::CDAQmxTask::ConfigureSampleTiming | ( | const std::wstring & | _src, |
const float64 & | _rate, | ||
const int32 & | _samplesperchan, | ||
const int32 & | _samplingtype = DAQmx_Val_ContSamps , |
||
const int32 & | _actedge = DAQmx_Val_Rising |
||
) |
Configures a sample timing for the task.
[in] | _src | Source terminal of the sample clock, or L"" for onboard PPL (locked to a reference clock) or L"OnboardClock" for onboard derived clock generation |
[in] | _rate | Desired sample rate |
[in] | _samplesperchan | Estimated samples per channels, defines buffer size |
[in] | _samplingtype | Can be either DAQmx_Val_FiniteSamps or DAQmx_Val_ContSamps |
[in] | _actedge | Active edge of sample clock, can be either DAQmx_Val_Rising or DAQmx_Val_Falling |
Definition at line 109 of file DAQmxTask.cpp.
void DAQmx::CDAQmxTask::ConfigureReferenceClock | ( | const std::wstring & | _src, |
const float64 & | _rate | ||
) |
Configures the reference clock for the task.
[in] | _src | source terminal of the reference clock |
[in] | _rate | rate of the reference clock (has to be known!) |
Definition at line 128 of file DAQmxTask.cpp.
void DAQmx::CDAQmxTask::ConfigureDigStartTrigger | ( | const std::wstring & | _src, |
const int32 & | _trigedge = DAQmx_Val_Rising |
||
) |
Configures the start trigger.
[in] | _src | terminal the start trigger is connected to |
[in] | _trigedge | either DAQmx_Val_Rising or DAQmx_Val_Falling |
Definition at line 134 of file DAQmxTask.cpp.
void DAQmx::CDAQmxTask::Start | ( | void | ) |
Starts the task.
Definition at line 145 of file DAQmxTask.cpp.
void DAQmx::CDAQmxTask::Stop | ( | void | ) |
Stops the task.
Definition at line 149 of file DAQmxTask.cpp.
void DAQmx::CDAQmxTask::Clear | ( | void | ) |
Clear the task.
Definition at line 153 of file DAQmxTask.cpp.
bool DAQmx::CDAQmxTask::IsTaskDone | ( | void | ) |
Definition at line 157 of file DAQmxTask.cpp.
int32_t DAQmx::CDAQmxTask::WaitUntilDone | ( | const float64 & | _waittime | ) |
Waits until the task is done.
[in] | _waittime | wait maximally _waittime |
Definition at line 163 of file DAQmxTask.cpp.
void DAQmx::CDAQmxTask::ExportSignal | ( | int32 | _signal, |
const std::wstring & | _terminal | ||
) |
Exports a signal to an output terminal.
[in] | _signal | Allowed signal are (from NiDAQmx.h):
|
[in] | _terminal | the device terminal to export to |
Definition at line 167 of file DAQmxTask.cpp.
void DAQmx::CDAQmxTask::SetWriteOffset | ( | int32 | posreltofirst | ) |
Sets the write offset relative to the first buffer position.
Definition at line 172 of file DAQmxTask.cpp.
void DAQmx::CDAQmxTask::SetRegeneration | ( | const bool & | _regenerate | ) |
Sets the mode of sample regeneration.
Definition at line 177 of file DAQmxTask.cpp.
|
protected |
the DAQmx task handle
Definition at line 58 of file DAQmxTask.h.