Scope
|
#include <DAQmxTask.h>
Inherits DAQmx::CDAQmxTask.
Public Member Functions | |
void | CreateAOVoltageChannel (const std::wstring &_devices, const std::wstring &_channelname=L"", float64 _minval=-10.0, float64 _maxval=10.0, int32 _units=DAQmx_Val_Volts, const std::wstring &_customscalename=L"") |
uInt32 | ConfigureBuffer (const uInt32 &_sampsperchannel) |
uInt32 | ConfigureOnboardBuffer (const uInt32 &_sampsperchannel) |
void | UseOnlyOnboardMemory (const std::wstring &_channel) |
void | SetIdleOutputBehaviour (const std::wstring &_channel, const int32_t &_behav) |
void | SetDataTransferCondition (const std::wstring &_channel, const int32_t &_cond) |
void | SetDataTransferMode (const std::wstring &_channel, const int32_t &_mode) |
int32 | WriteAnalog (const float64 *_data, int32 _sampsperchan, bool _autostart=false, int32 _timeout=2, bool32 _layout=DAQmx_Val_GroupByChannel) |
void | WriteAnalogScalar (const float64 &_value, bool _autostart=false, int32 _timeout=1000) |
int32 | WriteAnalogI16 (const int16 *_data, int32 _sampsperchan, bool _autostart=false, int32 _timeout=2, bool32 _layout=DAQmx_Val_GroupByChannel) |
Public Member Functions inherited from DAQmx::CDAQmxTask | |
~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) |
Additional Inherited Members | |
Protected Attributes inherited from DAQmx::CDAQmxTask | |
TaskHandle | task_handle |
Wraps a DAQmx Analog Output task.
Definition at line 137 of file DAQmxTask.h.
void DAQmx::CDAQmxAnalogOutTask::CreateAOVoltageChannel | ( | const std::wstring & | _devices, |
const std::wstring & | _channelname = L"" , |
||
float64 | _minval = -10.0 , |
||
float64 | _maxval = 10.0 , |
||
int32 | _units = DAQmx_Val_Volts , |
||
const std::wstring & | _customscalename = L"" |
||
) |
Creates an analog output channel Allowed values for terminal configuration (from NiDAQmx.h):
Values for DAQmx_PhysicalChan_AI_TermCfgs and DAQmx_PhysicalChan_AO_TermCfgs
Value set TerminalConfigurationBits
.
Definition at line 182 of file DAQmxTask.cpp.
uInt32 DAQmx::CDAQmxAnalogOutTask::ConfigureBuffer | ( | const uInt32 & | _sampsperchannel | ) |
Configure the daqmx output buffer on the PC.
[in] | _sampsperchannel | buffer size is _sampsperchannel times number of channels |
Definition at line 201 of file DAQmxTask.cpp.
uInt32 DAQmx::CDAQmxAnalogOutTask::ConfigureOnboardBuffer | ( | const uInt32 & | _sampsperchannel | ) |
Configure the output buffer on the device hardware.
[in] | _sampsperchannel | buffer size is _sampsperchannel times number of channels |
Definition at line 211 of file DAQmxTask.cpp.
void DAQmx::CDAQmxAnalogOutTask::UseOnlyOnboardMemory | ( | const std::wstring & | _channel | ) |
Configures the task to use only the devices' onboard memory.
Write operations do not use a DAQmx buffer on the PC but write directly to onboard memory.
[in] | _channel | The channel(s) for which this is configured |
Definition at line 219 of file DAQmxTask.cpp.
void DAQmx::CDAQmxAnalogOutTask::SetIdleOutputBehaviour | ( | const std::wstring & | _channel, |
const int32_t & | _behav | ||
) |
Configures the output behaviour when the task is not running.
[in] | _channel | the channel(s) for which this is configured |
[in] | _behav | the desired behaviour
|
Definition at line 224 of file DAQmxTask.cpp.
void DAQmx::CDAQmxAnalogOutTask::SetDataTransferCondition | ( | const std::wstring & | _channel, |
const int32_t & | _cond | ||
) |
Configures the condition for data transfer to the device.
[in] | _channel | the channel(s) for which this is configured |
[in] | _cond | the transfer condition
|
Definition at line 229 of file DAQmxTask.cpp.
void DAQmx::CDAQmxAnalogOutTask::SetDataTransferMode | ( | const std::wstring & | _channel, |
const int32_t & | _mode | ||
) |
Configures the mode of data transfer between the daqmx buffer on the PC and the onboard buffer of the device.
[in] | _channel | the channel(s) for which this is configured |
[in] | _mode | the transfer mode
|
Definition at line 234 of file DAQmxTask.cpp.
int32 DAQmx::CDAQmxAnalogOutTask::WriteAnalog | ( | const float64 * | _data, |
int32 | _sampsperchan, | ||
bool | _autostart = false , |
||
int32 | _timeout = 2 , |
||
bool32 | _layout = DAQmx_Val_GroupByChannel |
||
) |
Writes several samples to the buffer of an analog output task.
_data array should be grouped by channel and contain at least _sampsperchan times number of channels values.
[in] | _data | pointer to a float64 array, whose values should fall into the configured output range of the task. |
[in] | _sampsperchan | number of samples per channel to be written. |
[in] | _autostart | true if task should be automatically started after write to buffer |
[in] | _timeout | how long to wait for the write to the buffer to happen, in seconds |
[in] | _layout | data layout to use
|
Definition at line 239 of file DAQmxTask.cpp.
void DAQmx::CDAQmxAnalogOutTask::WriteAnalogScalar | ( | const float64 & | _value, |
bool | _autostart = false , |
||
int32 | _timeout = 1000 |
||
) |
Writes a single sample to the buffer of an analog output task.
[in] | _value | should fall into the configured output range of the task |
[in] | _autostart | true if task should be automatically started after write to buffer |
[in] | _timeout | how long to wait for the write to the buffer to happen, in seconds |
Definition at line 251 of file DAQmxTask.cpp.
int32 DAQmx::CDAQmxAnalogOutTask::WriteAnalogI16 | ( | const int16 * | _data, |
int32 | _sampsperchan, | ||
bool | _autostart = false , |
||
int32 | _timeout = 2 , |
||
bool32 | _layout = DAQmx_Val_GroupByChannel |
||
) |
Writes several samples to the buffer of an analog output task.
_data array should be grouped by channel and contain at least _sampsperchan times number of channels values.
[in] | _data | pointer to a int16 array, whose values cover the configured output range of the task. |
[in] | _sampsperchan | number of samples per channel to be written. |
[in] | _autostart | true if task should be automatically started after write to buffer |
[in] | _timeout | how long to wait for the write to the buffer to happen, in seconds |
[in] | _layout | data layout to use
|
Definition at line 258 of file DAQmxTask.cpp.