Axis Class Reference

Axis is an example of how you can easily implement a generic axis using the Device Interfaces. More...

#include <Axis.hpp>

List of all members.

Public Member Functions

 Axis (DriveInterface *adrive)
 Create an Axis with an DriveInterface.
virtual ~Axis ()
 Disable the Drive and destruct the Axis object.
virtual bool stop ()
virtual bool lock ()
virtual bool unlock ()
virtual bool drive (double v)
virtual bool isLocked () const
virtual bool isStopped () const
virtual bool isDriven () const
virtual void limitDrive (double lower, double higher, const Event< void(std::string)> &ev)
 Limit the range of the axis between lower and higher angle.
void setBrake (DigitalOutput *brk)
 Add a brake to the Axis.
DigitalOutput * getBrake ()
DigitalOutput * getEnable ()
void setDrive (DriveInterface *a)
 Sets the drive used.
DriveInterface * getDrive () const
 Returns the drive used.
double getDriveValue () const
 Returns the last drive value that has been send.
virtual SensorInterface< double > * getSensor (const std::string &name) const
void setSensor (const std::string &name, SensorInterface< double > *_sens)
 Add a sensor to the Axis (position, velocity, torque,.
virtual std::vector< std::string > sensorList () const
virtual DigitalInput * getSwitch (const std::string &name) const
virtual std::vector< std::string > switchList () const
void setSwitch (const std::string &name, DigitalInput *_digin)
 Add a digital input to the Axis (home switch, end of run,.
virtual SensorInterface< int > * getCounter (const std::string &name) const
virtual std::vector< std::string > counterList () const
void setCounter (const std::string &name, SensorInterface< int > *_sens)
 Add a counter to the Axis (position, turns,.

Detailed Description

Axis is an example of how you can easily implement a generic axis using the Device Interfaces.

Calibration of the sensors must be done outside of this object, since sensor calibration is to specific per sensor.

See also:
CalibrationInterface

The EndLimit switches limit the drive() command. Each Sensor added must impose a software limit on drive().

Definition at line 55 of file Axis.hpp.


Constructor & Destructor Documentation

Axis ( DriveInterface *  adrive  ) 

Create an Axis with an DriveInterface.

Parameters:
adrive The drive of this axis.

Definition at line 32 of file Axis.cpp.

~Axis (  )  [virtual]

Disable the Drive and destruct the Axis object.

Postcondition:
Drive, Sensors and DigitalInput objects are deleted.

Definition at line 40 of file Axis.cpp.


Member Function Documentation

void limitDrive ( double  lower,
double  higher,
const Event< void(std::string)> &  ev 
) [virtual]

Limit the range of the axis between lower and higher angle.

The provided event will be fired when the axis exceeds this range limit.

Definition at line 147 of file Axis.cpp.

void setBrake ( DigitalOutput *  brk  ) 

Add a brake to the Axis.

It is aggregated.

Definition at line 238 of file Axis.cpp.

void setCounter ( const std::string &  name,
SensorInterface< int > *  _sens 
)

Add a counter to the Axis (position, turns,.

..). The SensorInterface object is aggregated.

Parameters:
name The name of the counter.
_sens The counter.

Definition at line 199 of file Axis.cpp.

void setSensor ( const std::string &  name,
SensorInterface< double > *  _sens 
)

Add a sensor to the Axis (position, velocity, torque,.

..). The sensor is aggregated.

Parameters:
name The name of the sensor.
_sens The sensor

Definition at line 153 of file Axis.cpp.

void setSwitch ( const std::string &  name,
DigitalInput *  _digin 
)

Add a digital input to the Axis (home switch, end of run,.

..). The _digin object is aggregated.

Parameters:
name The name of the input.
_digin The DigitalInput.

Definition at line 176 of file Axis.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Dec 23 15:05:28 2010 for OrocosComponentLibrary by  doxygen 1.6.3