RTXI 1.3
AnalogyDevice Class Reference

#include <analogy_device.h>

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

List of all members.

Classes

struct  analog_channel_t
struct  channel_t
struct  digital_channel_t
struct  subdevice_t

Public Member Functions

 AnalogyDevice (a4l_desc_t *, std::string, IO::channel_t *, size_t)
 ~AnalogyDevice (void)
size_t getChannelCount (DAQ::type_t) const
bool getChannelActive (DAQ::type_t, DAQ::index_t) const
int setChannelActive (DAQ::type_t, DAQ::index_t, bool)
size_t getAnalogRangeCount (DAQ::type_t, DAQ::index_t) const
size_t getAnalogReferenceCount (DAQ::type_t, DAQ::index_t) const
size_t getAnalogUnitsCount (DAQ::type_t, DAQ::index_t) const
std::string getAnalogRangeString (DAQ::type_t, DAQ::index_t, DAQ::index_t) const
std::string getAnalogReferenceString (DAQ::type_t, DAQ::index_t, DAQ::index_t) const
std::string getAnalogUnitsString (DAQ::type_t, DAQ::index_t, DAQ::index_t) const
double getAnalogGain (DAQ::type_t, DAQ::index_t) const
double getAnalogZeroOffset (DAQ::type_t, DAQ::index_t) const
DAQ::index_t getAnalogRange (DAQ::type_t, DAQ::index_t) const
DAQ::index_t getAnalogReference (DAQ::type_t, DAQ::index_t) const
DAQ::index_t getAnalogUnits (DAQ::type_t, DAQ::index_t) const
DAQ::index_t getAnalogOffsetUnits (DAQ::type_t, DAQ::index_t) const
int setAnalogGain (DAQ::type_t, DAQ::index_t, double)
int setAnalogZeroOffset (DAQ::type_t, DAQ::index_t, double)
int setAnalogRange (DAQ::type_t, DAQ::index_t, DAQ::index_t)
int setAnalogReference (DAQ::type_t, DAQ::index_t, DAQ::index_t)
int setAnalogUnits (DAQ::type_t, DAQ::index_t, DAQ::index_t)
int setAnalogOffsetUnits (DAQ::type_t, DAQ::index_t, DAQ::index_t)
DAQ::direction_t getDigitalDirection (DAQ::index_t) const
int setDigitalDirection (DAQ::index_t, DAQ::direction_t)
void read (void)
void write (void)

Protected Member Functions

virtual void doLoad (const Settings::Object::State &)
virtual void doSave (Settings::Object::State &) const

Detailed Description

Definition at line 32 of file analogy_device.h.


Constructor & Destructor Documentation

AnalogyDevice::AnalogyDevice ( a4l_desc_t *  d,
std::string  name,
IO::channel_t chan,
size_t  size 
)

Definition at line 26 of file analogy_device.cpp.

AnalogyDevice::~AnalogyDevice ( void  )

Definition at line 137 of file analogy_device.cpp.


Member Function Documentation

void AnalogyDevice::doLoad ( const Settings::Object::State s) [protected, virtual]

Reimplemented from Settings::Object.

Definition at line 513 of file analogy_device.cpp.

void AnalogyDevice::doSave ( Settings::Object::State s) const [protected, virtual]

Reimplemented from Settings::Object.

Definition at line 544 of file analogy_device.cpp.

double AnalogyDevice::getAnalogGain ( DAQ::type_t  type,
DAQ::index_t  index 
) const [virtual]

Get the gain of the selected channel.

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

Implements DAQ::Device.

Definition at line 301 of file analogy_device.cpp.

index_t AnalogyDevice::getAnalogOffsetUnits ( DAQ::type_t  type,
DAQ::index_t  index 
) const [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.

Implements DAQ::Device.

Definition at line 293 of file analogy_device.cpp.

index_t AnalogyDevice::getAnalogRange ( DAQ::type_t  type,
DAQ::index_t  index 
) const [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.

Implements DAQ::Device.

Definition at line 269 of file analogy_device.cpp.

size_t AnalogyDevice::getAnalogRangeCount ( DAQ::type_t  type,
DAQ::index_t  index 
) const [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.

Implements DAQ::Device.

Definition at line 185 of file analogy_device.cpp.

std::string AnalogyDevice::getAnalogRangeString ( DAQ::type_t  type,
DAQ::index_t  index,
DAQ::index_t  range 
) const [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.

Implements DAQ::Device.

Definition at line 217 of file analogy_device.cpp.

index_t AnalogyDevice::getAnalogReference ( DAQ::type_t  type,
DAQ::index_t  index 
) const [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.

Implements DAQ::Device.

Definition at line 277 of file analogy_device.cpp.

size_t AnalogyDevice::getAnalogReferenceCount ( DAQ::type_t  type,
DAQ::index_t  index 
) const [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.

Implements DAQ::Device.

Definition at line 201 of file analogy_device.cpp.

std::string AnalogyDevice::getAnalogReferenceString ( DAQ::type_t  type,
DAQ::index_t  index,
DAQ::index_t  reference 
) const [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.

Implements DAQ::Device.

Definition at line 235 of file analogy_device.cpp.

index_t AnalogyDevice::getAnalogUnits ( DAQ::type_t  type,
DAQ::index_t  index 
) const [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.

Implements DAQ::Device.

Definition at line 285 of file analogy_device.cpp.

size_t AnalogyDevice::getAnalogUnitsCount ( DAQ::type_t  type,
DAQ::index_t  index 
) const [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.

Implements DAQ::Device.

Definition at line 209 of file analogy_device.cpp.

std::string AnalogyDevice::getAnalogUnitsString ( DAQ::type_t  type,
DAQ::index_t  index,
DAQ::index_t  units 
) const [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.

Implements DAQ::Device.

Definition at line 254 of file analogy_device.cpp.

double AnalogyDevice::getAnalogZeroOffset ( DAQ::type_t  type,
DAQ::index_t  index 
) const [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.

Implements DAQ::Device.

Definition at line 309 of file analogy_device.cpp.

bool AnalogyDevice::getChannelActive ( DAQ::type_t  type,
DAQ::index_t  index 
) const [virtual]

Get the channel's active state.

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

Implements DAQ::Device.

Definition at line 160 of file analogy_device.cpp.

size_t AnalogyDevice::getChannelCount ( DAQ::type_t  type) const [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.

Implements DAQ::Device.

Definition at line 152 of file analogy_device.cpp.

direction_t AnalogyDevice::getDigitalDirection ( DAQ::index_t  index) const [virtual]

Get the direction of the specified digital channel.

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

Implements DAQ::Device.

Definition at line 388 of file analogy_device.cpp.

void AnalogyDevice::read ( void  ) [virtual]

Function called by the realtime task at the beginning of each period.

See also:
RT::System

Reimplemented from RT::Device.

Definition at line 411 of file analogy_device.cpp.

int AnalogyDevice::setAnalogGain ( DAQ::type_t  type,
DAQ::index_t  index,
double  gain 
) [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.

Implements DAQ::Device.

Definition at line 379 of file analogy_device.cpp.

int AnalogyDevice::setAnalogOffsetUnits ( DAQ::type_t  type,
DAQ::index_t  index,
DAQ::index_t  units 
) [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.

Implements DAQ::Device.

Definition at line 361 of file analogy_device.cpp.

int AnalogyDevice::setAnalogRange ( DAQ::type_t  type,
DAQ::index_t  index,
DAQ::index_t  range 
) [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.

Implements DAQ::Device.

Definition at line 317 of file analogy_device.cpp.

int AnalogyDevice::setAnalogReference ( DAQ::type_t  type,
DAQ::index_t  index,
DAQ::index_t  reference 
) [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.

Implements DAQ::Device.

Definition at line 343 of file analogy_device.cpp.

int AnalogyDevice::setAnalogUnits ( DAQ::type_t  type,
DAQ::index_t  index,
DAQ::index_t  units 
) [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.

Implements DAQ::Device.

Definition at line 352 of file analogy_device.cpp.

int AnalogyDevice::setAnalogZeroOffset ( DAQ::type_t  type,
DAQ::index_t  index,
double  offset 
) [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.

Implements DAQ::Device.

Definition at line 370 of file analogy_device.cpp.

int AnalogyDevice::setChannelActive ( DAQ::type_t  type,
DAQ::index_t  index,
bool  state 
) [virtual]

Set the channel's active state.

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

Implements DAQ::Device.

Definition at line 168 of file analogy_device.cpp.

int AnalogyDevice::setDigitalDirection ( DAQ::index_t  index,
DAQ::direction_t  direction 
) [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.

Implements DAQ::Device.

Definition at line 395 of file analogy_device.cpp.

void AnalogyDevice::write ( void  ) [virtual]

Function called by the realtime task at the end of each period.

See also:
RT::System

Reimplemented from RT::Device.

Definition at line 452 of file analogy_device.cpp.


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