TwiceAsNice  2019-02-18
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Basda::MoccaWheelServiceWorker Class Reference

This class is the implementation of the generic X interface. More...

#include <MoccaWheelServiceWorker.h>

Inheritance diagram for Basda::MoccaWheelServiceWorker:
Inheritance graph
Collaboration diagram for Basda::MoccaWheelServiceWorker:
Collaboration graph

Classes

struct  WheelDeviceAsyncImpl
 This is the implementation of the call back object to update the completion status. More...
 
struct  WheelDeviceCmdAsyncImpl
 This struct is the implementation of the asynchronous command status method. More...
 

Public Member Functions

 MoccaWheelServiceWorker (const Nice::JointPtr &_config, const MoccaNDevicePtr &_device)
 Constructor. More...
 
void moveToHome ()
 Destructor. More...
 
virtual ~MoccaWheelServiceWorker ()
 
virtual void moveAbsolute (int _target, std::string _unit)
 
virtual void moveRelative (int _target, std::string _unit)
 
virtual void moveToNamedPosition (int _namedPosition)
 This method allows to move the motor to a named position. More...
 
virtual void scanAllReferenceSwitches ()
 
virtual Nice::Int getPosition ()
 Returns the current positions of all motors. More...
 
void checkFullTurn ()
 
std::string checkForNamedPosition ()
 This method checks whether the current position is a named position. More...
 
virtual Nice::Int coordinateTransformation (double _value, std::string)
 This method converts the given value from steps into _unit. More...
 
virtual double coordinateTransformationInverse (Nice::Int _value, std::string)
 This method converts the given value from _unit into steps. More...
 
virtual double coordinateTranslateInverse (Nice::Int _value, std::string)
 This method converts the given value from _unit into steps. More...
 
Nice::Int getPositionOffset ()
 
void scanPositionSwitches ()
 
void validateScannedPositionSwitches ()
 
 MoccaWheelServiceWorker (const Nice::JointPtr &_config, const MoccaNDevicePtr &_device)
 Constructor. More...
 
void moveToHome ()
 Destructor. More...
 
virtual ~MoccaWheelServiceWorker ()
 
virtual void moveAbsolute (int _target, std::string _unit)
 
virtual void moveRelative (int _target, std::string _unit)
 
virtual void moveToNamedPosition (int _namedPosition)
 This method allows to move the motor to a named position. More...
 
virtual void scanAllReferenceSwitches ()
 
virtual Nice::Int getPosition ()
 Returns the current positions of all motors. More...
 
void checkFullTurn ()
 
std::string checkForNamedPosition ()
 This method checks whether the current position is a named position. More...
 
virtual Nice::Int coordinateTransformation (double _value, std::string)
 This method converts the given value from steps into _unit. More...
 
virtual double coordinateTransformationInverse (Nice::Int _value, std::string)
 This method converts the given value from _unit into steps. More...
 
virtual double coordinateTranslateInverse (Nice::Int _value, std::string)
 This method converts the given value from _unit into steps. More...
 
Nice::Int getPositionOffset ()
 
void scanPositionSwitches ()
 
void validateScannedPositionSwitches ()
 
- Public Member Functions inherited from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >
 MoccaNServiceWorkerCore (const Nice::JointPtr &_config, const MoccaNDevicePtr &_device)
 Constructor. More...
 
 MoccaNServiceWorkerCore (const Nice::JointPtr &_config, const MoccaNDevicePtr &_device)
 Constructor. More...
 
 MoccaNServiceWorkerCore (const Nice::JointPtr &_config, const MoccaNDevicePtr &_device)
 Constructor. More...
 
virtual ~MoccaNServiceWorkerCore ()
 Destructor. More...
 
virtual ~MoccaNServiceWorkerCore ()
 Destructor. More...
 
virtual ~MoccaNServiceWorkerCore ()
 Destructor. More...
 
virtual void init ()
 This method initiate and open the device. More...
 
virtual void init ()
 This method initiate and open the device. More...
 
virtual void init ()
 This method initiate and open the device. More...
 
virtual void deinit ()
 This method deinit and close the device. More...
 
virtual void deinit ()
 This method deinit and close the device. More...
 
virtual void deinit ()
 This method deinit and close the device. More...
 
virtual void activate ()
 This method activate the device. More...
 
virtual void activate ()
 This method activate the device. More...
 
virtual void activate ()
 This method activate the device. More...
 
virtual void deactivate ()
 This method deactivate the device. More...
 
virtual void deactivate ()
 This method deactivate the device. More...
 
virtual void deactivate ()
 This method deactivate the device. More...
 
virtual void terminate ()
 This method shut down the device. More...
 
virtual void terminate ()
 This method shut down the device. More...
 
virtual void terminate ()
 This method shut down the device. More...
 
virtual void errorOffline ()
 
virtual void errorOffline ()
 
virtual void errorOffline ()
 
virtual void errorStandby ()
 
virtual void errorStandby ()
 
virtual void errorStandby ()
 
virtual void errorOnline ()
 
virtual void errorOnline ()
 
virtual void errorOnline ()
 
virtual void errorWorking ()
 
virtual void errorWorking ()
 
virtual void errorWorking ()
 
virtual void idleOffline ()
 
virtual void idleOffline ()
 
virtual void idleOffline ()
 
virtual void idleOnline ()
 
virtual void idleOnline ()
 
virtual void idleOnline ()
 
virtual void send (std::string _cardNo, std::string _commandID, std::string _moduleNo, std::string _selectID, std::string _parameter, std::string _numberOfLines)
 This method send the command string to the electronic. More...
 
virtual void send (std::string _cardNo, std::string _commandID, std::string _moduleNo, std::string _selectID, std::string _parameter, std::string _numberOfLines)
 This method send the command string to the electronic. More...
 
virtual void send (std::string _cardNo, std::string _commandID, std::string _moduleNo, std::string _selectID, std::string _parameter, std::string _numberOfLines)
 This method send the command string to the electronic. More...
 
virtual std::string receive ()
 This method was requested by Lorenzo Busoni (lbuso.nosp@m.ni@a.nosp@m.rcetr.nosp@m.i.as.nosp@m.tro.i.nosp@m.t 02.03.2012) More...
 
virtual std::string receive ()
 This method was requested by Lorenzo Busoni (lbuso.nosp@m.ni@a.nosp@m.rcetr.nosp@m.i.as.nosp@m.tro.i.nosp@m.t 02.03.2012) More...
 
virtual std::string receive ()
 This method was requested by Lorenzo Busoni (lbuso.nosp@m.ni@a.nosp@m.rcetr.nosp@m.i.as.nosp@m.tro.i.nosp@m.t 02.03.2012) More...
 
virtual std::string receiveDataRaw (std::string _cardNo, std::string _commandID, std::string _moduleNo, std::string _numberOfLines)
 This method was requested by Lorenzo Busoni (lbuso.nosp@m.ni@a.nosp@m.rcetr.nosp@m.i.as.nosp@m.tro.i.nosp@m.t 02.03.2012) More...
 
virtual std::string receiveDataRaw (std::string _cardNo, std::string _commandID, std::string _moduleNo, std::string _numberOfLines)
 This method was requested by Lorenzo Busoni (lbuso.nosp@m.ni@a.nosp@m.rcetr.nosp@m.i.as.nosp@m.tro.i.nosp@m.t 02.03.2012) More...
 
virtual std::string receiveDataRaw (std::string _cardNo, std::string _commandID, std::string _moduleNo, std::string _numberOfLines)
 This method was requested by Lorenzo Busoni (lbuso.nosp@m.ni@a.nosp@m.rcetr.nosp@m.i.as.nosp@m.tro.i.nosp@m.t 02.03.2012) More...
 
virtual bool isReachable ()
 
virtual bool isReachable ()
 
virtual bool isReachable ()
 
virtual void dumpStatusInformation ()
 
virtual void dumpStatusInformation ()
 
virtual void dumpStatusInformation ()
 
virtual void stop ()
 This method stop all moving motors smoothly. More...
 
virtual void stop ()
 This method stop all moving motors smoothly. More...
 
virtual void stop ()
 This method stop all moving motors smoothly. More...
 
virtual void abort ()
 This method abort all moving motors immediately. More...
 
virtual void abort ()
 This method abort all moving motors immediately. More...
 
virtual void abort ()
 This method abort all moving motors immediately. More...
 
virtual void moveAbsolute (IfSvcType _pos, std::string _unit)
 All motors of a device move to the absolute position. More...
 
virtual void moveAbsolute (IfSvcType _pos, std::string _unit)
 All motors of a device move to the absolute position. More...
 
virtual void moveAbsolute (IfSvcType _pos, std::string _unit)
 All motors of a device move to the absolute position. More...
 
virtual void moveRelative (IfSvcType _pos, std::string _unit)
 All motors of a device move to the relative position. More...
 
virtual void moveRelative (IfSvcType _pos, std::string _unit)
 All motors of a device move to the relative position. More...
 
virtual void moveRelative (IfSvcType _pos, std::string _unit)
 All motors of a device move to the relative position. More...
 
virtual void moveToHomeSingle (int _motor)
 
virtual void moveToHomeSingle (int _motor)
 
virtual void moveToHomeSingle (int _motor)
 
virtual void moveToLimit (IfSvcType _limit)
 move all motors to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More...
 
virtual void moveToLimit (IfSvcType _limit)
 move all motors to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More...
 
virtual void moveToLimit (IfSvcType _limit)
 move all motors to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More...
 
virtual bool isAtHome ()
 This method updates the property VAR.ATHOME which indicates whether the motor is at the home position. More...
 
virtual bool isAtHome ()
 This method updates the property VAR.ATHOME which indicates whether the motor is at the home position. More...
 
virtual bool isAtHome ()
 This method updates the property VAR.ATHOME which indicates whether the motor is at the home position. More...
 
virtual bool isAtLimit ()
 This method updates the property VAR.LIMIT which indicates whether the motor is at the limit position. More...
 
virtual bool isAtLimit ()
 This method updates the property VAR.LIMIT which indicates whether the motor is at the limit position. More...
 
virtual bool isAtLimit ()
 This method updates the property VAR.LIMIT which indicates whether the motor is at the limit position. More...
 
virtual bool isMoving ()
 This method updates the property VAR.MOVING which indicates whether the motor is moving. More...
 
virtual bool isMoving ()
 This method updates the property VAR.MOVING which indicates whether the motor is moving. More...
 
virtual bool isMoving ()
 This method updates the property VAR.MOVING which indicates whether the motor is moving. More...
 
virtual Nice::Int getPosition (std::string _unit)
 
virtual Nice::Int getPosition (std::string _unit)
 
virtual Nice::Int getPosition (std::string _unit)
 
virtual Nice::Int getDeviceEncoderPosition (std::string _unit)
 Returns the current device internal position encoder of all motors. More...
 
virtual Nice::Int getDeviceEncoderPosition (std::string _unit)
 Returns the current device internal position encoder of all motors. More...
 
virtual Nice::Int getDeviceEncoderPosition (std::string _unit)
 Returns the current device internal position encoder of all motors. More...
 
virtual Nice::Int getAbsoluteEncoderPosition ()
 Returns the current absolute encoder positions of all motors. More...
 
virtual Nice::Int getAbsoluteEncoderPosition ()
 Returns the current absolute encoder positions of all motors. More...
 
virtual Nice::Int getAbsoluteEncoderPosition ()
 Returns the current absolute encoder positions of all motors. More...
 
virtual Nice::Int getIncrementalEncoderPosition ()
 Returns the current incremental encoder positions of all motors. More...
 
virtual Nice::Int getIncrementalEncoderPosition ()
 Returns the current incremental encoder positions of all motors. More...
 
virtual Nice::Int getIncrementalEncoderPosition ()
 Returns the current incremental encoder positions of all motors. More...
 
virtual void setPosition (IfSvcType _position, std::string _unit)
 Change the absolute position of all motors. More...
 
virtual void setPosition (IfSvcType _position, std::string _unit)
 Change the absolute position of all motors. More...
 
virtual void setPosition (IfSvcType _position, std::string _unit)
 Change the absolute position of all motors. More...
 
virtual Nice::Int getNamedPosition (int _reference)
 This method returns the value of the named position. More...
 
virtual Nice::Int getNamedPosition (int _reference)
 This method returns the value of the named position. More...
 
virtual Nice::Int getNamedPosition (int _reference)
 This method returns the value of the named position. More...
 
virtual double getVelocity ()
 This method read the velocity of the device. More...
 
virtual double getVelocity ()
 This method read the velocity of the device. More...
 
virtual double getVelocity ()
 This method read the velocity of the device. More...
 
virtual void setVelocity (IfDevType _velocity)
 This method set the velocity in the device. More...
 
virtual void setVelocity (IfDevType _velocity)
 This method set the velocity in the device. More...
 
virtual void setVelocity (IfDevType _velocity)
 This method set the velocity in the device. More...
 
virtual double getCurrentTime ()
 
virtual double getCurrentTime ()
 
virtual double getCurrentTime ()
 
virtual Nice::SeqBitSet getPositionSwitchStatus ()
 : This method returns the current position switch status. More...
 
virtual Nice::SeqBitSet getPositionSwitchStatus ()
 : This method returns the current position switch status. More...
 
virtual Nice::SeqBitSet getPositionSwitchStatus ()
 : This method returns the current position switch status. More...
 
virtual void startProfile (const Nice::Date &, const Nice::NPoint &, Nice::Time, Nice::U32, Nice::U32)
 This method prepare the motor controller with a new external profile. More...
 
virtual void startProfile (const Nice::Date &, const Nice::NPoint &, Nice::Time, Nice::U32, Nice::U32)
 This method prepare the motor controller with a new external profile. More...
 
virtual void startProfile (const Nice::Date &, const Nice::NPoint &, Nice::Time, Nice::U32, Nice::U32)
 This method prepare the motor controller with a new external profile. More...
 
virtual void changeProfile (const Nice::Date &, const Nice::NPoint &)
 
virtual void changeProfile (const Nice::Date &, const Nice::NPoint &)
 
virtual void changeProfile (const Nice::Date &, const Nice::NPoint &)
 
- Public Member Functions inherited from Basda::MoccaWheelServiceWorkerSkeleton
 MoccaWheelServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
virtual ~MoccaWheelServiceWorkerSkeleton ()
 
virtual void setVelocity (double _velocity)=0
 
 MoccaWheelServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
virtual ~MoccaWheelServiceWorkerSkeleton ()
 
virtual void setVelocity (double _velocity)=0
 
- Public Member Functions inherited from Basda::ServiceWorkerSkeleton
const Nice::PropertyPtrcmd ()
 
void setCompletion (const Nice::Completion &_c)
 
void cmdStart (const std::string &_action="")
 
void cmdDone ()
 
void cmdWarning (const std::string &_l)
 
void cmdWarning (const Nice::LoggerObject &_o)
 
void cmdError (const std::string &_l)
 
void cmdError (const Nice::LoggerObject &_o)
 
void cmdError (const Nice::SeqLoggerObject &_oo)
 
void cmdPercent (Nice::Int _v)
 
void cmdAction (Nice::Int _v, const std::string &_s)
 
virtual void cmd (const Nice::Completion &_c)
 
template<typename DataType >
Nice::Completion exec (const Nice::Completion &_c, DataType &_localdata, const DataType &_indata=DataType())
 if currently online, push the state into WORKING More...
 
template<typename DataType >
void execCommand (DataType _cmd)
 
const Nice::PropertyPtrcmd ()
 
void setCompletion (const Nice::Completion &_c)
 
void cmdStart (const std::string &_action="")
 
void cmdDone ()
 
void cmdWarning (const std::string &_l)
 
void cmdWarning (const Nice::LoggerObject &_o)
 
void cmdError (const std::string &_l)
 
void cmdError (const Nice::LoggerObject &_o)
 
void cmdError (const Nice::SeqLoggerObject &_oo)
 
void cmdPercent (Nice::Int _v)
 
void cmdAction (Nice::Int _v, const std::string &_s)
 
virtual void cmd (const Nice::Completion &_c)
 
template<typename DataType >
Nice::Completion exec (const Nice::Completion &_c, DataType &_localdata, const DataType &_indata=DataType())
 
template<typename DataType >
void execCommand (DataType _cmd)
 
- Public Member Functions inherited from Basda::ServiceWorker
const Nice::JointPtrconfig ()
 
Nice::JointPtr cfg ()
 
Nice::JointPtr var ()
 
virtual const std::string & name ()
 
virtual WorkerThreadPtr worker ()
 
virtual Nice::Monitormonitor ()
 
virtual void lock ()
 
virtual void unlock ()
 
bool stateIsSettled ()
 
bool stateHasChanged ()
 
void changeState (Basda::ServiceState _state)
 change state to a new state If the state is the current state, or a negative state, do nothing. Otherwise change the "next" state in the state machine and notify all threads. More...
 
bool tryChangeState (Basda::ServiceState _state, const Nice::Time &_timeout=Nice::Time::seconds(0.0))
 change state to a new state More...
 
void waitForState (Basda::ServiceState _state)
 wait (indefinitely) until the worker has reached a spcifici state More...
 
bool timedWaitForState (Basda::ServiceState _state, const Nice::Time &_timeout)
 wait (indefinitely) until the worker has reached a specific state More...
 
bool changeStateOnlyFromTo (Basda::ServiceState _from, Basda::ServiceState _to)
 wait (indefinitely) until the worker has reached a spcifici state More...
 
Basda::ServiceState state ()
 
Basda::ServiceState stateNow ()
 
Basda::ServiceState stateNext ()
 
Basda::ServiceState stateLast ()
 
bool isTransit ()
 
bool isTerminated ()
 
const Nice::JointPtrconfig ()
 
Nice::JointPtr cfg ()
 
Nice::JointPtr var ()
 
virtual const std::string & name ()
 
virtual WorkerThreadPtr worker ()
 
virtual Nice::Monitormonitor ()
 
virtual void lock ()
 
virtual void unlock ()
 
bool stateIsSettled ()
 
bool stateHasChanged ()
 
void changeState (Basda::ServiceState _state)
 
bool tryChangeState (Basda::ServiceState _state, const Nice::Time &_timeout=Nice::Time::seconds(0.0))
 
void waitForState (Basda::ServiceState _state)
 
bool timedWaitForState (Basda::ServiceState _state, const Nice::Time &_timeout)
 
bool changeStateOnlyFromTo (Basda::ServiceState _from, Basda::ServiceState _to)
 
Basda::ServiceState state ()
 
Basda::ServiceState stateNow ()
 
Basda::ServiceState stateNext ()
 
Basda::ServiceState stateLast ()
 
bool isTransit ()
 
bool isTerminated ()
 

Protected Member Functions

virtual void status ()
 The method calls different commands in order to update the status. More...
 
virtual void status ()
 The method calls different commands in order to update the status. More...
 
- Protected Member Functions inherited from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >
virtual DeviceAsyncImpldeviceAsyncImpl ()
 
virtual DeviceAsyncImpldeviceAsyncImpl ()
 
virtual DeviceAsyncImpldeviceAsyncImpl ()
 
virtual DeviceAsyncImpldeviceCmdAsyncImpl ()
 
virtual DeviceAsyncImpldeviceCmdAsyncImpl ()
 
virtual DeviceAsyncImpldeviceCmdAsyncImpl ()
 
Nice::Point getDefaultTransformation ()
 Compose the unit transformation. More...
 
Nice::Point getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 Compose the unit transformation. More...
 
Nice::Point getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::WMatrix getDefaultTransformation ()
 
Nice::WMatrix getDefaultTransformation ()
 
Nice::W3Matrix getDefaultTransformation ()
 
Nice::W3Matrix getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::W3Matrix getDefaultTransformation ()
 
Nice::W3Matrix getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::Point getDefaultTransformation ()
 
Nice::WMatrix getDefaultTransformation ()
 
Nice::WMatrix getDefaultTransformation ()
 
- Protected Member Functions inherited from Basda::MoccaWheelServiceWorkerSkeleton
const char * isReachableNode ()
 
const char * getPositionNode ()
 
void getPositionInit (std::string _unit)
 
const char * getDeviceEncoderPositionNode ()
 
void getDeviceEncoderPositionInit (std::string _unit)
 
const char * getVelocityNode ()
 
const char * setVelocityNode ()
 
void setVelocityInit (double _velocity)
 
const char * getPositionSwitchStatusNode ()
 
const char * isAtHomeNode ()
 
const char * isMovingNode ()
 
const char * moveRelativeNode ()
 
void moveRelativeInit (Nice::Int _position, std::string _unit)
 
const char * moveAbsoluteNode ()
 
void moveAbsoluteInit (Nice::Int _position, std::string _unit)
 
const char * moveToHomeNode ()
 
const char * moveToNamedPositionNode ()
 
void moveToNamedPositionInit (int _named_position)
 
const char * scanAllReferenceSwitchesNode ()
 
const char * dumpStatusInformationNode ()
 
virtual void work ()
 
const char * isReachableNode ()
 
const char * getPositionNode ()
 
void getPositionInit (std::string _unit)
 
const char * getDeviceEncoderPositionNode ()
 
void getDeviceEncoderPositionInit (std::string _unit)
 
const char * getVelocityNode ()
 
const char * setVelocityNode ()
 
void setVelocityInit (double _velocity)
 
const char * getPositionSwitchStatusNode ()
 
const char * isAtHomeNode ()
 
const char * isMovingNode ()
 
const char * moveRelativeNode ()
 
void moveRelativeInit (Nice::Int _position, std::string _unit)
 
const char * moveAbsoluteNode ()
 
void moveAbsoluteInit (Nice::Int _position, std::string _unit)
 
const char * moveToHomeNode ()
 
const char * moveToNamedPositionNode ()
 
void moveToNamedPositionInit (int _named_position)
 
const char * scanAllReferenceSwitchesNode ()
 
const char * dumpStatusInformationNode ()
 
virtual void work ()
 
- Protected Member Functions inherited from Basda::ServiceWorkerSkeleton
 ServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
 ServiceWorkerSkeleton (const Nice::JointPtr &_config)
 
- Protected Member Functions inherited from Basda::ServiceWorker
 ServiceWorker (const Nice::JointPtr &_jointPtr)
 ctor More...
 
virtual ~ServiceWorker ()
 dtor Does nothing (in this base class) More...
 
void triggerState (const Basda::ServiceStateMachine &_state)
 change state to a new state More...
 
void sendStateStatus (const std::string &_action, int _percent)
 
void setState (Basda::ServiceState _next)
 
virtual void waitForNewState ()
 
virtual bool timedWaitForNewState (const Nice::Time &_timeout)
 
virtual void preinit ()
 
virtual void packin ()
 schedule ONLINE as the next target state. More...
 
virtual void idleStandby ()
 wait for a state change. More...
 
 ServiceWorker (const Nice::JointPtr &_jointPtr)
 
virtual ~ServiceWorker ()
 
void triggerState (const Basda::ServiceStateMachine &_state)
 
void sendStateStatus (const std::string &_action, int _percent)
 
void setState (Basda::ServiceState _next)
 
virtual void waitForNewState ()
 
virtual bool timedWaitForNewState (const Nice::Time &_timeout)
 
virtual void preinit ()
 
virtual void packin ()
 
virtual void idleStandby ()
 

Protected Attributes

WheelDeviceAsyncImpl m_wheelDeviceAsync
 
WheelDeviceCmdAsyncImpl m_wheelDeviceCmdAsync
 
- Protected Attributes inherited from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >
MoccaNDevicePtr m_device
 the object to call the xy device More...
 
DeviceAsyncImpl m_deviceAsync
 the master object ???? More...
 
DeviceCmdAsyncImpl m_deviceCmdAsync
 the call back object for the devices More...
 
SeqString m_namedPosAbsNameString
 
std::map< std::string, int > m_unitNamePrecMap
 
std::string m_basicUnit
 
int m_numberOfUnits
 
bool m_stopProfile
 
Nice::Time m_delay
 
Nice::Time m_delayDefault
 
- Protected Attributes inherited from Basda::ServiceWorkerSkeleton
Nice::Completion m_completion
 
Nice::I64 m_id
 
Nice::PropertyPtr m_cmd
 
- Protected Attributes inherited from Basda::ServiceWorker
Nice::JointPtr m_config
 
Nice::PropertyPtr m_state
 
std::string m_name
 

Private Member Functions

int searchForNamedPosition (int _namedPosition, int width, std::string _unit)
 
double optimizeAbsolutePosition (int _requestedPosition, std::string _unit)
 
int searchForNamedPosition (int _namedPosition, int width, std::string _unit)
 
double optimizeAbsolutePosition (int _requestedPosition, std::string _unit)
 

Private Attributes

std::vector< Nice::BitSetm_namedSwitches
 
Nice::SeqInt m_namedPositions
 
std::vector< Nice::BitSetm_scannedSwitches
 
std::vector< Nice::BitSetm_brokenSwitches
 
Nice::SeqInt m_scannedPositions
 
Nice::Int m_startPosition
 
Nice::Int m_positionOffset
 
bool m_scanAllReferenceSwitches
 
bool m_homeReferenceSwitchFound
 

Additional Inherited Members

- Protected Types inherited from Basda::ServiceWorker
typedef void(ServiceWorker::* ServiceWorkerMemFn) ()
 
typedef Branch BranchTable[6][6]
 
typedef IceUtil::Handle< WorkerThreadWorkerThreadPtr
 
typedef void(ServiceWorker::* ServiceWorkerMemFn) ()
 
typedef Branch BranchTable[6][6]
 
typedef IceUtil::Handle< WorkerThreadWorkerThreadPtr
 
- Static Protected Member Functions inherited from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >
static Nice::Point getDefaultTransformation ()
 
static Nice::Point getDefaultTransformation ()
 
static Nice::Point getDefaultTransformation ()
 
- Static Protected Attributes inherited from Basda::ServiceWorker
static BranchTable s_stateTable
 A table which tells which state should go via which intermediate state to a target state. The 6 states are SHUTDOWN, OFFLINE, STANDBY, ONLINE, WORKING and ERROR. The principles are that. More...
 

Detailed Description

This class is the implementation of the generic X interface.

Constructor & Destructor Documentation

◆ MoccaWheelServiceWorker() [1/2]

Basda::MoccaWheelServiceWorker::MoccaWheelServiceWorker ( const Nice::JointPtr _config,
const MoccaNDevicePtr _device 
)

Constructor.

◆ ~MoccaWheelServiceWorker() [1/2]

Basda::MoccaWheelServiceWorker::~MoccaWheelServiceWorker ( )
virtual

◆ MoccaWheelServiceWorker() [2/2]

Basda::MoccaWheelServiceWorker::MoccaWheelServiceWorker ( const Nice::JointPtr _config,
const MoccaNDevicePtr _device 
)

Constructor.

◆ ~MoccaWheelServiceWorker() [2/2]

virtual Basda::MoccaWheelServiceWorker::~MoccaWheelServiceWorker ( )
virtual

Member Function Documentation

◆ checkForNamedPosition() [1/2]

std::string Basda::MoccaWheelServiceWorker::checkForNamedPosition ( )
virtual

This method checks whether the current position is a named position.

Reimplemented from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ checkForNamedPosition() [2/2]

std::string Basda::MoccaWheelServiceWorker::checkForNamedPosition ( )
virtual

This method checks whether the current position is a named position.

Reimplemented from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ checkFullTurn() [1/2]

void Basda::MoccaWheelServiceWorker::checkFullTurn ( )

◆ checkFullTurn() [2/2]

void Basda::MoccaWheelServiceWorker::checkFullTurn ( )

◆ coordinateTransformation() [1/2]

virtual Nice::Int Basda::MoccaWheelServiceWorker::coordinateTransformation ( double  _value,
std::string  _unit 
)
inlinevirtual

This method converts the given value from steps into _unit.

The given value (in steps) will be converted in _unit based on the specified coordinate transformation.

Parameters
_valuethe position value (in steps) which has to be converted
_unitthe target unit
Returns
the absolute position in _unit

Implements Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ coordinateTransformation() [2/2]

virtual Nice::Int Basda::MoccaWheelServiceWorker::coordinateTransformation ( double  _value,
std::string  _unit 
)
inlinevirtual

This method converts the given value from steps into _unit.

The given value (in steps) will be converted in _unit based on the specified coordinate transformation.

Parameters
_valuethe position value (in steps) which has to be converted
_unitthe target unit
Returns
the absolute position in _unit

Implements Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ coordinateTransformationInverse() [1/2]

virtual double Basda::MoccaWheelServiceWorker::coordinateTransformationInverse ( Nice::Int  _value,
std::string  _unit 
)
inlinevirtual

This method converts the given value from _unit into steps.

The given value will be converted in steps based on _unit and the specified coordinate transformation.

Parameters
_valuethe position value which has to be converted
_unitthe current unit of _value
theabsolute position in steps

Implements Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ coordinateTransformationInverse() [2/2]

virtual double Basda::MoccaWheelServiceWorker::coordinateTransformationInverse ( Nice::Int  _value,
std::string  _unit 
)
inlinevirtual

This method converts the given value from _unit into steps.

The given value will be converted in steps based on _unit and the specified coordinate transformation.

Parameters
_valuethe position value which has to be converted
_unitthe current unit of _value
theabsolute position in steps

Implements Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ coordinateTranslateInverse() [1/2]

virtual double Basda::MoccaWheelServiceWorker::coordinateTranslateInverse ( Nice::Int  _value,
std::string  _unit 
)
inlinevirtual

This method converts the given value from _unit into steps.

Thereby it ignores the coordinate system offset dx.

Parameters
_valuethe relative position value which has to be converted
_unitthe current unit of _value
Returns
the relative position in steps

Implements Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ coordinateTranslateInverse() [2/2]

virtual double Basda::MoccaWheelServiceWorker::coordinateTranslateInverse ( Nice::Int  _value,
std::string  _unit 
)
inlinevirtual

This method converts the given value from _unit into steps.

Thereby it ignores the coordinate system offset dx.

Parameters
_valuethe relative position value which has to be converted
_unitthe current unit of _value
Returns
the relative position in steps

Implements Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ getPosition() [1/2]

virtual Nice::Int Basda::MoccaWheelServiceWorker::getPosition ( )
virtual

Returns the current positions of all motors.

Depending on the position auto update configuration either getDeviceEncoderPosition, getAbsoluteEncoderPosition and/or getIncrementalEncoderPosition will be called. Background of this implementation is the time critical readout of the absolute encoder.

The position auto update configuration can be done with the property

  • CFG.POSITION_AUTOUPDATE

Depending of the position report property either the device encoder position, absolute encoder position or incremental encoder position will be returned and stored in

  • VAR.POSITION

The configuration of the position report can be done in

CFG.POSITION.REPORT and CFG.POSITION.UNIT and

Parameters
_unitthe unit in which the position value should be converted
Returns
the current positions of all motors. The order of the points is corresponding to the order of the motor names in the property tree (alphabetical).

Reimplemented from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ getPosition() [2/2]

Nice::Int Basda::MoccaWheelServiceWorker::getPosition ( )
virtual

Returns the current positions of all motors.

Depending on the position auto update configuration either getDeviceEncoderPosition, getAbsoluteEncoderPosition and/or getIncrementalEncoderPosition will be called. Background of this implementation is the time critical readout of the absolute encoder.

The position auto update configuration can be done with the property

  • CFG.POSITION_AUTOUPDATE

Depending of the position report property either the device encoder position, absolute encoder position or incremental encoder position will be returned and stored in

  • VAR.POSITION

The configuration of the position report can be done in

CFG.POSITION.REPORT and CFG.POSITION.UNIT and

Parameters
_unitthe unit in which the position value should be converted
Returns
the current positions of all motors. The order of the points is corresponding to the order of the motor names in the property tree (alphabetical).

Reimplemented from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ getPositionOffset() [1/2]

Nice::Int Basda::MoccaWheelServiceWorker::getPositionOffset ( )

◆ getPositionOffset() [2/2]

Nice::Int Basda::MoccaWheelServiceWorker::getPositionOffset ( )

◆ moveAbsolute() [1/2]

virtual void Basda::MoccaWheelServiceWorker::moveAbsolute ( int  _target,
std::string  _unit 
)
virtual

◆ moveAbsolute() [2/2]

void Basda::MoccaWheelServiceWorker::moveAbsolute ( int  _target,
std::string  _unit 
)
virtual

◆ moveRelative() [1/2]

virtual void Basda::MoccaWheelServiceWorker::moveRelative ( int  _target,
std::string  _unit 
)
virtual

◆ moveRelative() [2/2]

void Basda::MoccaWheelServiceWorker::moveRelative ( int  _target,
std::string  _unit 
)
virtual

◆ moveToHome() [1/2]

void Basda::MoccaWheelServiceWorker::moveToHome ( )
virtual

◆ moveToHome() [2/2]

void Basda::MoccaWheelServiceWorker::moveToHome ( )
virtual

◆ moveToNamedPosition() [1/2]

void Basda::MoccaWheelServiceWorker::moveToNamedPosition ( int  _namedPosition)
virtual

This method allows to move the motor to a named position.

Parameters
_referencethe number of the named position

Reimplemented from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ moveToNamedPosition() [2/2]

virtual void Basda::MoccaWheelServiceWorker::moveToNamedPosition ( int  _namedPosition)
virtual

This method allows to move the motor to a named position.

Parameters
_referencethe number of the named position

Reimplemented from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ optimizeAbsolutePosition() [1/2]

double Basda::MoccaWheelServiceWorker::optimizeAbsolutePosition ( int  _requestedPosition,
std::string  _unit 
)
private

◆ optimizeAbsolutePosition() [2/2]

double Basda::MoccaWheelServiceWorker::optimizeAbsolutePosition ( int  _requestedPosition,
std::string  _unit 
)
private

◆ scanAllReferenceSwitches() [1/2]

void Basda::MoccaWheelServiceWorker::scanAllReferenceSwitches ( )
virtual

◆ scanAllReferenceSwitches() [2/2]

virtual void Basda::MoccaWheelServiceWorker::scanAllReferenceSwitches ( )
virtual

◆ scanPositionSwitches() [1/2]

void Basda::MoccaWheelServiceWorker::scanPositionSwitches ( )

◆ scanPositionSwitches() [2/2]

void Basda::MoccaWheelServiceWorker::scanPositionSwitches ( )

◆ searchForNamedPosition() [1/2]

int Basda::MoccaWheelServiceWorker::searchForNamedPosition ( int  _namedPosition,
int  width,
std::string  _unit 
)
private

◆ searchForNamedPosition() [2/2]

int Basda::MoccaWheelServiceWorker::searchForNamedPosition ( int  _namedPosition,
int  width,
std::string  _unit 
)
private

◆ status() [1/2]

virtual void Basda::MoccaWheelServiceWorker::status ( )
protectedvirtual

The method calls different commands in order to update the status.

Reimplemented from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ status() [2/2]

void Basda::MoccaWheelServiceWorker::status ( )
protectedvirtual

The method calls different commands in order to update the status.

Reimplemented from Basda::MoccaNServiceWorkerCore< double, Nice::Int, Nice::Point, MoccaWheelServiceWorkerSkeleton >.

◆ validateScannedPositionSwitches() [1/2]

void Basda::MoccaWheelServiceWorker::validateScannedPositionSwitches ( )

◆ validateScannedPositionSwitches() [2/2]

void Basda::MoccaWheelServiceWorker::validateScannedPositionSwitches ( )

Member Data Documentation

◆ m_brokenSwitches

std::vector< Nice::BitSet > Basda::MoccaWheelServiceWorker::m_brokenSwitches
private

◆ m_homeReferenceSwitchFound

bool Basda::MoccaWheelServiceWorker::m_homeReferenceSwitchFound
private

◆ m_namedPositions

Nice::SeqInt Basda::MoccaWheelServiceWorker::m_namedPositions
private

◆ m_namedSwitches

std::vector< Nice::BitSet > Basda::MoccaWheelServiceWorker::m_namedSwitches
private

◆ m_positionOffset

Nice::Int Basda::MoccaWheelServiceWorker::m_positionOffset
private

◆ m_scanAllReferenceSwitches

bool Basda::MoccaWheelServiceWorker::m_scanAllReferenceSwitches
private

◆ m_scannedPositions

Nice::SeqInt Basda::MoccaWheelServiceWorker::m_scannedPositions
private

◆ m_scannedSwitches

std::vector< Nice::BitSet > Basda::MoccaWheelServiceWorker::m_scannedSwitches
private

◆ m_startPosition

Nice::Int Basda::MoccaWheelServiceWorker::m_startPosition
private

◆ m_wheelDeviceAsync

WheelDeviceAsyncImpl Basda::MoccaWheelServiceWorker::m_wheelDeviceAsync
protected

◆ m_wheelDeviceCmdAsync

WheelDeviceCmdAsyncImpl Basda::MoccaWheelServiceWorker::m_wheelDeviceCmdAsync
protected

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