#include <AnalogOutInterface.hpp>
Public Types | |
enum | AnalogReference { Ground = 0, Common, Differential, Other } |
Public Member Functions | |
AnalogOutInterface () | |
AnalogOutInterface (const std::string &name) | |
virtual void | arefSet (unsigned int chan, unsigned int aref)=0 |
int | binaryHighest () const |
int | binaryLowest () const |
unsigned int | binaryRange () const |
virtual double | highest (unsigned int chan) const =0 |
virtual double | lowest (unsigned int chan) const =0 |
virtual unsigned int | nbOfChannels () const =0 |
virtual void | rangeSet (unsigned int chan, unsigned int range)=0 |
virtual unsigned int | rawRange () const =0 |
virtual int | rawRead (unsigned int chan, int &value)=0 |
virtual int | rawWrite (unsigned int chan, int value)=0 |
virtual int | read (unsigned int chan, double &value)=0 |
virtual double | resolution (unsigned int chan) const =0 |
virtual int | write (unsigned int chan, double value)=0 |
virtual | ~AnalogOutInterface () |
Static Public Attributes | |
static NameServer < AnalogOutInterface * > | nameserver |
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.
Ground | |
Common |
Reference to ground |
Differential |
Common reference |
Other |
Differential reference Undefined |
Definition at line 77 of file AnalogOutInterface.hpp.
RTT::dev::AnalogOutInterface::AnalogOutInterface | ( | ) | [inline] |
Create a not nameserved AnalogOutInterface instance.
Definition at line 86 of file AnalogOutInterface.hpp.
RTT::dev::AnalogOutInterface::AnalogOutInterface | ( | const std::string & | name | ) | [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.
virtual RTT::dev::AnalogOutInterface::~AnalogOutInterface | ( | ) | [inline, virtual] |
Definition at line 97 of file AnalogOutInterface.hpp.
virtual void RTT::dev::AnalogOutInterface::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.
Implemented in RTT::FakeAnalogDevice.
int RTT::dev::AnalogOutInterface::binaryHighest | ( | ) | const [inline] |
Returns the binary highest value
Definition at line 185 of file AnalogOutInterface.hpp.
int RTT::dev::AnalogOutInterface::binaryLowest | ( | ) | const [inline] |
Returns the binary lowest value.
Definition at line 179 of file AnalogOutInterface.hpp.
unsigned int RTT::dev::AnalogOutInterface::binaryRange | ( | ) | const [inline] |
Returns the binary range (e.g. 12bits DA -> 4096)
Definition at line 173 of file AnalogOutInterface.hpp.
virtual double RTT::dev::AnalogOutInterface::highest | ( | unsigned int | chan | ) | const [pure virtual] |
Returns the highest measurable input expressed in MU's for a given channel
Implemented in RTT::FakeAnalogDevice.
virtual double RTT::dev::AnalogOutInterface::lowest | ( | unsigned int | chan | ) | const [pure virtual] |
Returns the current lowest measurable input expressed in MU's for a given channel
Implemented in RTT::FakeAnalogDevice.
virtual unsigned int RTT::dev::AnalogOutInterface::nbOfChannels | ( | ) | const [pure virtual] |
Returns the total number of channels.
Implemented in RTT::FakeAnalogDevice.
virtual void RTT::dev::AnalogOutInterface::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
Implemented in RTT::FakeAnalogDevice.
virtual unsigned int RTT::dev::AnalogOutInterface::rawRange | ( | ) | const [pure virtual] |
Returns the absolute raw range (e.g. 12bits DA -> 4096)
Implemented in RTT::FakeAnalogDevice.
virtual int RTT::dev::AnalogOutInterface::rawRead | ( | unsigned int | chan, |
int & | value | ||
) | [pure virtual] |
Read the current raw value from channel chan.
Implemented in RTT::FakeAnalogDevice.
virtual int RTT::dev::AnalogOutInterface::rawWrite | ( | unsigned int | chan, |
int | value | ||
) | [pure virtual] |
virtual int RTT::dev::AnalogOutInterface::read | ( | unsigned int | chan, |
double & | value | ||
) | [pure virtual] |
Read the current MU value from channel chan.
Implemented in RTT::FakeAnalogDevice.
virtual double RTT::dev::AnalogOutInterface::resolution | ( | unsigned int | chan | ) | const [pure virtual] |
Resolution is expressed in bits / MU
Implemented in RTT::FakeAnalogDevice.
virtual int RTT::dev::AnalogOutInterface::write | ( | unsigned int | chan, |
double | value | ||
) | [pure virtual] |
NameServer< AnalogOutInterface * > AnalogOutInterface::nameserver [static] |
The NameServer for this interface.
Definition at line 191 of file AnalogOutInterface.hpp.