DynExp
Highly flexible laboratory automation for dynamically changing experiments.
DynExpHardware::NIDAQTask Class Reference

Classes

struct  CircularStream
 

Public Types

enum class  ChannelType { DigialIn , DigitalOut , AnalogIn , AnalogOut }
 
enum class  SamplingModeType { Single , Continuous }
 
using ChannelHandleType = size_t
 
using AnalogValueType = double
 
using DigitalValueType = uint8_t
 

Public Member Functions

 NIDAQTask (ChannelType Type, NIDAQSyms::TaskHandle NITask, NIDAQHardwareAdapterParams::ChannelModeType ChannelMode=NIDAQHardwareAdapterParams::ChannelModeType::TaskPerChannel)
 
 ~NIDAQTask ()
 
auto GetType () const noexcept
 
bool IsCombined () const noexcept
 
auto GetTimeout () const noexcept
 
auto GetSamplingRate () const noexcept
 
auto GetSamplingMode () const noexcept
 
auto GetNumSamples () const noexcept
 
bool IsMultisample () const noexcept
 
auto GetNumChannels () const noexcept
 
auto GetBufferSizeInSamples () const noexcept
 
auto GetSampleSizeInBytes () const noexcept
 
auto GetChannelIndex (ChannelHandleType ChannelHandle) const
 

Private Member Functions

void AddChannel (ChannelHandleType ChannelHandle, uint64_t NumSamples)
 

Private Attributes

const ChannelType Type
 
const NIDAQSyms::TaskHandle NITask
 
const NIDAQHardwareAdapterParams::ChannelModeType ChannelMode
 
double Timeout = 0
 
double SamplingRate = 0
 
SamplingModeType SamplingMode = NIDAQTask::SamplingModeType::Single
 
uint64_t NumSamples = 1
 
uint32_t NumChannels = 0
 
std::map< ChannelHandleType, uint32_t > ChannelIndexMap
 
std::vector< DigitalValueTypeDigitalValues
 
std::vector< AnalogValueTypeAnalogValues
 
std::vector< std::unique_ptr< CircularStream > > ReadStreamPerChannel
 

Friends

class NIDAQHardwareAdapter
 

Detailed Description

Definition at line 102 of file HardwareAdapterNIDAQ.h.

Member Typedef Documentation

◆ AnalogValueType

Definition at line 108 of file HardwareAdapterNIDAQ.h.

◆ ChannelHandleType

Definition at line 107 of file HardwareAdapterNIDAQ.h.

◆ DigitalValueType

Definition at line 109 of file HardwareAdapterNIDAQ.h.

Member Enumeration Documentation

◆ ChannelType

Enumerator
DigialIn 
DigitalOut 
AnalogIn 
AnalogOut 

Definition at line 111 of file HardwareAdapterNIDAQ.h.

◆ SamplingModeType

Enumerator
Single 
Continuous 

Definition at line 112 of file HardwareAdapterNIDAQ.h.

Constructor & Destructor Documentation

◆ NIDAQTask()

DynExpHardware::NIDAQTask::NIDAQTask ( ChannelType  Type,
NIDAQSyms::TaskHandle  NITask,
NIDAQHardwareAdapterParams::ChannelModeType  ChannelMode = NIDAQHardwareAdapterParams::ChannelModeType::TaskPerChannel 
)

Definition at line 80 of file HardwareAdapterNIDAQ.cpp.

◆ ~NIDAQTask()

DynExpHardware::NIDAQTask::~NIDAQTask ( )

Definition at line 87 of file HardwareAdapterNIDAQ.cpp.

Member Function Documentation

◆ AddChannel()

void DynExpHardware::NIDAQTask::AddChannel ( ChannelHandleType  ChannelHandle,
uint64_t  NumSamples 
)
private

Definition at line 97 of file HardwareAdapterNIDAQ.cpp.

◆ GetBufferSizeInSamples()

auto DynExpHardware::NIDAQTask::GetBufferSizeInSamples ( ) const
inlinenoexcept

Definition at line 125 of file HardwareAdapterNIDAQ.h.

◆ GetChannelIndex()

auto DynExpHardware::NIDAQTask::GetChannelIndex ( ChannelHandleType  ChannelHandle) const
inline

Definition at line 127 of file HardwareAdapterNIDAQ.h.

◆ GetNumChannels()

auto DynExpHardware::NIDAQTask::GetNumChannels ( ) const
inlinenoexcept

Definition at line 124 of file HardwareAdapterNIDAQ.h.

◆ GetNumSamples()

auto DynExpHardware::NIDAQTask::GetNumSamples ( ) const
inlinenoexcept

Definition at line 122 of file HardwareAdapterNIDAQ.h.

◆ GetSampleSizeInBytes()

auto DynExpHardware::NIDAQTask::GetSampleSizeInBytes ( ) const
inlinenoexcept

Definition at line 126 of file HardwareAdapterNIDAQ.h.

◆ GetSamplingMode()

auto DynExpHardware::NIDAQTask::GetSamplingMode ( ) const
inlinenoexcept

Definition at line 121 of file HardwareAdapterNIDAQ.h.

◆ GetSamplingRate()

auto DynExpHardware::NIDAQTask::GetSamplingRate ( ) const
inlinenoexcept

Definition at line 120 of file HardwareAdapterNIDAQ.h.

◆ GetTimeout()

auto DynExpHardware::NIDAQTask::GetTimeout ( ) const
inlinenoexcept

Definition at line 119 of file HardwareAdapterNIDAQ.h.

◆ GetType()

auto DynExpHardware::NIDAQTask::GetType ( ) const
inlinenoexcept

Definition at line 117 of file HardwareAdapterNIDAQ.h.

◆ IsCombined()

bool DynExpHardware::NIDAQTask::IsCombined ( ) const
inlinenoexcept

Definition at line 118 of file HardwareAdapterNIDAQ.h.

◆ IsMultisample()

bool DynExpHardware::NIDAQTask::IsMultisample ( ) const
inlinenoexcept

Definition at line 123 of file HardwareAdapterNIDAQ.h.

Friends And Related Function Documentation

◆ NIDAQHardwareAdapter

friend class NIDAQHardwareAdapter
friend

Definition at line 104 of file HardwareAdapterNIDAQ.h.

Member Data Documentation

◆ AnalogValues

std::vector<AnalogValueType> DynExpHardware::NIDAQTask::AnalogValues
private

Definition at line 154 of file HardwareAdapterNIDAQ.h.

◆ ChannelIndexMap

std::map<ChannelHandleType, uint32_t> DynExpHardware::NIDAQTask::ChannelIndexMap
private

Definition at line 152 of file HardwareAdapterNIDAQ.h.

◆ ChannelMode

const NIDAQHardwareAdapterParams::ChannelModeType DynExpHardware::NIDAQTask::ChannelMode
private

Definition at line 144 of file HardwareAdapterNIDAQ.h.

◆ DigitalValues

std::vector<DigitalValueType> DynExpHardware::NIDAQTask::DigitalValues
private

Definition at line 153 of file HardwareAdapterNIDAQ.h.

◆ NITask

const NIDAQSyms::TaskHandle DynExpHardware::NIDAQTask::NITask
private

Definition at line 143 of file HardwareAdapterNIDAQ.h.

◆ NumChannels

uint32_t DynExpHardware::NIDAQTask::NumChannels = 0
private

Definition at line 150 of file HardwareAdapterNIDAQ.h.

◆ NumSamples

uint64_t DynExpHardware::NIDAQTask::NumSamples = 1
private

Definition at line 149 of file HardwareAdapterNIDAQ.h.

◆ ReadStreamPerChannel

std::vector<std::unique_ptr<CircularStream> > DynExpHardware::NIDAQTask::ReadStreamPerChannel
private

Definition at line 155 of file HardwareAdapterNIDAQ.h.

◆ SamplingMode

SamplingModeType DynExpHardware::NIDAQTask::SamplingMode = NIDAQTask::SamplingModeType::Single
private

Definition at line 148 of file HardwareAdapterNIDAQ.h.

◆ SamplingRate

double DynExpHardware::NIDAQTask::SamplingRate = 0
private

Definition at line 147 of file HardwareAdapterNIDAQ.h.

◆ Timeout

double DynExpHardware::NIDAQTask::Timeout = 0
private

Definition at line 146 of file HardwareAdapterNIDAQ.h.

◆ Type

const ChannelType DynExpHardware::NIDAQTask::Type
private

Definition at line 142 of file HardwareAdapterNIDAQ.h.


The documentation for this class was generated from the following files: