TwiceAsNice  2019-02-18
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Laos::DrotServiceWorkerMock Class Reference

#include <LaosDrotServiceWorkerMock.h>

Inheritance diagram for Laos::DrotServiceWorkerMock:
Inheritance graph
Collaboration diagram for Laos::DrotServiceWorkerMock:
Collaboration graph

Classes

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

Public Member Functions

 DrotServiceWorkerMock (const Nice::JointPtr &_config, const Basda::MoccaNDevicePtr &_device)
 
 ~DrotServiceWorkerMock ()
 
void setTimelapse (double _timelapse)
 
double getTimelapse ()
 
 DrotServiceWorkerMock (const Nice::JointPtr &_config, const Basda::MoccaNDevicePtr &_device)
 
 ~DrotServiceWorkerMock ()
 
void setTimelapse (double _timelapse)
 
double getTimelapse ()
 
- Public Member Functions inherited from Laos::DrotServiceWorker
 DrotServiceWorker (const Nice::JointPtr &_config, const Basda::MoccaNDevicePtr &_device)
 ctor More...
 
virtual ~DrotServiceWorker ()
 dtor Removes bridges that have been created by the ctor. More...
 
virtual void init ()
 This method initiate and open the interface. More...
 
virtual void idleOnline ()
 
virtual void changeDerotationWithAbsoluteOffset (const Nice::Date &_startPositionAbsolute, double _startPosition, std::string _unit)
 
virtual void changeDerotationWithRelativeOffset (const Nice::Date &_startPositionRelative, double _startPosition, std::string _unit)
 Change the trajectory at some time in the future by a relative amount. More...
 
virtual Nice::SeqPoint getKFPCoordinates ()
 
virtual lbto::SeqPos2 getPresetStars ()
 
bool isSlewing ()
 
bool isRotating ()
 
virtual std::string getLINCstation ()
 
virtual double getParallacticAngle ()
 
virtual void startDerotation (const Nice::Date &_startDate, double _startPosition, std::string _unit)
 Get polynomials from the TCS, move to start position, and start the derotator motion. More...
 
virtual void startTimedDerotation (const Nice::Date &_startDate, double _startPosition, Nice::Time _durat, std::string _unit)
 Get polynomials from the TCS, move to start position, and start the derotator motion. More...
 
virtual void startDerotationHere (const Nice::Date &_startDate)
 Get polynomials from the TCS and start the derotator motion. The difference to startDerotation() is that this function does not move the motor to any particular position but starts from where it is. The function is not overloading startDerotation() because this allows to have them both exposed to the Basda/ICE interface. More...
 
virtual void rewind (Nice::Time _durat, bool _go, Nice::Time _delay)
 Move to the position where the previous derotation started and restart derotation. More...
 
virtual double convertPosition (double _position, bool _absolute, std::string _unitFrom, std::string _unitTo)
 
virtual void transformationFactorChanged (const Nice::Any &_a)
 called automatically whenever the transformation property has changed. More...
 
virtual double coordinateTransformation (double _value, std::string _unit)
 This method converts the given absolute value from steps into _unit. Thereby it uses dx to add the coordinate system offset. More...
 
virtual double coordinateTransformationInverse (double _value, std::string _unit)
 Converts the given absolute value from _unit into steps. More...
 
virtual double coordinateTranslateInverse (double _value, std::string _unit)
 Convert the given value from _unit into steps. Thereby it ignores the coordinate system offset dx. More...
 
virtual double coordinateTranslate (double _value, std::string _unit)
 Convert the given value from steps into _unit. Thereby it ignores the coordinate system offset dx. More...
 
virtual std::string getRA ()
 ask the LN proxy IIF server for the right ascension. More...
 
Nice::Time timeLeft ()
 Get an estimate of the time that is left on the trajectory. More...
 
Nice::Time timeLeft (int frequency, double _startPosition, std::string _unit, bool trunc)
 Get an estimate of the time that is left on the trajectory till hitting the limit switch. More...
 
 DrotServiceWorker (const Nice::JointPtr &_config, const Basda::MoccaNDevicePtr &_device)
 
virtual ~DrotServiceWorker ()
 
virtual void init ()
 This method initiate and open the interface. More...
 
virtual void idleOnline ()
 
virtual void changeDerotationWithAbsoluteOffset (const Nice::Date &_startPositionAbsolute, double _startPosition, std::string _unit)
 
virtual void changeDerotationWithRelativeOffset (const Nice::Date &_startPositionRelative, double _startPosition, std::string _unit)
 
virtual Nice::SeqPoint getKFPCoordinates ()
 
virtual lbto::SeqPos2 getPresetStars ()
 
bool isSlewing ()
 
bool isRotating ()
 
virtual std::string getLINCstation ()
 
virtual double getParallacticAngle ()
 
virtual void startDerotation (const Nice::Date &_startDate, double _startPosition, std::string _unit)
 
virtual void startTimedDerotation (const Nice::Date &_startDate, double _startPosition, Nice::Time _durat, std::string _unit)
 
virtual void startDerotationHere (const Nice::Date &_startDate)
 
virtual void rewind (Nice::Time _durat, bool _go, Nice::Time _delay)
 
virtual double convertPosition (double _position, bool _absolute, std::string _unitFrom, std::string _unitTo)
 
virtual void transformationFactorChanged (const Nice::Any &_a)
 
virtual double coordinateTransformation (double _value, std::string _unit)
 This method converts the given value from steps into _unit. More...
 
virtual double coordinateTransformationInverse (double _value, std::string _unit)
 This method converts the given value from _unit into steps. More...
 
virtual double coordinateTranslateInverse (double _value, std::string _unit)
 This method converts the given value from _unit into steps. More...
 
virtual double coordinateTranslate (double _value, std::string _unit)
 
virtual std::string getRA ()
 
Nice::Time timeLeft ()
 
Nice::Time timeLeft (int frequency, double _startPosition, std::string _unit, bool trunc)
 
- Public Member Functions inherited from Basda::MoccaNServiceWorkerCore< double, double, Nice::Point, DrotServiceWorkerSkeleton >
 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 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 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 moveToHome ()
 All motors of the device are looking for the reference positions and reset the step counter to zero. More...
 
virtual void moveToHome ()
 All motors of the device are looking for the reference positions and reset the step counter to zero. More...
 
virtual void moveToHome ()
 All motors of the device are looking for the reference positions and reset the step counter to zero. 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 void moveToNamedPosition (int _namedPosition)
 This method allows to move the motor to a named position. More...
 
virtual void moveToNamedPosition (int _namedPosition)
 This method allows to move the motor to a named position. More...
 
virtual void moveToNamedPosition (int _namedPosition)
 This method allows to move the motor to a named 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 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 double getPosition ()
 Returns the current positions of all motors. More...
 
virtual double getPosition (std::string _unit)
 
virtual double getPosition ()
 Returns the current positions of all motors. More...
 
virtual double getPosition (std::string _unit)
 
virtual double getPosition ()
 Returns the current positions of all motors. More...
 
virtual double getPosition (std::string _unit)
 
virtual double getDeviceEncoderPosition (std::string _unit)
 Returns the current device internal position encoder of all motors. More...
 
virtual double getDeviceEncoderPosition (std::string _unit)
 Returns the current device internal position encoder of all motors. More...
 
virtual double getDeviceEncoderPosition (std::string _unit)
 Returns the current device internal position encoder of all motors. More...
 
virtual double getAbsoluteEncoderPosition ()
 Returns the current absolute encoder positions of all motors. More...
 
virtual double getAbsoluteEncoderPosition ()
 Returns the current absolute encoder positions of all motors. More...
 
virtual double getAbsoluteEncoderPosition ()
 Returns the current absolute encoder positions of all motors. More...
 
virtual double getIncrementalEncoderPosition ()
 Returns the current incremental encoder positions of all motors. More...
 
virtual double getIncrementalEncoderPosition ()
 Returns the current incremental encoder positions of all motors. More...
 
virtual double 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 double getNamedPosition (int _reference)
 This method returns the value of the named position. More...
 
virtual double getNamedPosition (int _reference)
 This method returns the value of the named position. More...
 
virtual double getNamedPosition (int _reference)
 This method returns the value of the named position. More...
 
virtual std::string checkForNamedPosition ()
 This method checks whether the current position is a named position. More...
 
virtual std::string checkForNamedPosition ()
 This method checks whether the current position is a named position. More...
 
virtual std::string checkForNamedPosition ()
 This method checks whether the current position is a 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 &)
 

Protected Member Functions

virtual DeviceAsyncImpl & deviceAsyncImpl ()
 
virtual DeviceAsyncImpl & deviceCmdAsyncImpl ()
 
virtual DeviceAsyncImpl & deviceAsyncImpl ()
 
virtual DeviceAsyncImpl & deviceCmdAsyncImpl ()
 
- Protected Member Functions inherited from Basda::MoccaNServiceWorkerCore< double, double, Nice::Point, DrotServiceWorkerSkeleton >
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...
 
virtual void status ()
 The method calls different commands in order to update the status. More...
 
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 Attributes

double m_timelapse
 
DeviceAsyncImplMock m_deviceAsyncMock
 
DeviceCmdAsyncImplMock m_deviceCmdAsyncMock
 
- Protected Attributes inherited from Basda::MoccaNServiceWorkerCore< double, double, Nice::Point, DrotServiceWorkerSkeleton >
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
 

Additional Inherited Members

- Static Protected Member Functions inherited from Basda::MoccaNServiceWorkerCore< double, double, Nice::Point, DrotServiceWorkerSkeleton >
static Nice::Point getDefaultTransformation ()
 
static Nice::Point getDefaultTransformation ()
 
static Nice::Point getDefaultTransformation ()
 

Constructor & Destructor Documentation

◆ DrotServiceWorkerMock() [1/2]

Laos::DrotServiceWorkerMock::DrotServiceWorkerMock ( const Nice::JointPtr _config,
const Basda::MoccaNDevicePtr _device 
)

◆ ~DrotServiceWorkerMock() [1/2]

Laos::DrotServiceWorkerMock::~DrotServiceWorkerMock ( )

◆ DrotServiceWorkerMock() [2/2]

Laos::DrotServiceWorkerMock::DrotServiceWorkerMock ( const Nice::JointPtr _config,
const Basda::MoccaNDevicePtr _device 
)

◆ ~DrotServiceWorkerMock() [2/2]

Laos::DrotServiceWorkerMock::~DrotServiceWorkerMock ( )

Member Function Documentation

◆ deviceAsyncImpl() [1/2]

virtual DeviceAsyncImpl& Laos::DrotServiceWorkerMock::deviceAsyncImpl ( )
inlineprotectedvirtual

◆ deviceAsyncImpl() [2/2]

virtual DeviceAsyncImpl& Laos::DrotServiceWorkerMock::deviceAsyncImpl ( )
inlineprotectedvirtual

◆ deviceCmdAsyncImpl() [1/2]

virtual DeviceAsyncImpl& Laos::DrotServiceWorkerMock::deviceCmdAsyncImpl ( )
inlineprotectedvirtual

◆ deviceCmdAsyncImpl() [2/2]

virtual DeviceAsyncImpl& Laos::DrotServiceWorkerMock::deviceCmdAsyncImpl ( )
inlineprotectedvirtual

◆ getTimelapse() [1/2]

double Laos::DrotServiceWorkerMock::getTimelapse ( )

◆ getTimelapse() [2/2]

double Laos::DrotServiceWorkerMock::getTimelapse ( )

◆ setTimelapse() [1/2]

void Laos::DrotServiceWorkerMock::setTimelapse ( double  _timelapse)

◆ setTimelapse() [2/2]

void Laos::DrotServiceWorkerMock::setTimelapse ( double  _timelapse)

Member Data Documentation

◆ m_deviceAsyncMock

DeviceAsyncImplMock Laos::DrotServiceWorkerMock::m_deviceAsyncMock
protected

◆ m_deviceCmdAsyncMock

DeviceCmdAsyncImplMock Laos::DrotServiceWorkerMock::m_deviceCmdAsyncMock
protected

◆ m_timelapse

double Laos::DrotServiceWorkerMock::m_timelapse
protected

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