#include <FakeAnalogDevice.hpp>
Public Member Functions | |
virtual void | arefSet (unsigned int, unsigned int) |
FakeAnalogDevice (unsigned int channels=32, unsigned int bin_range=4096, double lowest=-5.0, double highest=+5.0) | |
virtual double | highest (unsigned int) const |
virtual double | lowest (unsigned int) const |
virtual unsigned int | nbOfChannels () const |
virtual void | rangeSet (unsigned int, unsigned int) |
virtual unsigned int | rawRange () const |
virtual int | rawRead (unsigned int chan, int &value) |
virtual int | rawWrite (unsigned int chan, int value) |
virtual int | read (unsigned int chan, double &value) |
virtual double | resolution (unsigned int) const |
virtual int | write (unsigned int chan, double value) |
~FakeAnalogDevice () | |
Public Member Functions inherited from RTT::dev::AnalogInInterface | |
AnalogInInterface () | |
AnalogInInterface (const std::string &name) | |
int | binaryHighest () const |
int | binaryLowest () const |
unsigned int | binaryRange () const |
virtual | ~AnalogInInterface () |
Public Member Functions inherited from RTT::dev::AnalogOutInterface | |
AnalogOutInterface () | |
AnalogOutInterface (const std::string &name) | |
int | binaryHighest () const |
int | binaryLowest () const |
unsigned int | binaryRange () const |
virtual | ~AnalogOutInterface () |
Public Attributes | |
unsigned int | mbin_range |
int * | mchannels |
double | mhighest |
double | mlowest |
unsigned int | nbofchans |
Additional Inherited Members | |
Public Types inherited from RTT::dev::AnalogInInterface | |
enum | AnalogReference { Ground = 0, Common, Differential, Other } |
Public Types inherited from RTT::dev::AnalogOutInterface | |
enum | AnalogReference { Ground = 0, Common, Differential, Other } |
Static Public Attributes inherited from RTT::dev::AnalogInInterface | |
static NameServer< AnalogInInterface * > | nameserver |
Static Public Attributes inherited from RTT::dev::AnalogOutInterface | |
static NameServer< AnalogOutInterface * > | nameserver |
A test class which replaces a real device driver. It reproduces on the output what it gets on the input.
Definition at line 41 of file FakeAnalogDevice.hpp.
|
inline |
Definition at line 50 of file FakeAnalogDevice.hpp.
|
inline |
Definition at line 60 of file FakeAnalogDevice.hpp.
|
inlinevirtual |
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.
Implements RTT::dev::AnalogInInterface.
Definition at line 67 of file FakeAnalogDevice.hpp.
|
inlinevirtual |
Returns the highest measurable input expressed in MU's for a given channel
Implements RTT::dev::AnalogInInterface.
Definition at line 117 of file FakeAnalogDevice.hpp.
|
inlinevirtual |
Returns the current lowest measurable input expressed in MU's for a given channel
Implements RTT::dev::AnalogInInterface.
Definition at line 112 of file FakeAnalogDevice.hpp.
|
inlinevirtual |
Returns the total number of channels.
Implements RTT::dev::AnalogInInterface.
Definition at line 70 of file FakeAnalogDevice.hpp.
|
inlinevirtual |
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
Implements RTT::dev::AnalogInInterface.
Definition at line 64 of file FakeAnalogDevice.hpp.
|
inlinevirtual |
Returns the absolute maximal range (e.g. 12bits AD -> 4096).
Implements RTT::dev::AnalogInInterface.
Definition at line 107 of file FakeAnalogDevice.hpp.
|
inlinevirtual |
Read a raw value from channel chan
Implements RTT::dev::AnalogInInterface.
Definition at line 91 of file FakeAnalogDevice.hpp.
|
inlinevirtual |
Write a raw value to channel chan
Implements RTT::dev::AnalogOutInterface.
Definition at line 100 of file FakeAnalogDevice.hpp.
|
inlinevirtual |
Read the real value from channel chan
Implements RTT::dev::AnalogInInterface.
Definition at line 74 of file FakeAnalogDevice.hpp.
|
inlinevirtual |
Resolution is expressed in bits / MU
Implements RTT::dev::AnalogInInterface.
Definition at line 122 of file FakeAnalogDevice.hpp.
|
inlinevirtual |
Write a MU value to channel chan
Implements RTT::dev::AnalogOutInterface.
Definition at line 83 of file FakeAnalogDevice.hpp.
unsigned int RTT::FakeAnalogDevice::mbin_range |
Definition at line 47 of file FakeAnalogDevice.hpp.
int* RTT::FakeAnalogDevice::mchannels |
Definition at line 46 of file FakeAnalogDevice.hpp.
double RTT::FakeAnalogDevice::mhighest |
Definition at line 48 of file FakeAnalogDevice.hpp.
double RTT::FakeAnalogDevice::mlowest |
Definition at line 48 of file FakeAnalogDevice.hpp.
unsigned int RTT::FakeAnalogDevice::nbofchans |
Definition at line 45 of file FakeAnalogDevice.hpp.