Public Member Functions | Public Attributes
RTT::FakeAnalogDevice Struct Reference

#include <FakeAnalogDevice.hpp>

Inheritance diagram for RTT::FakeAnalogDevice:
Inheritance graph
[legend]

List of all members.

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 Attributes

unsigned int mbin_range
int * mchannels
double mhighest
double mlowest
unsigned int nbofchans

Detailed Description

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.


Constructor & Destructor Documentation

RTT::FakeAnalogDevice::FakeAnalogDevice ( unsigned int  channels = 32,
unsigned int  bin_range = 4096,
double  lowest = -5.0,
double  highest = +5.0 
) [inline]

Definition at line 50 of file FakeAnalogDevice.hpp.

Definition at line 60 of file FakeAnalogDevice.hpp.


Member Function Documentation

virtual void RTT::FakeAnalogDevice::arefSet ( unsigned  chan,
unsigned  aref 
) [inline, 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

Implements RTT::dev::AnalogInInterface.

Definition at line 67 of file FakeAnalogDevice.hpp.

virtual double RTT::FakeAnalogDevice::highest ( unsigned  chan) const [inline, virtual]

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.

virtual double RTT::FakeAnalogDevice::lowest ( unsigned  chan) const [inline, virtual]

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.

virtual unsigned int RTT::FakeAnalogDevice::nbOfChannels ( ) const [inline, virtual]

Returns the total number of channels.

Implements RTT::dev::AnalogInInterface.

Definition at line 70 of file FakeAnalogDevice.hpp.

virtual void RTT::FakeAnalogDevice::rangeSet ( unsigned  chan,
unsigned  range 
) [inline, 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

Implements RTT::dev::AnalogInInterface.

Definition at line 64 of file FakeAnalogDevice.hpp.

virtual unsigned int RTT::FakeAnalogDevice::rawRange ( ) const [inline, virtual]

Returns the absolute maximal range (e.g. 12bits AD -> 4096).

Implements RTT::dev::AnalogInInterface.

Definition at line 107 of file FakeAnalogDevice.hpp.

virtual int RTT::FakeAnalogDevice::rawRead ( unsigned int  chan,
int &  value 
) [inline, virtual]

Read a raw value from channel chan

Returns:
0 on sucess.

Implements RTT::dev::AnalogInInterface.

Definition at line 91 of file FakeAnalogDevice.hpp.

virtual int RTT::FakeAnalogDevice::rawWrite ( unsigned int  chan,
int  value 
) [inline, virtual]

Write a raw value to channel chan

Returns:
0 on success.

Implements RTT::dev::AnalogOutInterface.

Definition at line 100 of file FakeAnalogDevice.hpp.

virtual int RTT::FakeAnalogDevice::read ( unsigned int  chan,
double &  value 
) [inline, virtual]

Read the real value from channel chan

Returns:
0 on sucess.

Implements RTT::dev::AnalogInInterface.

Definition at line 74 of file FakeAnalogDevice.hpp.

virtual double RTT::FakeAnalogDevice::resolution ( unsigned  chan) const [inline, virtual]

Resolution is expressed in bits / MU

Implements RTT::dev::AnalogInInterface.

Definition at line 122 of file FakeAnalogDevice.hpp.

virtual int RTT::FakeAnalogDevice::write ( unsigned int  chan,
double  value 
) [inline, virtual]

Write a MU value to channel chan

Returns:
0 on success.

Implements RTT::dev::AnalogOutInterface.

Definition at line 83 of file FakeAnalogDevice.hpp.


Member Data Documentation

Definition at line 47 of file FakeAnalogDevice.hpp.

Definition at line 46 of file FakeAnalogDevice.hpp.

Definition at line 48 of file FakeAnalogDevice.hpp.

Definition at line 48 of file FakeAnalogDevice.hpp.

Definition at line 45 of file FakeAnalogDevice.hpp.


The documentation for this struct was generated from the following file:


rtt
Author(s): RTT Developers
autogenerated on Sat Jun 8 2019 18:46:36