Orocos Real-Time Toolkit
2.8.3
|
An interface for writing analog output, like for addressing a whole subdevice in comedi. More...
#include <rtt/extras/dev/AnalogOutInterface.hpp>
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. More... | |
AnalogOutInterface (const std::string &name) | |
Create a nameserved AnalogOutInterface. More... | |
virtual | ~AnalogOutInterface () |
virtual void | rangeSet (unsigned int chan, unsigned int range)=0 |
Set the range of a particular channel. More... | |
virtual void | arefSet (unsigned int chan, unsigned int aref)=0 |
Set the analog reference of a particular channel. More... | |
virtual int | rawWrite (unsigned int chan, int value)=0 |
Write a raw value to channel chan. More... | |
virtual int | rawRead (unsigned int chan, int &value)=0 |
Read the current raw value from channel chan. More... | |
virtual unsigned int | rawRange () const =0 |
Returns the absolute raw range (e.g. More... | |
virtual int | write (unsigned int chan, double value)=0 |
Write a MU value to channel chan. More... | |
virtual int | read (unsigned int chan, double &value)=0 |
Read the current MU value from channel chan. More... | |
virtual double | lowest (unsigned int chan) const =0 |
Returns the current lowest measurable input expressed in MU's for a given channel. More... | |
virtual double | highest (unsigned int chan) const =0 |
Returns the highest measurable input expressed in MU's for a given channel. More... | |
virtual double | resolution (unsigned int chan) const =0 |
Resolution is expressed in bits / MU. More... | |
virtual unsigned int | nbOfChannels () const =0 |
Returns the total number of channels. More... | |
unsigned int | binaryRange () const |
Returns the binary range (e.g. More... | |
int | binaryLowest () const |
Returns the binary lowest value. More... | |
int | binaryHighest () const |
Returns the binary highest value. More... | |
Static Public Attributes | |
static NameServer< AnalogOutInterface * > | nameserver |
The NameServer for this interface. More... | |
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)
Definition at line 68 of file AnalogOutInterface.hpp.
This enum can be used to configure the arefSet() function.
Enumerator | |
---|---|
Ground | |
Common |
Reference to ground. |
Differential |
Common reference. |
Other |
Differential reference. Undefined |
Definition at line 77 of file AnalogOutInterface.hpp.
|
inline |
Create a not nameserved AnalogOutInterface instance.
Definition at line 86 of file AnalogOutInterface.hpp.
|
inline |
Create a nameserved AnalogOutInterface.
When name is not "" and unique, it can be retrieved using the AnalogOutInterface::nameserver.
Definition at line 93 of file AnalogOutInterface.hpp.
|
inlinevirtual |
Definition at line 97 of file AnalogOutInterface.hpp.
|
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.
|
inline |
Returns the binary highest value.
Should return rawRange() in all implementations.
Definition at line 185 of file AnalogOutInterface.hpp.
|
inline |
Returns the binary lowest value.
Definition at line 179 of file AnalogOutInterface.hpp.
|
inline |
Returns the binary range (e.g.
12bits DA -> 4096)
Definition at line 173 of file AnalogOutInterface.hpp.
|
pure virtual |
Returns the highest measurable input expressed in MU's for a given channel.
|
pure virtual |
Returns the current lowest measurable input expressed in MU's for a given channel.
|
pure virtual |
Returns the total number of channels.
|
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
|
pure virtual |
Returns the absolute raw range (e.g.
12bits DA -> 4096)
|
pure virtual |
Read the current raw value from channel chan.
|
pure virtual |
Write a raw value to channel chan.
|
pure virtual |
Read the current MU value from channel chan.
|
pure virtual |
Resolution is expressed in bits / MU.
|
pure virtual |
Write a MU value to channel chan.
|
static |
The NameServer for this interface.
Definition at line 191 of file AnalogOutInterface.hpp.