Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::gmi::Controller::Axis Class Reference

Interface class to access Axis properties and functions. More...

#include <Controller.h>

Inheritance diagram for sf::gmi::Controller::Axis:
Collaboration diagram for sf::gmi::Controller::Axis:

Public Types

typedef TVector< Axis * > PtrVector
 Easy to use vector for an array of Axis pointers.
 

Public Member Functions

EAxisLocation getLocation () const
 Returns the location of the axis in the constellation of axes.
 
AxisMovements getMovements () const
 Returns the possible movements the is instance can make.
 
const char * getName () const
 Returns the name of this instance.
 
const char * getDescription () const
 Returns the description of this instance.
 
value_type getCurrent (EAxisValueType avt) const
 Returns the current position/velocity/acceleration.
 
bool setCurrent (EAxisValueType avt, value_type val)
 Sets the current position/velocity/acceleration. Only when not moving.
 
value_type getAccuracy () const
 Returns the accuracy for velocity and position.
 
value_type getResolution () const
 Returns the resolution of the axis.
 
value_type getMinMax (EAxisMinMax amm) const
 Gets the current extremes from this axis.
 
bool setOffset (double ofs)
 Set the position offset.
 
value_type setOffset () const
 Get the position offset.
 
double getTarget (EAxisValueType avt) const
 Returns the current velocity.
 
bool setTarget (EAxisValueType avt, value_type val)
 Sets the current velocity.
 
bool setPosition (value_type value)
 Sets the current position.
 
value_type normalized (value_type pos) const
 normalize the passed position for all unlimited rotation axes. Uses accuracy to find the actual position to normalize. The passed value is also returned.
 
bool setMode (EAxisMode mode)
 Sets the axis mode for operation. Returns false on failure.
 
EAxisMode getMode () const
 Returns the mode of operation.
 
bool canModeChange (EAxisMode cur_mode, EAxisMode new_mode, bool pos_complete, bool vel_complete, bool con_complete)
 Returns true if the mode can be changed.
 

Protected Member Functions

 Axis (Controller *mc, EAxisLocation)
 Constructor that registers itself at the passed controller.
 
virtual ~Axis ()
 Virtual destructor for possible derived destructors.
 

Protected Attributes

AxisMovements _movements
 Holds the possible movements.
 

Detailed Description

Interface class to access Axis properties and functions.

Member Typedef Documentation

◆ PtrVector

Easy to use vector for an array of Axis pointers.

Constructor & Destructor Documentation

◆ Axis()

sf::gmi::Controller::Axis::Axis ( Controller mc,
EAxisLocation   
)
protected

Constructor that registers itself at the passed controller.

◆ ~Axis()

virtual sf::gmi::Controller::Axis::~Axis ( )
protectedvirtual

Virtual destructor for possible derived destructors.

Member Function Documentation

◆ canModeChange()

bool sf::gmi::Controller::Axis::canModeChange ( EAxisMode  cur_mode,
EAxisMode  new_mode,
bool  pos_complete,
bool  vel_complete,
bool  con_complete 
)

Returns true if the mode can be changed.

◆ getAccuracy()

value_type sf::gmi::Controller::Axis::getAccuracy ( ) const

Returns the accuracy for velocity and position.

◆ getCurrent()

value_type sf::gmi::Controller::Axis::getCurrent ( EAxisValueType  avt) const

Returns the current position/velocity/acceleration.

◆ getDescription()

const char * sf::gmi::Controller::Axis::getDescription ( ) const

Returns the description of this instance.

◆ getLocation()

EAxisLocation sf::gmi::Controller::Axis::getLocation ( ) const

Returns the location of the axis in the constellation of axes.

◆ getMinMax()

value_type sf::gmi::Controller::Axis::getMinMax ( EAxisMinMax  amm) const

Gets the current extremes from this axis.

◆ getMode()

EAxisMode sf::gmi::Controller::Axis::getMode ( ) const

Returns the mode of operation.

◆ getMovements()

AxisMovements sf::gmi::Controller::Axis::getMovements ( ) const

Returns the possible movements the is instance can make.

◆ getName()

const char * sf::gmi::Controller::Axis::getName ( ) const

Returns the name of this instance.

◆ getResolution()

value_type sf::gmi::Controller::Axis::getResolution ( ) const

Returns the resolution of the axis.

◆ getTarget()

double sf::gmi::Controller::Axis::getTarget ( EAxisValueType  avt) const

Returns the current velocity.

◆ normalized()

value_type sf::gmi::Controller::Axis::normalized ( value_type  pos) const

normalize the passed position for all unlimited rotation axes. Uses accuracy to find the actual position to normalize. The passed value is also returned.

◆ setCurrent()

bool sf::gmi::Controller::Axis::setCurrent ( EAxisValueType  avt,
value_type  val 
)

Sets the current position/velocity/acceleration. Only when not moving.

◆ setMode()

bool sf::gmi::Controller::Axis::setMode ( EAxisMode  mode)

Sets the axis mode for operation. Returns false on failure.

◆ setOffset() [1/2]

value_type sf::gmi::Controller::Axis::setOffset ( ) const

Get the position offset.

◆ setOffset() [2/2]

bool sf::gmi::Controller::Axis::setOffset ( double  ofs)

Set the position offset.

◆ setPosition()

bool sf::gmi::Controller::Axis::setPosition ( value_type  value)

Sets the current position.

◆ setTarget()

bool sf::gmi::Controller::Axis::setTarget ( EAxisValueType  avt,
value_type  val 
)

Sets the current velocity.

Member Data Documentation

◆ _movements

AxisMovements sf::gmi::Controller::Axis::_movements
protected

Holds the possible movements.


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