AnalogOutInterface Class Template Reference
[Device Interfaces]

#include </home/sspr/src/www/orocos-1.0/export/build/orocos-rtt-1.2.2/build/rtt/dev/AnalogOutInterface.hpp>

Inheritance diagram for AnalogOutInterface:

NameServerRegistrator List of all members.

Detailed Description

template<class T>
class RTT::AnalogOutInterface< T >

An interface for writing analog output, like for addressing a whole subdevice in comedi.

Measurement Unit (MU) : Unit of what is actually read on the analog channel (e.g. Volt)


Public Types

enum  AnalogReference { Ground = 0, Common, Differential, Other }
 This enum can be used to configure the arefSet() function. More...

Public Member Functions

 AnalogOutInterface ()
 Create a not nameserved AnalogOutInterface instance.
 AnalogOutInterface (const std::string &name)
 Create a nameserved AnalogOutInterface.
virtual void rangeSet (unsigned int chan, unsigned int range)=0
 Set the range of a particular channel.
virtual void arefSet (unsigned int chan, unsigned int aref)=0
 Set the analog reference of a particular channel.
virtual void write (unsigned int chan, T value)=0
 Write value to channel chan.
virtual T binaryRange () const=0
 Returns the binary range (e.g.
virtual T binaryLowest () const=0
 Returns the binary lowest value.
virtual T binaryHighest () const=0
 Returns the binary highest value.
virtual double lowest (unsigned int chan) const=0
 Returns the current lowest measurable input expressed in MU's for a given channel.
virtual double highest (unsigned int chan) const=0
 Returns the highest measurable input expressed in MU's for a given channel.
virtual double resolution (unsigned int chan) const=0
 Resolution is expressed in bits / MU.
virtual unsigned int nbOfChannels () const=0
 Returns the total number of channels.

Static Public Attributes

static NameServer< AnalogOutInterface<
T > * > 
nameserver
 The NameServer for this interface.


Member Enumeration Documentation

enum AnalogReference

This enum can be used to configure the arefSet() function.

See also:
http://www.comedi.org
Enumerator:
Common  Reference to ground.
Differential  Common reference.
Other  Undefined.


Constructor & Destructor Documentation

AnalogOutInterface ( const std::string &  name  )  [inline]

Create a nameserved AnalogOutInterface.

When name is not "" and unique, it can be retrieved using the AnalogOutInterface::nameserver.


Member Function Documentation

virtual void rangeSet ( unsigned int  chan,
unsigned int  range 
) [pure virtual]

Set the range of a particular channel.

We took (for now) the comedi API for this, where every range (eg. -5/+5 V) corresponds to an unsigned int. You should provide a mapping from that int to a particular range in your driver documentation

virtual void arefSet ( unsigned int  chan,
unsigned int  aref 
) [pure virtual]

Set the analog reference of a particular channel.

We took (for now) the comedi API for this, where every aref (eg. Analog reference set to ground (aka AREF_GROUND) corresponds to an unsigned int.

See also:
AnalogReference.

virtual T binaryRange (  )  const [pure virtual]

Returns the binary range (e.g.

12bits DA -> 4096)


Member Data Documentation

NameServer< AnalogOutInterface< T > * > nameserver [static]

The NameServer for this interface.

See also:
NameServer


The documentation for this class was generated from the following file:
Generated on Fri Oct 19 16:27:23 2007 for Orocos by  doxygen 1.5.1