TwiceAsNice  2019-02-18
Public Member Functions | List of all members
Basda::NDeviceMock Class Reference

#include <NDeviceMock.h>

Inheritance diagram for Basda::NDeviceMock:
Inheritance graph
Collaboration diagram for Basda::NDeviceMock:
Collaboration graph

Public Member Functions

 NDeviceMock (const Nice::JointPtr &_config)
 
virtual void open ()
 open device More...
 
virtual void close ()
 close device More...
 
virtual void reset (Basda::DeviceAsync &)
 reset the device More...
 
virtual void version ()
 version More...
 
virtual void init (Basda::DeviceAsync &)
 init the device More...
 
virtual void deinit (Basda::DeviceAsync &)
 deinit the device More...
 
virtual void activate (Basda::DeviceAsync &)
 activate the device More...
 
virtual void deactivate (Basda::DeviceAsync &)
 deactivate the device More...
 
virtual void moveToHome (Basda::DeviceAsync &)
 All motors of a device move to the home position. More...
 
virtual void moveToPositiveLimit (Basda::DeviceAsync &)
 All motors of a device move to the positive limit switch. More...
 
virtual void moveToNegativeLimit (Basda::DeviceAsync &)
 All motors of a device move to the negative limit switch. More...
 
virtual void moveToLimit (const Nice::NPoint &, Basda::DeviceAsync &)
 move all motors to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More...
 
virtual void stop ()
 All motors of a device stop moving. More...
 
virtual void abort ()
 All motors of a device abort the current movement. More...
 
virtual void chat (std::string, std::string, std::string, std::string, std::string, std::string, Basda::DeviceAsync &)
 This method send the command string to the electronic. More...
 
virtual std::string dontParse (Basda::DeviceAsync &)
 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, std::string, std::string, std::string, Basda::DeviceAsync &)
 
virtual bool isReachable ()
 
virtual void moveAbsolute (const Nice::NPoint &, Basda::DeviceAsync &)
 All motors of a device move to the absolute position. More...
 
virtual void moveRelative (const Nice::NPoint &, Basda::DeviceAsync &)
 All motors of a device move to the relative position. More...
 
virtual Nice::NPoint getPosition ()
 This method is deprecated and will be exchanged with getDeviceencoderPosition() More...
 
virtual Nice::NPoint getAbsoluteEncoderPosition ()
 Returns the current absolute encoder positions of all motors. More...
 
virtual Nice::NPoint getIncrementalEncoderPosition ()
 Returns the current incremental encoder positions of all motors. More...
 
virtual void setPosition (const Nice::NPoint &)
 Change the absolute position of all motors. More...
 
virtual Nice::NPoint getVelocity ()
 Returns the current velocity of all motors. More...
 
virtual void setVelocity (const Nice::NPoint &)
 
virtual bool isAtLimit (Nice::NPoint &)
 Returns the current limit switch state of all motors in a vector. More...
 
virtual bool isAtHome (Nice::BitSet &)
 This method indicate whether the motor is at the home position. More...
 
virtual bool isMoving (Nice::BitSet &)
 Returns the motion flag of all motors in a vector. More...
 
virtual Nice::NPoint getReferenceTime ()
 
virtual Nice::NPoint getCurrentTime ()
 
virtual void setExternalProfile (const Nice::SeqNPoint &, double, unsigned int, unsigned int, Basda::DeviceAsync &)
 
virtual void startExternalProfile (Nice::SeqDate, Basda::DeviceAsync &)
 
virtual void pauseExternalProfile ()
 
virtual void stopExternalProfile ()
 
virtual Nice::SeqBitSet getPositionSwitchStatus ()
 The external profile will be configured and the external profile will uploaded to the MoCon. More...
 
virtual void updateStatusInformation (Basda::DeviceAsync &)
 
 NDeviceMock (const Nice::JointPtr &_config)
 
virtual void open ()
 open device More...
 
virtual void close ()
 close device More...
 
virtual void reset (Basda::DeviceAsync &)
 reset the device More...
 
virtual void version ()
 version More...
 
virtual void init (Basda::DeviceAsync &)
 init the device More...
 
virtual void deinit (Basda::DeviceAsync &)
 deinit the device More...
 
virtual void activate (Basda::DeviceAsync &)
 activate the device More...
 
virtual void deactivate (Basda::DeviceAsync &)
 deactivate the device More...
 
virtual void moveToHome (Basda::DeviceAsync &)
 All motors of a device move to the home position. More...
 
virtual void moveToPositiveLimit (Basda::DeviceAsync &)
 All motors of a device move to the positive limit switch. More...
 
virtual void moveToNegativeLimit (Basda::DeviceAsync &)
 All motors of a device move to the negative limit switch. More...
 
virtual void moveToLimit (const Nice::NPoint &, Basda::DeviceAsync &)
 move all motors to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More...
 
virtual void stop ()
 All motors of a device stop moving. More...
 
virtual void abort ()
 All motors of a device abort the current movement. More...
 
virtual void chat (std::string, std::string, std::string, std::string, std::string, std::string, Basda::DeviceAsync &)
 This method send the command string to the electronic. More...
 
virtual std::string dontParse (Basda::DeviceAsync &)
 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, std::string, std::string, std::string, Basda::DeviceAsync &)
 
virtual bool isReachable ()
 
virtual void moveAbsolute (const Nice::NPoint &, Basda::DeviceAsync &)
 All motors of a device move to the absolute position. More...
 
virtual void moveRelative (const Nice::NPoint &, Basda::DeviceAsync &)
 All motors of a device move to the relative position. More...
 
virtual Nice::NPoint getPosition ()
 This method is deprecated and will be exchanged with getDeviceencoderPosition() More...
 
virtual Nice::NPoint getAbsoluteEncoderPosition ()
 Returns the current absolute encoder positions of all motors. More...
 
virtual Nice::NPoint getIncrementalEncoderPosition ()
 Returns the current incremental encoder positions of all motors. More...
 
virtual void setPosition (const Nice::NPoint &)
 Change the absolute position of all motors. More...
 
virtual Nice::NPoint getVelocity ()
 Returns the current velocity of all motors. More...
 
virtual void setVelocity (const Nice::NPoint &)
 
virtual bool isAtLimit (Nice::NPoint &)
 Returns the current limit switch state of all motors in a vector. More...
 
virtual bool isAtHome (Nice::BitSet &)
 This method indicate whether the motor is at the home position. More...
 
virtual bool isMoving (Nice::BitSet &)
 Returns the motion flag of all motors in a vector. More...
 
virtual Nice::NPoint getReferenceTime ()
 
virtual Nice::NPoint getCurrentTime ()
 
virtual void setExternalProfile (const Nice::SeqNPoint &, double, unsigned int, unsigned int, Basda::DeviceAsync &)
 
virtual void startExternalProfile (Nice::SeqDate, Basda::DeviceAsync &)
 
virtual void pauseExternalProfile ()
 
virtual void stopExternalProfile ()
 
virtual Nice::SeqBitSet getPositionSwitchStatus ()
 The external profile will be configured and the external profile will uploaded to the MoCon. More...
 
virtual void updateStatusInformation (Basda::DeviceAsync &)
 
- Public Member Functions inherited from Basda::MoccaNDevice
 MoccaNDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaNDevice ()
 Constructor. More...
 
virtual void prepareMoveSync (Nice::BitSet _motors)=0
 
virtual void startMoveSync ()=0
 
virtual void prepareDirectMove (const Nice::NPoint &_acceleration, const Nice::NPoint &_velocity, const Nice::NPoint &_deceleration)=0
 This method setup the acceleration anv velocity for a direct point to point move. More...
 
virtual void moveAbsoluteStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveAbsoluteWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveRelativeStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveRelativeWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual Nice::NPoint getDeviceEncoderPosition ()=0
 Returns the current device internal position encoder of all motors. More...
 
virtual Nice::SeqSeqDouble getBasicSettings ()=0
 Returns the basic settings of all motors. More...
 
virtual void setVelocitySetting (const Nice::NPoint &_velocity)=0
 Set the velocity configuration parameter of all motors. More...
 
virtual void setAccelerationSetting (const Nice::NPoint &_acceleration)=0
 Set the acceleration configuration parameter of all motors. More...
 
virtual void setDecelerationSetting (const Nice::NPoint &_deceleration)=0
 Set the deceleration configuration parameter of all motors. More...
 
virtual void setJerkSetting (const Nice::NPoint &_jerk)=0
 Set the jerk configuration parameter of all motors. More...
 
virtual void setLinkTimeout (Nice::Time _tcpConnectionTimeout)=0
 
virtual Nice::SeqTime getLinkTimeout ()=0
 
virtual void startExternalProfile (const Nice::Date &_date, const Nice::NPoint &_positionSequence, unsigned int _frequency, unsigned int _samplesPerSegment, unsigned int _faultTolerance, Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void changeExternalProfile (const Nice::Date &_date, const Nice::NPoint &_positionSequence)=0
 
virtual void prepareExternalProfile (const Nice::SeqSeqInt &_segmentsX, const Nice::SeqSeqInt &_segmentsY, Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void startExternalProfile (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void dumpStatusInformation (Basda::DeviceAsync &_asynch, bool _compareParameter=false)=0
 
virtual void setCollision (Nice::SeqPoint _collisions)=0
 
 MoccaNDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaNDevice ()
 Constructor. More...
 
virtual void prepareMoveSync (Nice::BitSet _motors)=0
 
virtual void startMoveSync ()=0
 
virtual void prepareDirectMove (const Nice::NPoint &_acceleration, const Nice::NPoint &_velocity, const Nice::NPoint &_deceleration)=0
 This method setup the acceleration anv velocity for a direct point to point move. More...
 
virtual void moveAbsoluteStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveAbsoluteWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveRelativeStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveRelativeWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual Nice::NPoint getDeviceEncoderPosition ()=0
 Returns the current device internal position encoder of all motors. More...
 
virtual Nice::SeqSeqDouble getBasicSettings ()=0
 Returns the basic settings of all motors. More...
 
virtual void setVelocitySetting (const Nice::NPoint &_velocity)=0
 Set the velocity configuration parameter of all motors. More...
 
virtual void setAccelerationSetting (const Nice::NPoint &_acceleration)=0
 Set the acceleration configuration parameter of all motors. More...
 
virtual void setDecelerationSetting (const Nice::NPoint &_deceleration)=0
 Set the deceleration configuration parameter of all motors. More...
 
virtual void setJerkSetting (const Nice::NPoint &_jerk)=0
 Set the jerk configuration parameter of all motors. More...
 
virtual void setLinkTimeout (Nice::Time _tcpConnectionTimeout)=0
 
virtual Nice::SeqTime getLinkTimeout ()=0
 
virtual void startExternalProfile (const Nice::Date &_date, const Nice::NPoint &_positionSequence, unsigned int _frequency, unsigned int _samplesPerSegment, unsigned int _faultTolerance, Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void changeExternalProfile (const Nice::Date &_date, const Nice::NPoint &_positionSequence)=0
 
virtual void prepareExternalProfile (const Nice::SeqSeqInt &_segmentsX, const Nice::SeqSeqInt &_segmentsY, Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void startExternalProfile (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void dumpStatusInformation (Basda::DeviceAsync &_asynch, bool _compareParameter=false)=0
 
virtual void setCollision (Nice::SeqPoint _collisions)=0
 
 MoccaNDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaNDevice ()
 Constructor. More...
 
virtual void prepareMoveSync (Nice::BitSet _motors)=0
 
virtual void startMoveSync ()=0
 
virtual void prepareDirectMove (const Nice::NPoint &_acceleration, const Nice::NPoint &_velocity, const Nice::NPoint &_deceleration)=0
 This method setup the acceleration anv velocity for a direct point to point move. More...
 
virtual void moveAbsoluteStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveAbsoluteWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveRelativeStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveRelativeWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual Nice::NPoint getDeviceEncoderPosition ()=0
 Returns the current device internal position encoder of all motors. More...
 
virtual Nice::SeqSeqDouble getBasicSettings ()=0
 Returns the basic settings of all motors. More...
 
virtual void setVelocitySetting (const Nice::NPoint &_velocity)=0
 Set the velocity configuration parameter of all motors. More...
 
virtual void setAccelerationSetting (const Nice::NPoint &_acceleration)=0
 Set the acceleration configuration parameter of all motors. More...
 
virtual void setDecelerationSetting (const Nice::NPoint &_deceleration)=0
 Set the deceleration configuration parameter of all motors. More...
 
virtual void setJerkSetting (const Nice::NPoint &_jerk)=0
 Set the jerk configuration parameter of all motors. More...
 
virtual void setLinkTimeout (Nice::Time _tcpConnectionTimeout)=0
 
virtual Nice::SeqTime getLinkTimeout ()=0
 
virtual void startExternalProfile (const Nice::Date &_date, const Nice::NPoint &_positionSequence, unsigned int _frequency, unsigned int _samplesPerSegment, unsigned int _faultTolerance, Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void changeExternalProfile (const Nice::Date &_date, const Nice::NPoint &_positionSequence)=0
 
virtual void prepareExternalProfile (const Nice::SeqSeqInt &_segmentsX, const Nice::SeqSeqInt &_segmentsY, Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void startExternalProfile (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void dumpStatusInformation (Basda::DeviceAsync &_asynch, bool _compareParameter=false)=0
 
virtual void setCollision (Nice::SeqPoint _collisions)=0
 
- Public Member Functions inherited from Basda::MoccaDevice
 MoccaDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaDevice ()
 
virtual void moveToHomeStart (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToHomeWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToHomeSingle (const int _index, DeviceAsync &=s_async)=0
 
virtual void moveToHomeSingleStart (int _motor, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToHomeSingleWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToPositiveLimitStart (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToPositiveLimitWait (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToNegativeLimitStart (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToNegativeLimitWait (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToLimitStart (const Nice::NPoint &_limit, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToLimitWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual Nice::Completion getProgress ()=0
 
 MoccaDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaDevice ()
 
virtual void moveToHomeStart (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToHomeWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToHomeSingle (const int _index, DeviceAsync &=s_async)=0
 
virtual void moveToHomeSingleStart (int _motor, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToHomeSingleWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToPositiveLimitStart (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToPositiveLimitWait (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToNegativeLimitStart (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToNegativeLimitWait (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToLimitStart (const Nice::NPoint &_limit, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToLimitWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual Nice::Completion getProgress ()=0
 
 MoccaDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaDevice ()
 
virtual void moveToHomeStart (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToHomeWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToHomeSingle (const int _index, DeviceAsync &=s_async)=0
 
virtual void moveToHomeSingleStart (int _motor, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToHomeSingleWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToPositiveLimitStart (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToPositiveLimitWait (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToNegativeLimitStart (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToNegativeLimitWait (Basda::DeviceAsync &_async=Basda::Device::s_async)=0
 
virtual void moveToLimitStart (const Nice::NPoint &_limit, Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual void moveToLimitWait (Basda::DeviceAsync &=Basda::Device::s_async)=0
 
virtual Nice::Completion getProgress ()=0
 
- Public Member Functions inherited from Basda::Device
 Device (const Nice::JointPtr &_config)
 constructor. This is an elementary (lazy) action which stores the name and gets configuration. More...
 
virtual ~Device ()
 destructor Does nothing More...
 
virtual void setConfig (const Nice::JointPtr &_config)
 init with config tree ptr More...
 
Nice::JointPtrconfig ()
 retrieve the property tree More...
 
std::string & name ()
 retrieve the name set at ctor time. More...
 
 Device (const Nice::JointPtr &_config)
 constructor. This is an elementary (lazy) action which stores the name and gets configuration. More...
 
virtual ~Device ()
 destructor Does nothing More...
 
virtual void setConfig (const Nice::JointPtr &_config)
 init with config tree ptr More...
 
Nice::JointPtrconfig ()
 retrieve the property tree More...
 
std::string & name ()
 retrieve the name set at ctor time. More...
 

Additional Inherited Members

- Static Public Attributes inherited from Basda::Device
static DeviceAsyncImpl s_async
 
- Protected Types inherited from Basda::MoccaDevice
enum  CMDS {
  OPEN, CLOSE, RESET, INIT,
  DEINIT, ACTIVATE, DEACTIVATE, MOVETOHOME,
  MOVETOHOMESINGLE, MOVETOLIMIT, MOVETOPOSITIVELIMIT, MOVETONEGATIVELIMIT,
  STOP, ABORT, OPEN, CLOSE,
  RESET, INIT, DEINIT, ACTIVATE,
  DEACTIVATE, MOVETOHOME, MOVETOHOMESINGLE, MOVETOLIMIT,
  MOVETOPOSITIVELIMIT, MOVETONEGATIVELIMIT, STOP, ABORT,
  OPEN, CLOSE, RESET, INIT,
  DEINIT, ACTIVATE, DEACTIVATE, MOVETOHOME,
  MOVETOHOMESINGLE, MOVETOLIMIT, MOVETOPOSITIVELIMIT, MOVETONEGATIVELIMIT,
  STOP, ABORT
}
 
enum  CMDS {
  OPEN, CLOSE, RESET, INIT,
  DEINIT, ACTIVATE, DEACTIVATE, MOVETOHOME,
  MOVETOHOMESINGLE, MOVETOLIMIT, MOVETOPOSITIVELIMIT, MOVETONEGATIVELIMIT,
  STOP, ABORT, OPEN, CLOSE,
  RESET, INIT, DEINIT, ACTIVATE,
  DEACTIVATE, MOVETOHOME, MOVETOHOMESINGLE, MOVETOLIMIT,
  MOVETOPOSITIVELIMIT, MOVETONEGATIVELIMIT, STOP, ABORT,
  OPEN, CLOSE, RESET, INIT,
  DEINIT, ACTIVATE, DEACTIVATE, MOVETOHOME,
  MOVETOHOMESINGLE, MOVETOLIMIT, MOVETOPOSITIVELIMIT, MOVETONEGATIVELIMIT,
  STOP, ABORT
}
 
enum  CMDS {
  OPEN, CLOSE, RESET, INIT,
  DEINIT, ACTIVATE, DEACTIVATE, MOVETOHOME,
  MOVETOHOMESINGLE, MOVETOLIMIT, MOVETOPOSITIVELIMIT, MOVETONEGATIVELIMIT,
  STOP, ABORT, OPEN, CLOSE,
  RESET, INIT, DEINIT, ACTIVATE,
  DEACTIVATE, MOVETOHOME, MOVETOHOMESINGLE, MOVETOLIMIT,
  MOVETOPOSITIVELIMIT, MOVETONEGATIVELIMIT, STOP, ABORT,
  OPEN, CLOSE, RESET, INIT,
  DEINIT, ACTIVATE, DEACTIVATE, MOVETOHOME,
  MOVETOHOMESINGLE, MOVETOLIMIT, MOVETOPOSITIVELIMIT, MOVETONEGATIVELIMIT,
  STOP, ABORT
}
 
- Protected Attributes inherited from Basda::MoccaDevice
Nice::Completion m_completion
 
- Protected Attributes inherited from Basda::Device
Nice::JointPtr m_config
 
Nice::JointPtr m_cfg
 
Nice::JointPtr m_var
 
std::string m_name
 

Constructor & Destructor Documentation

◆ NDeviceMock() [1/2]

Basda::NDeviceMock::NDeviceMock ( const Nice::JointPtr _config)

◆ NDeviceMock() [2/2]

Basda::NDeviceMock::NDeviceMock ( const Nice::JointPtr _config)

Member Function Documentation

◆ abort() [1/2]

void Basda::NDeviceMock::abort ( )
virtual

All motors of a device abort the current movement.

Implements Basda::MoccaDevice.

◆ abort() [2/2]

virtual void Basda::NDeviceMock::abort ( )
virtual

All motors of a device abort the current movement.

Implements Basda::MoccaDevice.

◆ activate() [1/2]

virtual void Basda::NDeviceMock::activate ( Basda::DeviceAsync )
virtual

activate the device

Implements Basda::Device.

◆ activate() [2/2]

void Basda::NDeviceMock::activate ( Basda::DeviceAsync )
virtual

activate the device

Implements Basda::Device.

◆ chat() [1/2]

virtual void Basda::NDeviceMock::chat ( std::string  _cardNo,
std::string  _commandID,
std::string  _moduleNo,
std::string  _selectID,
std::string  _parameter,
std::string  _numberOfLines,
Basda::DeviceAsync _async 
)
virtual

This method send the command string to the electronic.

This method is set to public due to requests from Lorenzo Busoni. BUT THE USER OF THIS METHOD TAKE OVER THE RESPONSIBILITY OF THE CORRECT ERROR HANDLING. THE DRIVER DOES NOT HAVE THE CONTROL OVER THAT DEVICE ANY MORE.

Parameters
_commandIDthe command ID
_selectIDthe sub command ID
_cardNothe ID of the MPIA electronic card
_moduleNothe ID of the device module
_parameterthe parameter as string
_numberOfLinesthe number of lines that might be read
See also
dontParse

Implements Basda::MoccaNDevice.

◆ chat() [2/2]

void Basda::NDeviceMock::chat ( std::string  _cardNo,
std::string  _commandID,
std::string  _moduleNo,
std::string  _selectID,
std::string  _parameter,
std::string  _numberOfLines,
Basda::DeviceAsync _async 
)
virtual

This method send the command string to the electronic.

This method is set to public due to requests from Lorenzo Busoni. BUT THE USER OF THIS METHOD TAKE OVER THE RESPONSIBILITY OF THE CORRECT ERROR HANDLING. THE DRIVER DOES NOT HAVE THE CONTROL OVER THAT DEVICE ANY MORE.

Parameters
_commandIDthe command ID
_selectIDthe sub command ID
_cardNothe ID of the MPIA electronic card
_moduleNothe ID of the device module
_parameterthe parameter as string
_numberOfLinesthe number of lines that might be read
See also
dontParse

Implements Basda::MoccaNDevice.

◆ close() [1/2]

virtual void Basda::NDeviceMock::close ( )
virtual

close device

Implements Basda::Device.

◆ close() [2/2]

void Basda::NDeviceMock::close ( )
virtual

close device

Implements Basda::Device.

◆ deactivate() [1/2]

void Basda::NDeviceMock::deactivate ( Basda::DeviceAsync )
virtual

deactivate the device

Implements Basda::Device.

◆ deactivate() [2/2]

virtual void Basda::NDeviceMock::deactivate ( Basda::DeviceAsync )
virtual

deactivate the device

Implements Basda::Device.

◆ deinit() [1/2]

virtual void Basda::NDeviceMock::deinit ( Basda::DeviceAsync )
virtual

deinit the device

Implements Basda::Device.

◆ deinit() [2/2]

void Basda::NDeviceMock::deinit ( Basda::DeviceAsync )
virtual

deinit the device

Implements Basda::Device.

◆ dontParse() [1/2]

std::string Basda::NDeviceMock::dontParse ( Basda::DeviceAsync _async)
virtual

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)

It supports a direct communication with the MoCon. BUT THE USER OF THIS METHOD TAKE OVER THE RESPONSIBILITY OF THE CORRECT ERROR HANDLING. THE DRIVER DOES NOT HAVE THE CONTROL OVER THAT DEVICE ANY MORE.

Hi Martin,

that's exactly what I was thinking: The use case is (real example from our experience): we discover at the telescope that we need to continuously monitor a given property (PropA) of the MoCon (obviously because of a malfunctioning in the hardware!). Without this monitor, we will be stuck. You can add the required functionality in the Mocca adding the function getPropA: this requires 4 hours and the day is lost. The day after you are stuck because you discover that you miss PropB, and the day is lost again. As an alternative, one can add the 2 lines below in the code (with a comment: "1 10 0 = getPropA") and this requires 5 minutes. The day after one can add a similar line with 1 11 0. When you're back in Europe you implement getPropA and getPropB in Mocca and you cleanup the code removing the receiveResponseForComment

Generally speaking I think it is a safe idea to have a generic interface to access EVERY possible functionality of a device, because soon or later you'll need it. In the case of the Mocon it is quite easy, a good compromise between living dangerously and wasting too much time in the effort of a complete implementation of all the MoCon commands.

Lorenzo Busoni

Parameters
_retthe allocated memory for the command response

Implements Basda::MoccaNDevice.

◆ dontParse() [2/2]

virtual std::string Basda::NDeviceMock::dontParse ( Basda::DeviceAsync _async)
virtual

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)

It supports a direct communication with the MoCon. BUT THE USER OF THIS METHOD TAKE OVER THE RESPONSIBILITY OF THE CORRECT ERROR HANDLING. THE DRIVER DOES NOT HAVE THE CONTROL OVER THAT DEVICE ANY MORE.

Hi Martin,

that's exactly what I was thinking: The use case is (real example from our experience): we discover at the telescope that we need to continuously monitor a given property (PropA) of the MoCon (obviously because of a malfunctioning in the hardware!). Without this monitor, we will be stuck. You can add the required functionality in the Mocca adding the function getPropA: this requires 4 hours and the day is lost. The day after you are stuck because you discover that you miss PropB, and the day is lost again. As an alternative, one can add the 2 lines below in the code (with a comment: "1 10 0 = getPropA") and this requires 5 minutes. The day after one can add a similar line with 1 11 0. When you're back in Europe you implement getPropA and getPropB in Mocca and you cleanup the code removing the receiveResponseForComment

Generally speaking I think it is a safe idea to have a generic interface to access EVERY possible functionality of a device, because soon or later you'll need it. In the case of the Mocon it is quite easy, a good compromise between living dangerously and wasting too much time in the effort of a complete implementation of all the MoCon commands.

Lorenzo Busoni

Parameters
_retthe allocated memory for the command response

Implements Basda::MoccaNDevice.

◆ getAbsoluteEncoderPosition() [1/2]

Nice::NPoint Basda::NDeviceMock::getAbsoluteEncoderPosition ( )
virtual

Returns the current absolute encoder positions of all motors.

The current position of all motors might be stored in the property

  • VAR.POSITION.ABSOLUTE_ENCODER
Returns
the current positions of all motors in steps. The order of the points is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ getAbsoluteEncoderPosition() [2/2]

virtual Nice::NPoint Basda::NDeviceMock::getAbsoluteEncoderPosition ( )
virtual

Returns the current absolute encoder positions of all motors.

The current position of all motors might be stored in the property

  • VAR.POSITION.ABSOLUTE_ENCODER
Returns
the current positions of all motors in steps. The order of the points is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ getCurrentTime() [1/2]

virtual Nice::NPoint Basda::NDeviceMock::getCurrentTime ( )
virtual

Implements Basda::MoccaNDevice.

◆ getCurrentTime() [2/2]

Nice::NPoint Basda::NDeviceMock::getCurrentTime ( )
virtual

Implements Basda::MoccaNDevice.

◆ getIncrementalEncoderPosition() [1/2]

Nice::NPoint Basda::NDeviceMock::getIncrementalEncoderPosition ( )
virtual

Returns the current incremental encoder positions of all motors.

The current position of all motors might be stored in the property

  • VAR.POSITION.INCREMENTAL_ENCODER
Returns
the current positions of all motors in steps. The order of the points is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ getIncrementalEncoderPosition() [2/2]

virtual Nice::NPoint Basda::NDeviceMock::getIncrementalEncoderPosition ( )
virtual

Returns the current incremental encoder positions of all motors.

The current position of all motors might be stored in the property

  • VAR.POSITION.INCREMENTAL_ENCODER
Returns
the current positions of all motors in steps. The order of the points is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ getPosition() [1/2]

Nice::NPoint Basda::NDeviceMock::getPosition ( )
virtual

This method is deprecated and will be exchanged with getDeviceencoderPosition()

Implements Basda::MoccaNDevice.

◆ getPosition() [2/2]

virtual Nice::NPoint Basda::NDeviceMock::getPosition ( )
virtual

This method is deprecated and will be exchanged with getDeviceencoderPosition()

Implements Basda::MoccaNDevice.

◆ getPositionSwitchStatus() [1/2]

virtual Nice::SeqBitSet Basda::NDeviceMock::getPositionSwitchStatus ( )
virtual

The external profile will be configured and the external profile will uploaded to the MoCon.

Parameters
_positionSequencea vector with the profile for each motor
_timeResolutionsegmentLength / samplesPerSegment
_samplesPerSegmentsamples per segment
_maxErrorthe maximal error that the external profile can have after the conversion to a MoCon profile
_asynchthe call back object This method starts the external profile at a certain data.

The external profile can be stopped with the stop method.

Parameters
_datea vector with the start date of all motors. The order of the dates is corresponding to the order of the motor names in the property tree (alphabetical). Use the constant Basda::STAY if the motor should move.
_asynchthe call back object

Implements Basda::MoccaNDevice.

◆ getPositionSwitchStatus() [2/2]

Nice::SeqBitSet Basda::NDeviceMock::getPositionSwitchStatus ( )
virtual

The external profile will be configured and the external profile will uploaded to the MoCon.

Parameters
_positionSequencea vector with the profile for each motor
_timeResolutionsegmentLength / samplesPerSegment
_samplesPerSegmentsamples per segment
_maxErrorthe maximal error that the external profile can have after the conversion to a MoCon profile
_asynchthe call back object This method starts the external profile at a certain data.

The external profile can be stopped with the stop method.

Parameters
_datea vector with the start date of all motors. The order of the dates is corresponding to the order of the motor names in the property tree (alphabetical). Use the constant Basda::STAY if the motor should move.
_asynchthe call back object

Implements Basda::MoccaNDevice.

◆ getReferenceTime() [1/2]

virtual Nice::NPoint Basda::NDeviceMock::getReferenceTime ( )
virtual

Implements Basda::MoccaNDevice.

◆ getReferenceTime() [2/2]

Nice::NPoint Basda::NDeviceMock::getReferenceTime ( )
virtual

Implements Basda::MoccaNDevice.

◆ getVelocity() [1/2]

Nice::NPoint Basda::NDeviceMock::getVelocity ( )
virtual

Returns the current velocity of all motors.

The current velocity of all motors might be stored in the property

  • VAR.VELOCITY
Returns
a vector with the current velocity of all motors

Implements Basda::MoccaNDevice.

◆ getVelocity() [2/2]

virtual Nice::NPoint Basda::NDeviceMock::getVelocity ( )
virtual

Returns the current velocity of all motors.

The current velocity of all motors might be stored in the property

  • VAR.VELOCITY
Returns
a vector with the current velocity of all motors

Implements Basda::MoccaNDevice.

◆ init() [1/2]

void Basda::NDeviceMock::init ( Basda::DeviceAsync )
virtual

init the device

Implements Basda::Device.

◆ init() [2/2]

virtual void Basda::NDeviceMock::init ( Basda::DeviceAsync )
virtual

init the device

Implements Basda::Device.

◆ isAtHome() [1/2]

virtual bool Basda::NDeviceMock::isAtHome ( Nice::BitSet _atHome)
virtual

This method indicate whether the motor is at the home position.

Parameters
_atHomeeach flag in that Bitset indicate whether the motor is at home (true - motor is at home;). The order of the bits is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ isAtHome() [2/2]

bool Basda::NDeviceMock::isAtHome ( Nice::BitSet _atHome)
virtual

This method indicate whether the motor is at the home position.

Parameters
_atHomeeach flag in that Bitset indicate whether the motor is at home (true - motor is at home;). The order of the bits is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ isAtLimit() [1/2]

virtual bool Basda::NDeviceMock::isAtLimit ( Nice::NPoint _limit)
virtual

Returns the current limit switch state of all motors in a vector.

Returns
true if on of the motors is in the limits. The order of the limits is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ isAtLimit() [2/2]

bool Basda::NDeviceMock::isAtLimit ( Nice::NPoint _limit)
virtual

Returns the current limit switch state of all motors in a vector.

Returns
true if on of the motors is in the limits. The order of the limits is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ isMoving() [1/2]

virtual bool Basda::NDeviceMock::isMoving ( Nice::BitSet _motion)
virtual

Returns the motion flag of all motors in a vector.

Returns
true if at least one motor is in motion. The order of the bits is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ isMoving() [2/2]

bool Basda::NDeviceMock::isMoving ( Nice::BitSet _motion)
virtual

Returns the motion flag of all motors in a vector.

Returns
true if at least one motor is in motion. The order of the bits is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ isReachable() [1/2]

bool Basda::NDeviceMock::isReachable ( )
virtual

Implements Basda::MoccaNDevice.

◆ isReachable() [2/2]

virtual bool Basda::NDeviceMock::isReachable ( )
virtual

Implements Basda::MoccaNDevice.

◆ moveAbsolute() [1/2]

void Basda::NDeviceMock::moveAbsolute ( const Nice::NPoint _positions,
Basda::DeviceAsync _async 
)
virtual

All motors of a device move to the absolute position.

Parameters
_positionsa vector containing the absolute target position in steps. The order of the points is corresponding to the order of the motor names in the property tree (alphabetical).
_asyncthe call back object

Implements Basda::MoccaNDevice.

◆ moveAbsolute() [2/2]

virtual void Basda::NDeviceMock::moveAbsolute ( const Nice::NPoint _positions,
Basda::DeviceAsync _async 
)
virtual

All motors of a device move to the absolute position.

Parameters
_positionsa vector containing the absolute target position in steps. The order of the points is corresponding to the order of the motor names in the property tree (alphabetical).
_asyncthe call back object

Implements Basda::MoccaNDevice.

◆ moveRelative() [1/2]

virtual void Basda::NDeviceMock::moveRelative ( const Nice::NPoint _positions,
Basda::DeviceAsync _async 
)
virtual

All motors of a device move to the relative position.

Parameters
_positionsa vector containing the relative target position in steps. The order of the points is corresponding to the order of the motor names in the property tree (alphabetical).
_asyncthe call back object
Todo:
change std::map<std::string, double> to Nice::NPoint

Implements Basda::MoccaNDevice.

◆ moveRelative() [2/2]

void Basda::NDeviceMock::moveRelative ( const Nice::NPoint _positions,
Basda::DeviceAsync _async 
)
virtual

All motors of a device move to the relative position.

Parameters
_positionsa vector containing the relative target position in steps. The order of the points is corresponding to the order of the motor names in the property tree (alphabetical).
_asyncthe call back object
Todo:
change std::map<std::string, double> to Nice::NPoint

Implements Basda::MoccaNDevice.

◆ moveToHome() [1/2]

void Basda::NDeviceMock::moveToHome ( Basda::DeviceAsync )
virtual

All motors of a device move to the home position.

Implements Basda::MoccaDevice.

◆ moveToHome() [2/2]

virtual void Basda::NDeviceMock::moveToHome ( Basda::DeviceAsync )
virtual

All motors of a device move to the home position.

Implements Basda::MoccaDevice.

◆ moveToLimit() [1/2]

virtual void Basda::NDeviceMock::moveToLimit ( const Nice::NPoint _limits,
Basda::DeviceAsync  
)
virtual

move all motors to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches.

The current limit switch state of all motors.

Implements Basda::MoccaDevice.

◆ moveToLimit() [2/2]

void Basda::NDeviceMock::moveToLimit ( const Nice::NPoint _limits,
Basda::DeviceAsync  
)
virtual

move all motors to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches.

The current limit switch state of all motors.

Implements Basda::MoccaDevice.

◆ moveToNegativeLimit() [1/2]

void Basda::NDeviceMock::moveToNegativeLimit ( Basda::DeviceAsync )
virtual

All motors of a device move to the negative limit switch.

Implements Basda::MoccaDevice.

◆ moveToNegativeLimit() [2/2]

virtual void Basda::NDeviceMock::moveToNegativeLimit ( Basda::DeviceAsync )
virtual

All motors of a device move to the negative limit switch.

Implements Basda::MoccaDevice.

◆ moveToPositiveLimit() [1/2]

virtual void Basda::NDeviceMock::moveToPositiveLimit ( Basda::DeviceAsync )
virtual

All motors of a device move to the positive limit switch.

Implements Basda::MoccaDevice.

◆ moveToPositiveLimit() [2/2]

void Basda::NDeviceMock::moveToPositiveLimit ( Basda::DeviceAsync )
virtual

All motors of a device move to the positive limit switch.

Implements Basda::MoccaDevice.

◆ open() [1/2]

virtual void Basda::NDeviceMock::open ( )
virtual

open device

Implements Basda::Device.

◆ open() [2/2]

void Basda::NDeviceMock::open ( )
virtual

open device

Implements Basda::Device.

◆ pauseExternalProfile() [1/2]

void Basda::NDeviceMock::pauseExternalProfile ( )
virtual

◆ pauseExternalProfile() [2/2]

virtual void Basda::NDeviceMock::pauseExternalProfile ( )
virtual

◆ receiveDataRaw() [1/2]

virtual std::string Basda::NDeviceMock::receiveDataRaw ( std::string  ,
std::string  ,
std::string  ,
std::string  ,
Basda::DeviceAsync  
)
virtual

Implements Basda::MoccaNDevice.

◆ receiveDataRaw() [2/2]

std::string Basda::NDeviceMock::receiveDataRaw ( std::string  ,
std::string  ,
std::string  ,
std::string  ,
Basda::DeviceAsync  
)
virtual

Implements Basda::MoccaNDevice.

◆ reset() [1/2]

void Basda::NDeviceMock::reset ( Basda::DeviceAsync )
virtual

reset the device

Implements Basda::Device.

◆ reset() [2/2]

virtual void Basda::NDeviceMock::reset ( Basda::DeviceAsync )
virtual

reset the device

Implements Basda::Device.

◆ setExternalProfile() [1/2]

virtual void Basda::NDeviceMock::setExternalProfile ( const Nice::SeqNPoint ,
double  ,
unsigned  int,
unsigned  int,
Basda::DeviceAsync  
)
virtual

◆ setExternalProfile() [2/2]

void Basda::NDeviceMock::setExternalProfile ( const Nice::SeqNPoint ,
double  ,
unsigned  int,
unsigned  int,
Basda::DeviceAsync  
)
virtual

◆ setPosition() [1/2]

virtual void Basda::NDeviceMock::setPosition ( const Nice::NPoint _position)
virtual

Change the absolute position of all motors.

The motor will not move, only the absolute position will be set.

Parameters
_positiona vector with the position of all motors

Implements Basda::MoccaNDevice.

◆ setPosition() [2/2]

void Basda::NDeviceMock::setPosition ( const Nice::NPoint _position)
virtual

Change the absolute position of all motors.

The motor will not move, only the absolute position will be set.

Parameters
_positiona vector with the position of all motors

Implements Basda::MoccaNDevice.

◆ setVelocity() [1/2]

virtual void Basda::NDeviceMock::setVelocity ( const Nice::NPoint )
virtual

◆ setVelocity() [2/2]

void Basda::NDeviceMock::setVelocity ( const Nice::NPoint )
virtual

◆ startExternalProfile() [1/2]

virtual void Basda::NDeviceMock::startExternalProfile ( Nice::SeqDate  ,
Basda::DeviceAsync  
)
virtual

◆ startExternalProfile() [2/2]

void Basda::NDeviceMock::startExternalProfile ( Nice::SeqDate  ,
Basda::DeviceAsync  
)
virtual

◆ stop() [1/2]

virtual void Basda::NDeviceMock::stop ( )
virtual

All motors of a device stop moving.

Implements Basda::MoccaDevice.

◆ stop() [2/2]

void Basda::NDeviceMock::stop ( )
virtual

All motors of a device stop moving.

Implements Basda::MoccaDevice.

◆ stopExternalProfile() [1/2]

void Basda::NDeviceMock::stopExternalProfile ( )
virtual

◆ stopExternalProfile() [2/2]

virtual void Basda::NDeviceMock::stopExternalProfile ( )
virtual

◆ updateStatusInformation() [1/2]

void Basda::NDeviceMock::updateStatusInformation ( Basda::DeviceAsync )
virtual

◆ updateStatusInformation() [2/2]

virtual void Basda::NDeviceMock::updateStatusInformation ( Basda::DeviceAsync )
virtual

◆ version() [1/2]

void Basda::NDeviceMock::version ( )
virtual

version

Implements Basda::Device.

◆ version() [2/2]

virtual void Basda::NDeviceMock::version ( )
virtual

version

Implements Basda::Device.


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