RTXI  2.4
The Real-Time eXperiment Interface Documentation
Public Member Functions
DAQ::Device Class Referenceabstract

#include <daq.h>

Inheritance diagram for DAQ::Device:
Inheritance graph
Collaboration diagram for DAQ::Device:
Collaboration graph

Public Member Functions

 Device (std::string, IO::channel_t *, size_t)
 
virtual ~Device (void)
 
virtual size_t getChannelCount (type_t type) const =0
 
virtual bool getChannelActive (type_t type, index_t index) const =0
 
virtual int setChannelActive (type_t type, index_t index, bool state)=0
 
virtual size_t getAnalogRangeCount (type_t type, index_t index) const =0
 
virtual size_t getAnalogReferenceCount (type_t type, index_t index) const =0
 
virtual size_t getAnalogUnitsCount (type_t type, index_t index) const =0
 
virtual size_t getAnalogDownsample (type_t type, index_t index) const =0
 
virtual std::string getAnalogRangeString (type_t type, index_t index, index_t range) const =0
 
virtual std::string getAnalogReferenceString (type_t type, index_t index, index_t reference) const =0
 
virtual std::string getAnalogUnitsString (type_t type, index_t index, index_t units) const =0
 
virtual double getAnalogGain (type_t type, index_t index) const =0
 
virtual double getAnalogZeroOffset (type_t type, index_t index) const =0
 
virtual index_t getAnalogRange (type_t type, index_t index) const =0
 
virtual index_t getAnalogReference (type_t type, index_t index) const =0
 
virtual index_t getAnalogUnits (type_t type, index_t index) const =0
 
virtual index_t getAnalogOffsetUnits (type_t type, index_t index) const =0
 
virtual int setAnalogGain (type_t type, index_t index, double gain)=0
 
virtual int setAnalogRange (type_t type, index_t index, index_t range)=0
 
virtual int setAnalogZeroOffset (type_t type, index_t index, double offset)=0
 
virtual int setAnalogReference (type_t type, index_t index, index_t reference)=0
 
virtual int setAnalogUnits (type_t type, index_t index, index_t units)=0
 
virtual int setAnalogOffsetUnits (type_t type, index_t index, index_t units)=0
 
virtual int setAnalogDownsample (type_t type, index_t index, size_t downsample)=0
 
virtual int setAnalogCounter (type_t type, index_t index)=0
 
virtual int setAnalogCalibrationValue (type_t type, index_t index, double value)=0
 
virtual double getAnalogCalibrationValue (type_t type, index_t index) const =0
 
virtual int setAnalogCalibrationActive (type_t type, index_t index, bool state)=0
 
virtual bool getAnalogCalibrationActive (type_t type, index_t index) const =0
 
virtual bool getAnalogCalibrationState (type_t type, index_t index) const =0
 
virtual direction_t getDigitalDirection (index_t index) const =0
 
virtual int setDigitalDirection (index_t index, direction_t direction)=0
 
- Public Member Functions inherited from RT::Device
 Device (void)
 
virtual void read (void)
 
virtual void write (void)
 
bool getActive (void) const
 
void setActive (bool)
 
- Public Member Functions inherited from RT::List< T >::Node
 Node (void)
 
virtual ~Node (void)
 
bool operator== (const Node &x) const
 
- Public Member Functions inherited from IO::Block
 Block (std::string name, channel_t *channels, size_t size)
 
virtual ~Block (void)
 
std::string getName (void) const
 
virtual size_t getCount (flags_t type) const
 
virtual std::string getName (flags_t type, size_t index) const
 
virtual std::string getDescription (flags_t type, size_t index) const
 
virtual double getValue (flags_t type, size_t index) const
 
double input (size_t index) const
 
double output (size_t index) const
 
- Public Member Functions inherited from Settings::Object
 Object (void)
 
virtual ~Object (void)
 
ID getID (void) const
 
State save (void) const
 
void load (const State &)
 
void deferred (const State &)
 

Additional Inherited Members

- Public Types inherited from Settings::Object
typedef unsigned long ID
 
- Static Public Attributes inherited from Settings::Object
const static ID INVALID = 0
 
- Protected Member Functions inherited from IO::Block
double & output (size_t index)
 
- Protected Member Functions inherited from Settings::Object
virtual void doLoad (const State &)
 
virtual void doDeferred (const State &)
 
virtual void doSave (State &) const
 

Detailed Description

Object that represents a single DAQ card.

Definition at line 139 of file daq.h.

Constructor & Destructor Documentation

◆ Device()

DAQ::Device::Device(std::string name,
IO::channel_tchan,
size_t size 
)

The constructor needs to be provided with a specification of its channels that will be passed to the inherited IO::Block.

See also
IO::Block

Definition at line 23 of file daq.cpp.

Here is the call graph for this function:

◆ ~Device()

DAQ::Device::~Device(void )
virtual

Reimplemented from RT::Device.

Definition at line 28 of file daq.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ getAnalogCalibrationActive()

virtual bool DAQ::Device::getAnalogCalibrationActive(type_t type,
index_t index 
)const
pure virtual

Get the channel's active state of using its calibration.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The channel's active state of using its calibration.

Implemented in AnalogyDevice.

◆ getAnalogCalibrationState()

virtual bool DAQ::Device::getAnalogCalibrationState(type_t type,
index_t index 
)const
pure virtual

Get the channel's state of calibration.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The channel's active state of using its calibration.

Implemented in AnalogyDevice.

◆ getAnalogCalibrationValue()

virtual double DAQ::Device::getAnalogCalibrationValue(type_t type,
index_t index 
)const
pure virtual

Get the calibration of the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
the calibration value for the channel.

Implemented in AnalogyDevice.

◆ getAnalogDownsample()

virtual size_t DAQ::Device::getAnalogDownsample(type_t type,
index_t index 
)const
pure virtual

Implemented in AnalogyDevice.

◆ getAnalogGain()

virtual double DAQ::Device::getAnalogGain(type_t type,
index_t index 
)const
pure virtual

Get the gain of the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The gain of the selected channel.

Implemented in AnalogyDevice.

◆ getAnalogOffsetUnits()

virtual index_t DAQ::Device::getAnalogOffsetUnits(type_t type,
index_t index 
)const
pure virtual

Get the index of the units for the selected channel zero offset.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The index of the channel's offset units or INVALID on error.

Implemented in AnalogyDevice.

◆ getAnalogRange()

virtual index_t DAQ::Device::getAnalogRange(type_t type,
index_t index 
)const
pure virtual

Get the index of the range for the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The index of the channel's range or INVALID on error.

Implemented in AnalogyDevice.

◆ getAnalogRangeCount()

virtual size_t DAQ::Device::getAnalogRangeCount(type_t type,
index_t index 
)const
pure virtual

Get the number of available ranges for the specified channel.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The number of available ranges for the channel.

Implemented in AnalogyDevice.

◆ getAnalogRangeString()

virtual std::string DAQ::Device::getAnalogRangeString(type_t type,
index_t index,
index_t range 
)const
pure virtual

Get a string representation of the specified range.

Parameters
typeThe channel's type.
indexThe channel's index.
rangeThe index of the channel's range.
Returns
The string representation of the selected range.

Implemented in AnalogyDevice.

◆ getAnalogReference()

virtual index_t DAQ::Device::getAnalogReference(type_t type,
index_t index 
)const
pure virtual

Get the index of the reference for the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The index of the channel's reference or INVALID on error.

Implemented in AnalogyDevice.

◆ getAnalogReferenceCount()

virtual size_t DAQ::Device::getAnalogReferenceCount(type_t type,
index_t index 
)const
pure virtual

Get the number of available reference for the specified channel.

Parameters
typeThe channel's type. \patam index The channel's index.
Returns
The number of available references for the channel.

Implemented in AnalogyDevice.

◆ getAnalogReferenceString()

virtual std::string DAQ::Device::getAnalogReferenceString(type_t type,
index_t index,
index_t reference 
)const
pure virtual

Get a string representation of the specified reference.

Parameters
typeThe channel's type.
indexThe channel's index.
referenceThe index of the channel's reference.
Returns
The string representation of the selected reference.

Implemented in AnalogyDevice.

◆ getAnalogUnits()

virtual index_t DAQ::Device::getAnalogUnits(type_t type,
index_t index 
)const
pure virtual

Get the index of the units for the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The index of the channel's units or INVALID on error.

Implemented in AnalogyDevice.

◆ getAnalogUnitsCount()

virtual size_t DAQ::Device::getAnalogUnitsCount(type_t type,
index_t index 
)const
pure virtual

Get the number of available units for the channel.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The number of available units for the channel.

Implemented in AnalogyDevice.

◆ getAnalogUnitsString()

virtual std::string DAQ::Device::getAnalogUnitsString(type_t type,
index_t index,
index_t units 
)const
pure virtual

Get a string representation of the specifed units.

Parameters
typeThe channel's type.
indexThe channel's index.
unitsThe index of the channel's units.
Returns
The string representation of the selected units.

Implemented in AnalogyDevice.

◆ getAnalogZeroOffset()

virtual double DAQ::Device::getAnalogZeroOffset(type_t type,
index_t index 
)const
pure virtual

Get the offset of the selected channel that makes the signal zero

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The zero offset of the selected channel.

Implemented in AnalogyDevice.

◆ getChannelActive()

virtual bool DAQ::Device::getChannelActive(type_t type,
index_t index 
)const
pure virtual

Get the channel's active state.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
The channel's active state.

Implemented in AnalogyDevice.

◆ getChannelCount()

virtual size_t DAQ::Device::getChannelCount(type_t type)const
pure virtual

Get the number of channels of the specified type.

Parameters
typeThe type of the channels to be counted.
Returns
The number of channels of the specified type.

Implemented in AnalogyDevice.

◆ getDigitalDirection()

virtual direction_t DAQ::Device::getDigitalDirection(index_t index)const
pure virtual

Get the direction of the specified digital channel.

Parameters
indexThe digital channel's index.
Returns
The direction of the digital channel.

Implemented in AnalogyDevice.

◆ setAnalogCalibrationActive()

virtual int DAQ::Device::setAnalogCalibrationActive(type_t type,
index_t index,
bool state 
)
pure virtual

Set the calibration active state of the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
Returns
0 if successful or a negative value on error.

Implemented in AnalogyDevice.

◆ setAnalogCalibrationValue()

virtual int DAQ::Device::setAnalogCalibrationValue(type_t type,
index_t index,
double value 
)
pure virtual

Set the calibration of the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
valueThe calibration value.
Returns
0 if successful or a negative value on error.

Implemented in AnalogyDevice.

◆ setAnalogCounter()

virtual int DAQ::Device::setAnalogCounter(type_t type,
index_t index 
)
pure virtual

Implemented in AnalogyDevice.

◆ setAnalogDownsample()

virtual int DAQ::Device::setAnalogDownsample(type_t type,
index_t index,
size_t downsample 
)
pure virtual

Implemented in AnalogyDevice.

◆ setAnalogGain()

virtual int DAQ::Device::setAnalogGain(type_t type,
index_t index,
double gain 
)
pure virtual

Set the gain of the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
gainThe channel's new gain.
Returns
0 if successful or a negative value on error.

Implemented in AnalogyDevice.

◆ setAnalogOffsetUnits()

virtual int DAQ::Device::setAnalogOffsetUnits(type_t type,
index_t index,
index_t units 
)
pure virtual

Set the offset units of the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
unitsThe channel's new offset units index.
Returns
0 if successful or a negative value on error.

Implemented in AnalogyDevice.

◆ setAnalogRange()

virtual int DAQ::Device::setAnalogRange(type_t type,
index_t index,
index_t range 
)
pure virtual

Set the range of the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
rangeThe channel's new range index.
Returns
0 if successful or a negative value on error.

Implemented in AnalogyDevice.

◆ setAnalogReference()

virtual int DAQ::Device::setAnalogReference(type_t type,
index_t index,
index_t reference 
)
pure virtual

Set the reference of the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
referenceThe channel's new reference index.
Returns
0 if successful or a negative value on error.

Implemented in AnalogyDevice.

◆ setAnalogUnits()

virtual int DAQ::Device::setAnalogUnits(type_t type,
index_t index,
index_t units 
)
pure virtual

Set the units of the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
unitsThe channel's new units index.
Returns
0 if successful or a negative value on error.

Implemented in AnalogyDevice.

◆ setAnalogZeroOffset()

virtual int DAQ::Device::setAnalogZeroOffset(type_t type,
index_t index,
double offset 
)
pure virtual

Set the zero offset of the selected channel.

Parameters
typeThe channel's type.
indexThe channel's index.
offsetThe channel's new zero offset index.
Returns
0 if successful or a negative value on error.

Implemented in AnalogyDevice.

◆ setChannelActive()

virtual int DAQ::Device::setChannelActive(type_t type,
index_t index,
bool state 
)
pure virtual

Set the channel's active state.

Parameters
typeThe channel's type.
indexThe channel's index.
stateThe channel's new state.

Implemented in AnalogyDevice.

◆ setDigitalDirection()

virtual int DAQ::Device::setDigitalDirection(index_t index,
direction_t direction 
)
pure virtual

Set the direction of the specified digital channel.

Parameters
indexThe digital channel's index.
directionThe digital channel's new direction.
Returns
0 if successful or a negative value on error.

Implemented in AnalogyDevice.


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