RTXI 1.3
DAQ::Device Class Reference

#include <daq.h>

Inheritance diagram for DAQ::Device:
RT::Device IO::Block RT::List< T >::Node Settings::Object AnalogyDevice ComediDevice ComediDevice NIDevice

List of all members.

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 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 direction_t getDigitalDirection (index_t index) const =0
virtual int setDigitalDirection (index_t index, direction_t direction)=0

Detailed Description

Object that represents a single DAQ card.

Definition at line 131 of file daq.h.


Constructor & Destructor Documentation

DAQ::Device::Device ( std::string  name,
IO::channel_t chan,
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 22 of file daq.cpp.

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

Reimplemented from RT::Device.

Definition at line 27 of file daq.cpp.


Member Function Documentation

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, and ComediDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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. index The channel's index.
Returns:
The number of available references for the channel.

Implemented in AnalogyDevice, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, and ComediDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, and ComediDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, and ComediDevice.

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, ComediDevice, ComediDevice, and NIDevice.

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, ComediDevice, ComediDevice, and NIDevice.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines