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

This is the Mocca Pi device, with support for N motors. More...

#include <BasdaMoccaPiNDevice.h>

Inheritance diagram for Basda::MoccaPiNDevice:
Inheritance graph
Collaboration diagram for Basda::MoccaPiNDevice:
Collaboration graph

Public Member Functions

 MoccaPiNDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaPiNDevice ()
 Destructor. More...
 
virtual void open ()
 This method might be called when the service goes in the INIT state. More...
 
virtual void close ()
 This method might be called when the service goes in the OFFLINE state. More...
 
virtual void reset (DeviceAsync &_asynch=s_async)
 This method might be called when the service will be reseted. More...
 
virtual void version ()
 This method returns the version string of the device. More...
 
virtual void init (DeviceAsync &=s_async)
 This method initialize the device and set the state to INIT. More...
 
virtual void deinit (DeviceAsync &=s_async)
 This method deinitialize the device and set the state to OFFLINE. More...
 
virtual void activate (DeviceAsync &=s_async)
 activate something More...
 
virtual void deactivate (DeviceAsync &=s_async)
 deactivate something More...
 
virtual void chat (std::string _commandID, std::string _cardNo, std::string _moduleNo, std::string _selectID, std::string _parameter, std::string _numberOfLines, DeviceAsync &=s_async)
 This method send the command string to the electronic. More...
 
virtual std::string dontParse (DeviceAsync &=s_async)
 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 _commandID, std::string _cardNo, std::string _moduleNo, std::string _numberOfLines, DeviceAsync &=s_async)
 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 void prepareMoveSync (Nice::BitSet _motors)
 
virtual void startMoveSync ()
 
void prepareDirectMove (const Nice::NPoint &_acceleration, const Nice::NPoint &_velocity, const Nice::NPoint &_deceleration)
 This method setup the acceleration anv velocity for a direct point to point move. More...
 
virtual void moveToHome (Basda::DeviceAsync &=Basda::Device::s_async)
 All motors of the device are looking for the reference positions and reset the step counter to zero. More...
 
virtual void moveToHomeStart (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToHomeWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToHomeSingle (int _motor, DeviceAsync &=s_async)
 
virtual void moveToHomeSingleStart (int _motor, DeviceAsync &=s_async)
 
virtual void moveToHomeSingleWait (DeviceAsync &=s_async)
 
virtual void moveToPositiveLimit (Basda::DeviceAsync &=Basda::Device::s_async)
 All motors of the device move to the positive software limit switch. More...
 
virtual void moveToPositiveLimitStart (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToPositiveLimitWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToNegativeLimit (Basda::DeviceAsync &=Basda::Device::s_async)
 All motors of the device move to the negative software limit switch. More...
 
virtual void moveToNegativeLimitStart (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToNegativeLimitWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToLimit (const Nice::NPoint &_limit, Basda::DeviceAsync &=Basda::Device::s_async)
 move all motors to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More...
 
virtual void moveToLimitStart (const Nice::NPoint &_limit, Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToLimitWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveAbsolute (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)
 The motors that are stored in the vector, move to the absolute position. More...
 
virtual void moveAbsoluteStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveAbsoluteWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveRelative (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)
 The motors that are stored in the vector move to the relative position. More...
 
virtual void moveRelativeStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveRelativeWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void stop ()
 This method stops the motor with a deceleration. More...
 
virtual void abort ()
 Abort the moving of the motor immediately without deceleration. More...
 
virtual Nice::NPoint getPosition ()
 Returns the current positions of all motors. More...
 
virtual Nice::NPoint getDeviceEncoderPosition ()
 Returns the current device internal position encoder of all motors. 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 &_position)
 Change the absolute position of all motors. More...
 
virtual Nice::NPoint getVelocity ()
 Returns the current velocity of all motors. More...
 
virtual Nice::SeqSeqDouble getBasicSettings ()
 Returns the basic settings of all motors. More...
 
virtual void setVelocitySetting (const Nice::NPoint &_velocity)
 Set the velocity configuration parameter of all motors. More...
 
virtual void setAccelerationSetting (const Nice::NPoint &_acceleration)
 Set the acceleration configuration parameter of all motors. More...
 
virtual void setDecelerationSetting (const Nice::NPoint &_deceleration)
 Set the deceleration configuration parameter of all motors. More...
 
virtual void setJerkSetting (const Nice::NPoint &_jerk)
 Set the jerk configuration parameter of all motors. More...
 
virtual bool isMoving (Nice::BitSet &_motion)
 Checks if one of the motors is in motion. More...
 
virtual bool isAtLimit (Nice::NPoint &_limit)
 Checks if one of the motors is in limit. More...
 
virtual bool isAtHome (Nice::BitSet &_atHome)
 This method indicate whether the motor is at the home position. More...
 
virtual void startExternalProfile (const Nice::Date &_startDate, const Nice::NPoint &_positionSequence, unsigned int _frequency, unsigned int _samplesPerSegment, unsigned int _faultTolerance, Basda::DeviceAsync &_async=Basda::Device::s_async)
 
virtual void changeExternalProfile (const Nice::Date &_date, const Nice::NPoint &_positionSequence)
 
virtual void prepareExternalProfile (const Nice::SeqSeqInt &_segmentsX, const Nice::SeqSeqInt &_segmentsY, Basda::DeviceAsync &_async)
 
virtual void startExternalProfile (Basda::DeviceAsync &_async)
 
virtual void setLinkTimeout (Nice::Time _tcpConnectionTimeout)
 The external profile will be configured and the external profile will uploaded to the MoCon. More...
 
virtual Nice::SeqTime getLinkTimeout ()
 This method returns TCP connection timeout. More...
 
virtual Nice::NPoint getReferenceTime ()
 This method synchronize the MoCon time with the PC time. More...
 
virtual Nice::NPoint getCurrentTime ()
 This method returns the current MoCon time. More...
 
virtual Nice::SeqBitSet getPositionSwitchStatus ()
 The external profile will be configured and the external profile will uploaded to the MoCon. More...
 
virtual void dumpStatusInformation (Basda::DeviceAsync &_asynch, bool _compareParameter=false)
 
virtual Nice::Completion getProgress ()
 
virtual void checkMotionError ()
 
virtual void setCollision (Nice::SeqPoint _collisions)
 
 MoccaPiNDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaPiNDevice ()
 Destructor. More...
 
virtual void open ()
 This method might be called when the service goes in the INIT state. More...
 
virtual void close ()
 This method might be called when the service goes in the OFFLINE state. More...
 
virtual void reset (DeviceAsync &_asynch=s_async)
 This method might be called when the service will be reseted. More...
 
virtual void version ()
 This method returns the version string of the device. More...
 
virtual void init (DeviceAsync &=s_async)
 This method initialize the device and set the state to INIT. More...
 
virtual void deinit (DeviceAsync &=s_async)
 This method deinitialize the device and set the state to OFFLINE. More...
 
virtual void activate (DeviceAsync &=s_async)
 activate something More...
 
virtual void deactivate (DeviceAsync &=s_async)
 deactivate something More...
 
virtual void chat (std::string _commandID, std::string _cardNo, std::string _moduleNo, std::string _selectID, std::string _parameter, std::string _numberOfLines, DeviceAsync &=s_async)
 This method send the command string to the electronic. More...
 
virtual std::string dontParse (DeviceAsync &=s_async)
 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 _commandID, std::string _cardNo, std::string _moduleNo, std::string _numberOfLines, DeviceAsync &=s_async)
 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 void prepareMoveSync (Nice::BitSet _motors)
 
virtual void startMoveSync ()
 
void prepareDirectMove (const Nice::NPoint &_acceleration, const Nice::NPoint &_velocity, const Nice::NPoint &_deceleration)
 This method setup the acceleration anv velocity for a direct point to point move. More...
 
virtual void moveToHome (Basda::DeviceAsync &=Basda::Device::s_async)
 All motors of the device are looking for the reference positions and reset the step counter to zero. More...
 
virtual void moveToHomeStart (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToHomeWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToHomeSingle (int _motor, DeviceAsync &=s_async)
 
virtual void moveToHomeSingleStart (int _motor, DeviceAsync &=s_async)
 
virtual void moveToHomeSingleWait (DeviceAsync &=s_async)
 
virtual void moveToPositiveLimit (Basda::DeviceAsync &=Basda::Device::s_async)
 All motors of the device move to the positive software limit switch. More...
 
virtual void moveToPositiveLimitStart (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToPositiveLimitWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToNegativeLimit (Basda::DeviceAsync &=Basda::Device::s_async)
 All motors of the device move to the negative software limit switch. More...
 
virtual void moveToNegativeLimitStart (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToNegativeLimitWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToLimit (const Nice::NPoint &_limit, Basda::DeviceAsync &=Basda::Device::s_async)
 move all motors to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More...
 
virtual void moveToLimitStart (const Nice::NPoint &_limit, Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveToLimitWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveAbsolute (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)
 The motors that are stored in the vector, move to the absolute position. More...
 
virtual void moveAbsoluteStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveAbsoluteWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveRelative (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)
 The motors that are stored in the vector move to the relative position. More...
 
virtual void moveRelativeStart (const Nice::NPoint &_positions, Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void moveRelativeWait (Basda::DeviceAsync &=Basda::Device::s_async)
 
virtual void stop ()
 This method stops the motor with a deceleration. More...
 
virtual void abort ()
 Abort the moving of the motor immediately without deceleration. More...
 
virtual Nice::NPoint getPosition ()
 Returns the current positions of all motors. More...
 
virtual Nice::NPoint getDeviceEncoderPosition ()
 Returns the current device internal position encoder of all motors. 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 &_position)
 Change the absolute position of all motors. More...
 
virtual Nice::NPoint getVelocity ()
 Returns the current velocity of all motors. More...
 
virtual Nice::SeqSeqDouble getBasicSettings ()
 Returns the basic settings of all motors. More...
 
virtual void setVelocitySetting (const Nice::NPoint &_velocity)
 Set the velocity configuration parameter of all motors. More...
 
virtual void setAccelerationSetting (const Nice::NPoint &_acceleration)
 Set the acceleration configuration parameter of all motors. More...
 
virtual void setDecelerationSetting (const Nice::NPoint &_deceleration)
 Set the deceleration configuration parameter of all motors. More...
 
virtual void setJerkSetting (const Nice::NPoint &_jerk)
 Set the jerk configuration parameter of all motors. More...
 
virtual bool isMoving (Nice::BitSet &_motion)
 Checks if one of the motors is in motion. More...
 
virtual bool isAtLimit (Nice::NPoint &_limit)
 Checks if one of the motors is in limit. More...
 
virtual bool isAtHome (Nice::BitSet &_atHome)
 This method indicate whether the motor is at the home position. More...
 
virtual void startExternalProfile (const Nice::Date &_startDate, const Nice::NPoint &_positionSequence, unsigned int _frequency, unsigned int _samplesPerSegment, unsigned int _faultTolerance, Basda::DeviceAsync &_async=Basda::Device::s_async)
 
virtual void changeExternalProfile (const Nice::Date &_date, const Nice::NPoint &_positionSequence)
 
virtual void prepareExternalProfile (const Nice::SeqSeqInt &_segmentsX, const Nice::SeqSeqInt &_segmentsY, Basda::DeviceAsync &_async)
 
virtual void startExternalProfile (Basda::DeviceAsync &_async)
 
virtual void setLinkTimeout (Nice::Time _tcpConnectionTimeout)
 The external profile will be configured and the external profile will uploaded to the MoCon. More...
 
virtual Nice::SeqTime getLinkTimeout ()
 This method returns TCP connection timeout. More...
 
virtual Nice::NPoint getReferenceTime ()
 This method synchronize the MoCon time with the PC time. More...
 
virtual Nice::NPoint getCurrentTime ()
 This method returns the current MoCon time. More...
 
virtual Nice::SeqBitSet getPositionSwitchStatus ()
 The external profile will be configured and the external profile will uploaded to the MoCon. More...
 
virtual void dumpStatusInformation (Basda::DeviceAsync &_asynch, bool _compareParameter=false)
 
virtual Nice::Completion getProgress ()
 
virtual void checkMotionError ()
 
virtual void setCollision (Nice::SeqPoint _collisions)
 
- Public Member Functions inherited from Basda::MoccaNDevice
 MoccaNDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaNDevice ()
 Constructor. More...
 
 MoccaNDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaNDevice ()
 Constructor. More...
 
 MoccaNDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaNDevice ()
 Constructor. More...
 
- Public Member Functions inherited from Basda::MoccaDevice
 MoccaDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaDevice ()
 
 MoccaDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaDevice ()
 
 MoccaDevice (const Nice::JointPtr &_config)
 Constructor. More...
 
virtual ~MoccaDevice ()
 
- 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...
 

Private Member Functions

void completion (std::string _cmd, const Nice::NPoint &_targetPositions, Basda::DeviceAsync &_asynch)
 Calculate the completion percent. More...
 
bool isMotionComplete (Nice::BitSet &_motion)
 Checks if the motion is complete. More...
 
void checkPowerdOnFor60Sec ()
 
void Check4Error (int)
 
void read (const char *, Nice::SeqString &)
 
template<typename Type >
void read (const char *, std::vector< Type > &)
 
template<typename Type >
void read (const char *, const char *, Type &)
 
template<typename Type >
void exec (const char *, const Type &)
 
template<typename Type >
void exec (const char *, const std::vector< Type > &)
 
bool waitOnTarget (double maxdist, Basda::DeviceAsync &_asynch)
 
const char * pi_listOfAxisIds ()
 
const char * pi_position ()
 
const char * pi_velocity ()
 
const char * pi_servoState ()
 
const char * pi_negLimit ()
 
const char * pi_posLimit ()
 
const char * pi_moveAbs ()
 
const char * pi_moveRel ()
 
const char * pi_onTarget ()
 
const char * pi_stopMovement ()
 
const char * cfg_root ()
 
const char * cfg_connectstring ()
 
void setIsReachable (const bool _isReachable)
 
void completion (std::string _cmd, const Nice::NPoint &_targetPositions, Basda::DeviceAsync &_asynch)
 Calculate the completion percent. More...
 
bool isMotionComplete (Nice::BitSet &_motion)
 Checks if the motion is complete. More...
 
void checkPowerdOnFor60Sec ()
 
void Check4Error (int)
 
void read (const char *, Nice::SeqString &)
 
template<typename Type >
void read (const char *, std::vector< Type > &)
 
template<typename Type >
void read (const char *, const char *, Type &)
 
template<typename Type >
void exec (const char *, const Type &)
 
template<typename Type >
void exec (const char *, const std::vector< Type > &)
 
bool waitOnTarget (double maxdist, Basda::DeviceAsync &_asynch)
 
const char * pi_listOfAxisIds ()
 
const char * pi_position ()
 
const char * pi_velocity ()
 
const char * pi_servoState ()
 
const char * pi_negLimit ()
 
const char * pi_posLimit ()
 
const char * pi_moveAbs ()
 
const char * pi_moveRel ()
 
const char * pi_onTarget ()
 
const char * pi_stopMovement ()
 
const char * cfg_root ()
 
const char * cfg_connectstring ()
 
void setIsReachable (const bool _isReachable)
 

Private Attributes

Nice::ChatLine m_chat
 
Nice::SeqString m_axes
 
Nice::NPoint m_maxPosition
 
Nice::NPoint m_minPosition
 
Nice::NPoint m_homePosition
 
Nice::NPoint m_lastPosition
 
Nice::NPoint m_velocity
 
bool m_isReachable
 
Nice::Timer m_connectionTimer
 
Nice::Mutex m_mutex
 
double m_distance
 
Nice::Timer m_timer
 
Nice::Time m_time
 
Nice::Time m_tcpConnectionTimeout
 

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
 

Detailed Description

This is the Mocca Pi device, with support for N motors.

Author
Florian Briegel
Version
2012.01.25
Date
2012.01.25

Constructor & Destructor Documentation

◆ MoccaPiNDevice() [1/2]

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

Constructor.

The constructor gets the root node of the device as parameter like SVC.DEV.THE_DEVICE and creates a user defined motor controller device. Thereby a motor object is generated for each founded module in the property tree. The generated motor object reserves the motor to avoid a multiple access from other clients. The corresponding card object will also be generated and stored in a list.

Parameters
_configthe root node of the device which contain all modules

◆ ~MoccaPiNDevice() [1/2]

Basda::MoccaPiNDevice::~MoccaPiNDevice ( )
virtual

Destructor.

removes all created bridges

◆ MoccaPiNDevice() [2/2]

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

Constructor.

The constructor gets the root node of the device as parameter like SVC.DEV.THE_DEVICE and creates a user defined motor controller device. Thereby a motor object is generated for each founded module in the property tree. The generated motor object reserves the motor to avoid a multiple access from other clients. The corresponding card object will also be generated and stored in a list.

Parameters
_configthe root node of the device which contain all modules

◆ ~MoccaPiNDevice() [2/2]

virtual Basda::MoccaPiNDevice::~MoccaPiNDevice ( )
virtual

Destructor.

removes all created bridges

Member Function Documentation

◆ abort() [1/2]

void Basda::MoccaPiNDevice::abort ( void  )
virtual

Abort the moving of the motor immediately without deceleration.

Note
Abrupt stop of a fast running motor can leads to losing steps. The motor could be damaged too.

Implements Basda::MoccaDevice.

◆ abort() [2/2]

virtual void Basda::MoccaPiNDevice::abort ( )
virtual

Abort the moving of the motor immediately without deceleration.

Note
Abrupt stop of a fast running motor can leads to losing steps. The motor could be damaged too.

Implements Basda::MoccaDevice.

◆ activate() [1/2]

void Basda::MoccaPiNDevice::activate ( DeviceAsync = s_async)
virtual

activate something

Parameters
_asynchthe call back object
Todo:
implementation of the service activation

Implements Basda::Device.

◆ activate() [2/2]

virtual void Basda::MoccaPiNDevice::activate ( DeviceAsync = s_async)
virtual

activate something

Parameters
_asynchthe call back object
Todo:
implementation of the service activation

Implements Basda::Device.

◆ cfg_connectstring() [1/2]

const char* Basda::MoccaPiNDevice::cfg_connectstring ( )
inlineprivate

◆ cfg_connectstring() [2/2]

const char* Basda::MoccaPiNDevice::cfg_connectstring ( )
inlineprivate

◆ cfg_root() [1/2]

const char* Basda::MoccaPiNDevice::cfg_root ( )
inlineprivate

◆ cfg_root() [2/2]

const char* Basda::MoccaPiNDevice::cfg_root ( )
inlineprivate

◆ changeExternalProfile() [1/2]

virtual void Basda::MoccaPiNDevice::changeExternalProfile ( const Nice::Date _date,
const Nice::NPoint _positionSequence 
)
virtual

Implements Basda::MoccaNDevice.

◆ changeExternalProfile() [2/2]

void Basda::MoccaPiNDevice::changeExternalProfile ( const Nice::Date _date,
const Nice::NPoint _positionSequence 
)
virtual

Implements Basda::MoccaNDevice.

◆ chat() [1/2]

void Basda::MoccaPiNDevice::chat ( std::string  _commandID,
std::string  _cardNo,
std::string  _moduleNo,
std::string  _selectID,
std::string  _parameter,
std::string  _numberOfLines,
Basda::DeviceAsync = s_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
_cardNothe ID of the MPIA electronic card
_moduleNothe ID of the device module
_selectIDthe sub command ID
_parameterthe parameter as string
_numberOfLinesthe number of lines that might be read

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

Implements Basda::MoccaNDevice.

◆ chat() [2/2]

virtual void Basda::MoccaPiNDevice::chat ( std::string  _commandID,
std::string  _cardNo,
std::string  _moduleNo,
std::string  _selectID,
std::string  _parameter,
std::string  _numberOfLines,
DeviceAsync = s_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
_cardNothe ID of the MPIA electronic card
_moduleNothe ID of the device module
_selectIDthe sub command ID
_parameterthe parameter as string
_numberOfLinesthe number of lines that might be read

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

Implements Basda::MoccaNDevice.

◆ Check4Error() [1/2]

void Basda::MoccaPiNDevice::Check4Error ( int  _rc)
private

◆ Check4Error() [2/2]

void Basda::MoccaPiNDevice::Check4Error ( int  )
private

◆ checkMotionError() [1/2]

void Basda::MoccaPiNDevice::checkMotionError ( )
virtual

◆ checkMotionError() [2/2]

virtual void Basda::MoccaPiNDevice::checkMotionError ( )
virtual

◆ checkPowerdOnFor60Sec() [1/2]

void Basda::MoccaPiNDevice::checkPowerdOnFor60Sec ( )
private

◆ checkPowerdOnFor60Sec() [2/2]

void Basda::MoccaPiNDevice::checkPowerdOnFor60Sec ( )
private

◆ close() [1/2]

virtual void Basda::MoccaPiNDevice::close ( )
virtual

This method might be called when the service goes in the OFFLINE state.

The connection to the modules will be closed.

Todo:
implementation of the OFFLINE state

Implements Basda::Device.

◆ close() [2/2]

void Basda::MoccaPiNDevice::close ( void  )
virtual

This method might be called when the service goes in the OFFLINE state.

The connection to the modules will be closed.

Todo:
implementation of the OFFLINE state

Implements Basda::Device.

◆ completion() [1/2]

void Basda::MoccaPiNDevice::completion ( std::string  _cmd,
const Nice::NPoint _targetPositions,
Basda::DeviceAsync _asynch 
)
private

Calculate the completion percent.

Parameters
_cmdthe command name which appears in the completion bar
_asynchthe call back object

◆ completion() [2/2]

void Basda::MoccaPiNDevice::completion ( std::string  _cmd,
const Nice::NPoint _targetPositions,
Basda::DeviceAsync _asynch 
)
private

Calculate the completion percent.

Parameters
_cmdthe command name which appears in the completion bar
_asynchthe call back object

◆ deactivate() [1/2]

void Basda::MoccaPiNDevice::deactivate ( DeviceAsync = s_async)
virtual

deactivate something

Parameters
_asynchthe call back object
Todo:
implementation of the service deactivation

Implements Basda::Device.

◆ deactivate() [2/2]

virtual void Basda::MoccaPiNDevice::deactivate ( DeviceAsync = s_async)
virtual

deactivate something

Parameters
_asynchthe call back object
Todo:
implementation of the service deactivation

Implements Basda::Device.

◆ deinit() [1/2]

virtual void Basda::MoccaPiNDevice::deinit ( DeviceAsync = s_async)
virtual

This method deinitialize the device and set the state to OFFLINE.

Parameters
_asynchthe call back object
Todo:
implementation of the OFFLINE state

Implements Basda::Device.

◆ deinit() [2/2]

void Basda::MoccaPiNDevice::deinit ( DeviceAsync = s_async)
virtual

This method deinitialize the device and set the state to OFFLINE.

Parameters
_asynchthe call back object
Todo:
implementation of the OFFLINE state

Implements Basda::Device.

◆ dontParse() [1/2]

std::string Basda::MoccaPiNDevice::dontParse ( Basda::DeviceAsync = s_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.

Parameters
_retthe allocated memory for the command response
See also
chat

Implements Basda::MoccaNDevice.

◆ dontParse() [2/2]

virtual std::string Basda::MoccaPiNDevice::dontParse ( DeviceAsync = s_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.

Parameters
_retthe allocated memory for the command response
See also
chat

Implements Basda::MoccaNDevice.

◆ dumpStatusInformation() [1/2]

virtual void Basda::MoccaPiNDevice::dumpStatusInformation ( Basda::DeviceAsync _asynch,
bool  _compareParameter = false 
)
virtual

Implements Basda::MoccaNDevice.

◆ dumpStatusInformation() [2/2]

void Basda::MoccaPiNDevice::dumpStatusInformation ( Basda::DeviceAsync _asynch,
bool  _compareParameter = false 
)
virtual

Implements Basda::MoccaNDevice.

◆ exec() [1/4]

template<typename Type >
void Basda::MoccaPiNDevice::exec ( const char *  _cmd,
const Type _val 
)
private

◆ exec() [2/4]

template<typename Type >
void Basda::MoccaPiNDevice::exec ( const char *  ,
const Type  
)
private

◆ exec() [3/4]

template<typename Type >
void Basda::MoccaPiNDevice::exec ( const char *  _cmd,
const std::vector< Type > &  _val 
)
private

◆ exec() [4/4]

template<typename Type >
void Basda::MoccaPiNDevice::exec ( const char *  ,
const std::vector< Type > &   
)
private

◆ getAbsoluteEncoderPosition() [1/2]

virtual Nice::NPoint Basda::MoccaPiNDevice::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]

Nice::NPoint Basda::MoccaPiNDevice::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.

◆ getBasicSettings() [1/2]

virtual Nice::SeqSeqDouble Basda::MoccaPiNDevice::getBasicSettings ( )
virtual

Returns the basic settings of all motors.

Depending of the implementation the basic settings could be: motion profile, revolution, velocity, acceleration, deceleration and jerk. Each basic settings is stored in a sequence.

Returns
a sequence of all motors with a sequence of all basic settings

Implements Basda::MoccaNDevice.

◆ getBasicSettings() [2/2]

Nice::SeqSeqDouble Basda::MoccaPiNDevice::getBasicSettings ( )
virtual

Returns the basic settings of all motors.

Depending of the implementation the basic settings could be: motion profile, revolution, velocity, acceleration, deceleration and jerk. Each basic settings is stored in a sequence.

Returns
a sequence of all motors with a sequence of all basic settings

Implements Basda::MoccaNDevice.

◆ getCurrentTime() [1/2]

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

This method returns the current MoCon time.

For each motor, that name is stored in the vector, the current MoCon cycles and the PC time will be stored.

See also
getReferenceTime()
Basda::MoConModule::getCurrentTime()

Implements Basda::MoccaNDevice.

◆ getCurrentTime() [2/2]

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

This method returns the current MoCon time.

For each motor, that name is stored in the vector, the current MoCon cycles and the PC time will be stored.

See also
getReferenceTime()
Basda::MoConModule::getCurrentTime()

Implements Basda::MoccaNDevice.

◆ getDeviceEncoderPosition() [1/2]

virtual Nice::NPoint Basda::MoccaPiNDevice::getDeviceEncoderPosition ( )
virtual

Returns the current device internal position encoder of all motors.

Some devices, like the MoCon, have an internal software encoder/position counter, which is independent from the incremental and 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.

◆ getDeviceEncoderPosition() [2/2]

Nice::NPoint Basda::MoccaPiNDevice::getDeviceEncoderPosition ( )
virtual

Returns the current device internal position encoder of all motors.

Some devices, like the MoCon, have an internal software encoder/position counter, which is independent from the incremental and 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.

◆ getIncrementalEncoderPosition() [1/2]

virtual Nice::NPoint Basda::MoccaPiNDevice::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]

Nice::NPoint Basda::MoccaPiNDevice::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.

◆ getLinkTimeout() [1/2]

virtual Nice::SeqTime Basda::MoccaPiNDevice::getLinkTimeout ( )
virtual

This method returns TCP connection timeout.

For each motor, that name is stored in the vector, the TCP connection timeout will be stored.

Returns
the TCP connection timeout

Implements Basda::MoccaNDevice.

◆ getLinkTimeout() [2/2]

Nice::SeqTime Basda::MoccaPiNDevice::getLinkTimeout ( )
virtual

This method returns TCP connection timeout.

For each motor, that name is stored in the vector, the TCP connection timeout will be stored.

Returns
the TCP connection timeout

Implements Basda::MoccaNDevice.

◆ getPosition() [1/2]

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

Returns the current positions of all motors.

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

  • VAR.POSITION

Implements Basda::MoccaNDevice.

◆ getPosition() [2/2]

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

Returns the current positions of all motors.

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

  • VAR.POSITION

Implements Basda::MoccaNDevice.

◆ getPositionSwitchStatus() [1/2]

virtual Nice::SeqBitSet Basda::MoccaPiNDevice::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::MoccaPiNDevice::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.

◆ getProgress() [1/2]

virtual Nice::Completion Basda::MoccaPiNDevice::getProgress ( )
virtual

Implements Basda::MoccaDevice.

◆ getProgress() [2/2]

Nice::Completion Basda::MoccaPiNDevice::getProgress ( )
virtual

Implements Basda::MoccaDevice.

◆ getReferenceTime() [1/2]

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

This method synchronize the MoCon time with the PC time.

For each motor, that name is stored in the vector, the current MoCon cycles and the PC time will be stored.

See also
getCurrentTime()
Basda::MoConModule::synchronizeTime()

Implements Basda::MoccaNDevice.

◆ getReferenceTime() [2/2]

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

This method synchronize the MoCon time with the PC time.

For each motor, that name is stored in the vector, the current MoCon cycles and the PC time will be stored.

See also
getCurrentTime()
Basda::MoConModule::synchronizeTime()

Implements Basda::MoccaNDevice.

◆ getVelocity() [1/2]

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

Returns the current velocity of all motors.

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

  • VAR.VELOCITY

Implements Basda::MoccaNDevice.

◆ getVelocity() [2/2]

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

Returns the current velocity of all motors.

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

  • VAR.VELOCITY

Implements Basda::MoccaNDevice.

◆ init() [1/2]

void Basda::MoccaPiNDevice::init ( DeviceAsync = s_async)
virtual

This method initialize the device and set the state to INIT.

Parameters
_asynchthe call back object
Todo:
implementation of the INIT state

Implements Basda::Device.

◆ init() [2/2]

virtual void Basda::MoccaPiNDevice::init ( DeviceAsync = s_async)
virtual

This method initialize the device and set the state to INIT.

Parameters
_asynchthe call back object
Todo:
implementation of the INIT state

Implements Basda::Device.

◆ isAtHome() [1/2]

virtual bool Basda::MoccaPiNDevice::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::MoccaPiNDevice::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::MoccaPiNDevice::isAtLimit ( Nice::NPoint _limit)
virtual

Checks if one of the motors is in limit.

This method collects the limit flags of all motors and stores it in the property:

  • VAR.LIMIT
Parameters
_limit- return a vector with all motor limit switch flags (0 - not in limit; +/-1 in software limit; +/-2 in hardware limit)
Returns
is true when the device is in the limit, false otherwise

Implements Basda::MoccaNDevice.

◆ isAtLimit() [2/2]

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

Checks if one of the motors is in limit.

This method collects the limit flags of all motors and stores it in the property:

  • VAR.LIMIT
Parameters
_limit- return a vector with all motor limit switch flags (0 - not in limit; +/-1 in software limit; +/-2 in hardware limit)
Returns
is true when the device is in the limit, false otherwise

Implements Basda::MoccaNDevice.

◆ isMotionComplete() [1/2]

bool Basda::MoccaPiNDevice::isMotionComplete ( Nice::BitSet _motion)
private

Checks if the motion is complete.

This method collect the MOTION_COMPLETE flags of all motors.

The following property will indicate the motion completeness

  • VAR.MOTION_COMPLETE
Parameters
_motionreturns which motor is in motion
Returns
true if all motor have completed its motion

◆ isMotionComplete() [2/2]

bool Basda::MoccaPiNDevice::isMotionComplete ( Nice::BitSet _motion)
private

Checks if the motion is complete.

This method collect the MOTION_COMPLETE flags of all motors.

The following property will indicate the motion completeness

  • VAR.MOTION_COMPLETE
Parameters
_motionreturns which motor is in motion
Returns
true if all motor have completed its motion

◆ isMoving() [1/2]

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

Checks if one of the motors is in motion.

The method collects the motion flag of every motor and stores it in the property

  • VAR.MOVING
Parameters
_motionreturns which motor is in motion
Returns
true if at least one motor is in motion

Implements Basda::MoccaNDevice.

◆ isMoving() [2/2]

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

Checks if one of the motors is in motion.

The method collects the motion flag of every motor and stores it in the property

  • VAR.MOVING
Parameters
_motionreturns which motor is in motion
Returns
true if at least one motor is in motion

Implements Basda::MoccaNDevice.

◆ isReachable() [1/2]

bool Basda::MoccaPiNDevice::isReachable ( )
virtual

Implements Basda::MoccaNDevice.

◆ isReachable() [2/2]

virtual bool Basda::MoccaPiNDevice::isReachable ( )
virtual

Implements Basda::MoccaNDevice.

◆ moveAbsolute() [1/2]

virtual void Basda::MoccaPiNDevice::moveAbsolute ( const Nice::NPoint _positions,
Basda::DeviceAsync = Basda::Device::s_async 
)
virtual

The motors that are stored in the vector, move to the absolute position.

Parameters
_positionsare the target positions of type Nice::NPoint whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical).
_asynchthe call back object

Implements Basda::MoccaNDevice.

◆ moveAbsolute() [2/2]

void Basda::MoccaPiNDevice::moveAbsolute ( const Nice::NPoint _positions,
Basda::DeviceAsync _asynch = Basda::Device::s_async 
)
virtual

The motors that are stored in the vector, move to the absolute position.

Parameters
_positionsare the target positions of type Nice::NPoint whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical).
_asynchthe call back object

Implements Basda::MoccaNDevice.

◆ moveAbsoluteStart() [1/2]

void Basda::MoccaPiNDevice::moveAbsoluteStart ( const Nice::NPoint _positions,
Basda::DeviceAsync = Basda::Device::s_async 
)
virtual

Implements Basda::MoccaNDevice.

◆ moveAbsoluteStart() [2/2]

virtual void Basda::MoccaPiNDevice::moveAbsoluteStart ( const Nice::NPoint _positions,
Basda::DeviceAsync = Basda::Device::s_async 
)
virtual

Implements Basda::MoccaNDevice.

◆ moveAbsoluteWait() [1/2]

void Basda::MoccaPiNDevice::moveAbsoluteWait ( Basda::DeviceAsync _asynch = Basda::Device::s_async)
virtual

Implements Basda::MoccaNDevice.

◆ moveAbsoluteWait() [2/2]

virtual void Basda::MoccaPiNDevice::moveAbsoluteWait ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaNDevice.

◆ moveRelative() [1/2]

virtual void Basda::MoccaPiNDevice::moveRelative ( const Nice::NPoint _positions,
Basda::DeviceAsync = Basda::Device::s_async 
)
virtual

The motors that are stored in the vector move to the relative position.

Parameters
_positionsare the target positions of type Nice::NPoint whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical).
_asynchthe call back object

Implements Basda::MoccaNDevice.

◆ moveRelative() [2/2]

void Basda::MoccaPiNDevice::moveRelative ( const Nice::NPoint _positions,
Basda::DeviceAsync _asynch = Basda::Device::s_async 
)
virtual

The motors that are stored in the vector move to the relative position.

Parameters
_positionsare the target positions of type Nice::NPoint whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical).
_asynchthe call back object

Implements Basda::MoccaNDevice.

◆ moveRelativeStart() [1/2]

void Basda::MoccaPiNDevice::moveRelativeStart ( const Nice::NPoint _positions,
Basda::DeviceAsync = Basda::Device::s_async 
)
virtual

Implements Basda::MoccaNDevice.

◆ moveRelativeStart() [2/2]

virtual void Basda::MoccaPiNDevice::moveRelativeStart ( const Nice::NPoint _positions,
Basda::DeviceAsync = Basda::Device::s_async 
)
virtual

Implements Basda::MoccaNDevice.

◆ moveRelativeWait() [1/2]

void Basda::MoccaPiNDevice::moveRelativeWait ( Basda::DeviceAsync _asynch = Basda::Device::s_async)
virtual

Implements Basda::MoccaNDevice.

◆ moveRelativeWait() [2/2]

virtual void Basda::MoccaPiNDevice::moveRelativeWait ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaNDevice.

◆ moveToHome() [1/2]

void Basda::MoccaPiNDevice::moveToHome ( Basda::DeviceAsync _asynch = Basda::Device::s_async)
virtual

All motors of the device are looking for the reference positions and reset the step counter to zero.

Parameters
_asynchthe call back object

Implements Basda::MoccaDevice.

◆ moveToHome() [2/2]

virtual void Basda::MoccaPiNDevice::moveToHome ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

All motors of the device are looking for the reference positions and reset the step counter to zero.

Parameters
_asynchthe call back object

Implements Basda::MoccaDevice.

◆ moveToHomeSingle() [1/2]

void Basda::MoccaPiNDevice::moveToHomeSingle ( int  _motor,
Basda::DeviceAsync _asynch = s_async 
)
virtual

Implements Basda::MoccaDevice.

◆ moveToHomeSingle() [2/2]

virtual void Basda::MoccaPiNDevice::moveToHomeSingle ( int  _motor,
DeviceAsync = s_async 
)
virtual

Implements Basda::MoccaDevice.

◆ moveToHomeSingleStart() [1/2]

void Basda::MoccaPiNDevice::moveToHomeSingleStart ( int  _motor,
Basda::DeviceAsync _asynch = s_async 
)
virtual

Implements Basda::MoccaDevice.

◆ moveToHomeSingleStart() [2/2]

virtual void Basda::MoccaPiNDevice::moveToHomeSingleStart ( int  _motor,
DeviceAsync = s_async 
)
virtual

Implements Basda::MoccaDevice.

◆ moveToHomeSingleWait() [1/2]

void Basda::MoccaPiNDevice::moveToHomeSingleWait ( Basda::DeviceAsync _asynch = s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToHomeSingleWait() [2/2]

virtual void Basda::MoccaPiNDevice::moveToHomeSingleWait ( DeviceAsync = s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToHomeStart() [1/2]

void Basda::MoccaPiNDevice::moveToHomeStart ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToHomeStart() [2/2]

virtual void Basda::MoccaPiNDevice::moveToHomeStart ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToHomeWait() [1/2]

void Basda::MoccaPiNDevice::moveToHomeWait ( Basda::DeviceAsync _asynch = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToHomeWait() [2/2]

virtual void Basda::MoccaPiNDevice::moveToHomeWait ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToLimit() [1/2]

virtual void Basda::MoccaPiNDevice::moveToLimit ( const Nice::NPoint _limit,
Basda::DeviceAsync = Basda::Device::s_async 
)
virtual

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

Parameters
_limita vector that contains to which limit the motors have to move (_limits[i]>0 - to positive limit) (_limits[i]<0 - to negative limit) whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical).
_asynchthe call back object

The current limit switch state of all motors.

Implements Basda::MoccaDevice.

◆ moveToLimit() [2/2]

void Basda::MoccaPiNDevice::moveToLimit ( const Nice::NPoint _limit,
Basda::DeviceAsync _asynch = Basda::Device::s_async 
)
virtual

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

Parameters
_limita vector that contains to which limit the motors have to move (_limits[i]>0 - to positive limit) (_limits[i]<0 - to negative limit) whereas the order of the points is corresponding to the order of the motor names in the property tree (alphabetical).
_asynchthe call back object

The current limit switch state of all motors.

Implements Basda::MoccaDevice.

◆ moveToLimitStart() [1/2]

virtual void Basda::MoccaPiNDevice::moveToLimitStart ( const Nice::NPoint _limit,
Basda::DeviceAsync = Basda::Device::s_async 
)
virtual

Implements Basda::MoccaDevice.

◆ moveToLimitStart() [2/2]

void Basda::MoccaPiNDevice::moveToLimitStart ( const Nice::NPoint _limit,
Basda::DeviceAsync = Basda::Device::s_async 
)
virtual

Implements Basda::MoccaDevice.

◆ moveToLimitWait() [1/2]

virtual void Basda::MoccaPiNDevice::moveToLimitWait ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToLimitWait() [2/2]

void Basda::MoccaPiNDevice::moveToLimitWait ( Basda::DeviceAsync _asynch = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToNegativeLimit() [1/2]

void Basda::MoccaPiNDevice::moveToNegativeLimit ( Basda::DeviceAsync _asynch = Basda::Device::s_async)
virtual

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

The idea of this method is that the motors move to the negative software limit switch.

Parameters
_asynchthe call back object
Todo:
implementation

Implements Basda::MoccaDevice.

◆ moveToNegativeLimit() [2/2]

virtual void Basda::MoccaPiNDevice::moveToNegativeLimit ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

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

The idea of this method is that the motors move to the negative software limit switch.

Parameters
_asynchthe call back object
Todo:
implementation

Implements Basda::MoccaDevice.

◆ moveToNegativeLimitStart() [1/2]

void Basda::MoccaPiNDevice::moveToNegativeLimitStart ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToNegativeLimitStart() [2/2]

virtual void Basda::MoccaPiNDevice::moveToNegativeLimitStart ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToNegativeLimitWait() [1/2]

virtual void Basda::MoccaPiNDevice::moveToNegativeLimitWait ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToNegativeLimitWait() [2/2]

void Basda::MoccaPiNDevice::moveToNegativeLimitWait ( Basda::DeviceAsync _asynch = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToPositiveLimit() [1/2]

void Basda::MoccaPiNDevice::moveToPositiveLimit ( Basda::DeviceAsync _asynch = Basda::Device::s_async)
virtual

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

The idea of this method is that the motors move to the positive software limit switch.

Parameters
_asynchthe call back object
Todo:
implementation

Implements Basda::MoccaDevice.

◆ moveToPositiveLimit() [2/2]

virtual void Basda::MoccaPiNDevice::moveToPositiveLimit ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

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

The idea of this method is that the motors move to the positive software limit switch.

Parameters
_asynchthe call back object
Todo:
implementation

Implements Basda::MoccaDevice.

◆ moveToPositiveLimitStart() [1/2]

virtual void Basda::MoccaPiNDevice::moveToPositiveLimitStart ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToPositiveLimitStart() [2/2]

void Basda::MoccaPiNDevice::moveToPositiveLimitStart ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToPositiveLimitWait() [1/2]

void Basda::MoccaPiNDevice::moveToPositiveLimitWait ( Basda::DeviceAsync _asynch = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ moveToPositiveLimitWait() [2/2]

virtual void Basda::MoccaPiNDevice::moveToPositiveLimitWait ( Basda::DeviceAsync = Basda::Device::s_async)
virtual

Implements Basda::MoccaDevice.

◆ open() [1/2]

void Basda::MoccaPiNDevice::open ( void  )
virtual

This method might be called when the service goes in the INIT state.

It connects to all motor controller.

Implements Basda::Device.

◆ open() [2/2]

virtual void Basda::MoccaPiNDevice::open ( )
virtual

This method might be called when the service goes in the INIT state.

It connects to all motor controller.

Implements Basda::Device.

◆ pi_listOfAxisIds() [1/2]

const char* Basda::MoccaPiNDevice::pi_listOfAxisIds ( )
inlineprivate

◆ pi_listOfAxisIds() [2/2]

const char* Basda::MoccaPiNDevice::pi_listOfAxisIds ( )
inlineprivate

◆ pi_moveAbs() [1/2]

const char* Basda::MoccaPiNDevice::pi_moveAbs ( )
inlineprivate

◆ pi_moveAbs() [2/2]

const char* Basda::MoccaPiNDevice::pi_moveAbs ( )
inlineprivate

◆ pi_moveRel() [1/2]

const char* Basda::MoccaPiNDevice::pi_moveRel ( )
inlineprivate

◆ pi_moveRel() [2/2]

const char* Basda::MoccaPiNDevice::pi_moveRel ( )
inlineprivate

◆ pi_negLimit() [1/2]

const char* Basda::MoccaPiNDevice::pi_negLimit ( )
inlineprivate

◆ pi_negLimit() [2/2]

const char* Basda::MoccaPiNDevice::pi_negLimit ( )
inlineprivate

◆ pi_onTarget() [1/2]

const char* Basda::MoccaPiNDevice::pi_onTarget ( )
inlineprivate

◆ pi_onTarget() [2/2]

const char* Basda::MoccaPiNDevice::pi_onTarget ( )
inlineprivate

◆ pi_position() [1/2]

const char* Basda::MoccaPiNDevice::pi_position ( )
inlineprivate

◆ pi_position() [2/2]

const char* Basda::MoccaPiNDevice::pi_position ( )
inlineprivate

◆ pi_posLimit() [1/2]

const char* Basda::MoccaPiNDevice::pi_posLimit ( )
inlineprivate

◆ pi_posLimit() [2/2]

const char* Basda::MoccaPiNDevice::pi_posLimit ( )
inlineprivate

◆ pi_servoState() [1/2]

const char* Basda::MoccaPiNDevice::pi_servoState ( )
inlineprivate

◆ pi_servoState() [2/2]

const char* Basda::MoccaPiNDevice::pi_servoState ( )
inlineprivate

◆ pi_stopMovement() [1/2]

const char* Basda::MoccaPiNDevice::pi_stopMovement ( )
inlineprivate

◆ pi_stopMovement() [2/2]

const char* Basda::MoccaPiNDevice::pi_stopMovement ( )
inlineprivate

◆ pi_velocity() [1/2]

const char* Basda::MoccaPiNDevice::pi_velocity ( )
inlineprivate

◆ pi_velocity() [2/2]

const char* Basda::MoccaPiNDevice::pi_velocity ( )
inlineprivate

◆ prepareDirectMove() [1/2]

void Basda::MoccaPiNDevice::prepareDirectMove ( const Nice::NPoint _acceleration,
const Nice::NPoint _velocity,
const Nice::NPoint _deceleration 
)
virtual

This method setup the acceleration anv velocity for a direct point to point move.

Parameters
_acceleration
_velocity
_deceleration

Implements Basda::MoccaNDevice.

◆ prepareDirectMove() [2/2]

void Basda::MoccaPiNDevice::prepareDirectMove ( const Nice::NPoint _acceleration,
const Nice::NPoint _velocity,
const Nice::NPoint _deceleration 
)
virtual

This method setup the acceleration anv velocity for a direct point to point move.

Parameters
_acceleration
_velocity
_deceleration

Implements Basda::MoccaNDevice.

◆ prepareExternalProfile() [1/2]

virtual void Basda::MoccaPiNDevice::prepareExternalProfile ( const Nice::SeqSeqInt _segmentsX,
const Nice::SeqSeqInt _segmentsY,
Basda::DeviceAsync _async 
)
virtual

Implements Basda::MoccaNDevice.

◆ prepareExternalProfile() [2/2]

void Basda::MoccaPiNDevice::prepareExternalProfile ( const Nice::SeqSeqInt _segmentsX,
const Nice::SeqSeqInt _segmentsY,
Basda::DeviceAsync _async 
)
virtual

Implements Basda::MoccaNDevice.

◆ prepareMoveSync() [1/2]

virtual void Basda::MoccaPiNDevice::prepareMoveSync ( Nice::BitSet  _motors)
virtual

Implements Basda::MoccaNDevice.

◆ prepareMoveSync() [2/2]

void Basda::MoccaPiNDevice::prepareMoveSync ( Nice::BitSet  _motors)
virtual

Implements Basda::MoccaNDevice.

◆ read() [1/6]

void Basda::MoccaPiNDevice::read ( const char *  _cmd,
Nice::SeqString _val 
)
private

◆ read() [2/6]

void Basda::MoccaPiNDevice::read ( const char *  ,
Nice::SeqString  
)
private

◆ read() [3/6]

template<typename Type >
void Basda::MoccaPiNDevice::read ( const char *  ,
std::vector< Type > &   
)
private

◆ read() [4/6]

template<typename Type >
void Basda::MoccaPiNDevice::read ( const char *  _cmd,
std::vector< Type > &  _val 
)
private

◆ read() [5/6]

template<typename Type >
void Basda::MoccaPiNDevice::read ( const char *  ,
const char *  ,
Type  
)
private

◆ read() [6/6]

template<typename Type >
void Basda::MoccaPiNDevice::read ( const char *  ,
const char *  ,
Type  
)
private

◆ receiveDataRaw() [1/2]

virtual std::string Basda::MoccaPiNDevice::receiveDataRaw ( std::string  _commandID,
std::string  _cardNo,
std::string  _moduleNo,
std::string  _numberOfLines,
DeviceAsync = s_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 without to parse the response. 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 which is defined in the CommandIDs.h
_cardNothe card number
_moduleNothe module number
_retthe allocated space for the returned data
_numberOfLinesoptional: This parameter imitates how many data should be read from the Ethernet buffer. All data are read if the value is -1.
Returns
the return parameter is stored in _ret parameter.
See also
chat

Implements Basda::MoccaNDevice.

◆ receiveDataRaw() [2/2]

std::string Basda::MoccaPiNDevice::receiveDataRaw ( std::string  _commandID,
std::string  _cardNo,
std::string  _moduleNo,
std::string  _numberOfLines,
Basda::DeviceAsync = s_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 without to parse the response. 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 which is defined in the CommandIDs.h
_cardNothe card number
_moduleNothe module number
_retthe allocated space for the returned data
_numberOfLinesoptional: This parameter imitates how many data should be read from the Ethernet buffer. All data are read if the value is -1.
Returns
the return parameter is stored in _ret parameter.
See also
chat

Implements Basda::MoccaNDevice.

◆ reset() [1/2]

virtual void Basda::MoccaPiNDevice::reset ( DeviceAsync _asynch = s_async)
virtual

This method might be called when the service will be reseted.

The connection to the modules will be closed and opened again.

Parameters
_asynchthe call back object
Todo:
implementation to reset the service

Implements Basda::Device.

◆ reset() [2/2]

void Basda::MoccaPiNDevice::reset ( DeviceAsync _asynch = s_async)
virtual

This method might be called when the service will be reseted.

The connection to the modules will be closed and opened again.

Parameters
_asynchthe call back object
Todo:
implementation to reset the service

Implements Basda::Device.

◆ setAccelerationSetting() [1/2]

virtual void Basda::MoccaPiNDevice::setAccelerationSetting ( const Nice::NPoint _acceleration)
virtual

Set the acceleration configuration parameter of all motors.

Parameters
_accelerationa vector with the acceleration of all motors. The order of the accelerations is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ setAccelerationSetting() [2/2]

void Basda::MoccaPiNDevice::setAccelerationSetting ( const Nice::NPoint _acceleration)
virtual

Set the acceleration configuration parameter of all motors.

Parameters
_accelerationa vector with the acceleration of all motors. The order of the accelerations is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ setCollision() [1/2]

void Basda::MoccaPiNDevice::setCollision ( Nice::SeqPoint  _collisions)
virtual

Implements Basda::MoccaNDevice.

◆ setCollision() [2/2]

virtual void Basda::MoccaPiNDevice::setCollision ( Nice::SeqPoint  _collisions)
virtual

Implements Basda::MoccaNDevice.

◆ setDecelerationSetting() [1/2]

void Basda::MoccaPiNDevice::setDecelerationSetting ( const Nice::NPoint _deceleration)
virtual

Set the deceleration configuration parameter of all motors.

Parameters
_decelerationa vector with the deceleration of all motors. The order of the decelerations is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ setDecelerationSetting() [2/2]

virtual void Basda::MoccaPiNDevice::setDecelerationSetting ( const Nice::NPoint _deceleration)
virtual

Set the deceleration configuration parameter of all motors.

Parameters
_decelerationa vector with the deceleration of all motors. The order of the decelerations is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ setIsReachable() [1/2]

void Basda::MoccaPiNDevice::setIsReachable ( const bool  _isReachable)
private

◆ setIsReachable() [2/2]

void Basda::MoccaPiNDevice::setIsReachable ( const bool  _isReachable)
private

◆ setJerkSetting() [1/2]

virtual void Basda::MoccaPiNDevice::setJerkSetting ( const Nice::NPoint _jerk)
virtual

Set the jerk configuration parameter of all motors.

Parameters
_jerka vector with the jerk of all motors. The order of the jerks is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ setJerkSetting() [2/2]

void Basda::MoccaPiNDevice::setJerkSetting ( const Nice::NPoint _jerk)
virtual

Set the jerk configuration parameter of all motors.

Parameters
_jerka vector with the jerk of all motors. The order of the jerks is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ setLinkTimeout() [1/2]

virtual void Basda::MoccaPiNDevice::setLinkTimeout ( Nice::Time  _tcpConnectionTimeout)
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
_faultTolerancethe 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.

◆ setLinkTimeout() [2/2]

void Basda::MoccaPiNDevice::setLinkTimeout ( Nice::Time  _tcpConnectionTimeout)
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
_faultTolerancethe 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.

◆ setPosition() [1/2]

virtual void Basda::MoccaPiNDevice::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::MoccaPiNDevice::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.

◆ setVelocitySetting() [1/2]

void Basda::MoccaPiNDevice::setVelocitySetting ( const Nice::NPoint _velocity)
virtual

Set the velocity configuration parameter of all motors.

Parameters
_velocitya vector with the velocity of all motors. The order of the velocities is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ setVelocitySetting() [2/2]

virtual void Basda::MoccaPiNDevice::setVelocitySetting ( const Nice::NPoint _velocity)
virtual

Set the velocity configuration parameter of all motors.

Parameters
_velocitya vector with the velocity of all motors. The order of the velocities is corresponding to the order of the motor names in the property tree (alphabetical).

Implements Basda::MoccaNDevice.

◆ startExternalProfile() [1/4]

void Basda::MoccaPiNDevice::startExternalProfile ( const Nice::Date _startDate,
const Nice::NPoint _positionSequence,
unsigned int  _frequency,
unsigned int  _samplesPerSegment,
unsigned int  _faultTolerance,
Basda::DeviceAsync _async = Basda::Device::s_async 
)
virtual

Implements Basda::MoccaNDevice.

◆ startExternalProfile() [2/4]

virtual void Basda::MoccaPiNDevice::startExternalProfile ( const Nice::Date _startDate,
const Nice::NPoint _positionSequence,
unsigned int  _frequency,
unsigned int  _samplesPerSegment,
unsigned int  _faultTolerance,
Basda::DeviceAsync _async = Basda::Device::s_async 
)
virtual

Implements Basda::MoccaNDevice.

◆ startExternalProfile() [3/4]

virtual void Basda::MoccaPiNDevice::startExternalProfile ( Basda::DeviceAsync _async)
virtual

Implements Basda::MoccaNDevice.

◆ startExternalProfile() [4/4]

void Basda::MoccaPiNDevice::startExternalProfile ( Basda::DeviceAsync _async)
virtual

Implements Basda::MoccaNDevice.

◆ startMoveSync() [1/2]

void Basda::MoccaPiNDevice::startMoveSync ( )
virtual

Implements Basda::MoccaNDevice.

◆ startMoveSync() [2/2]

virtual void Basda::MoccaPiNDevice::startMoveSync ( )
virtual

Implements Basda::MoccaNDevice.

◆ stop() [1/2]

virtual void Basda::MoccaPiNDevice::stop ( )
virtual

This method stops the motor with a deceleration.

Implements Basda::MoccaDevice.

◆ stop() [2/2]

void Basda::MoccaPiNDevice::stop ( )
virtual

This method stops the motor with a deceleration.

Implements Basda::MoccaDevice.

◆ version() [1/2]

void Basda::MoccaPiNDevice::version ( void  )
virtual

This method returns the version string of the device.

Todo:
implementation of the version string

Implements Basda::Device.

◆ version() [2/2]

virtual void Basda::MoccaPiNDevice::version ( )
virtual

This method returns the version string of the device.

Todo:
implementation of the version string

Implements Basda::Device.

◆ waitOnTarget() [1/2]

bool Basda::MoccaPiNDevice::waitOnTarget ( double  maxdist,
Basda::DeviceAsync _asynch 
)
private

◆ waitOnTarget() [2/2]

bool Basda::MoccaPiNDevice::waitOnTarget ( double  maxdist,
Basda::DeviceAsync _asynch 
)
private

Member Data Documentation

◆ m_axes

Nice::SeqString Basda::MoccaPiNDevice::m_axes
private

◆ m_chat

Nice::ChatLine Basda::MoccaPiNDevice::m_chat
private

◆ m_connectionTimer

Nice::Timer Basda::MoccaPiNDevice::m_connectionTimer
private

◆ m_distance

double Basda::MoccaPiNDevice::m_distance
private

◆ m_homePosition

Nice::NPoint Basda::MoccaPiNDevice::m_homePosition
private

◆ m_isReachable

bool Basda::MoccaPiNDevice::m_isReachable
private

◆ m_lastPosition

Nice::NPoint Basda::MoccaPiNDevice::m_lastPosition
private

◆ m_maxPosition

Nice::NPoint Basda::MoccaPiNDevice::m_maxPosition
private

◆ m_minPosition

Nice::NPoint Basda::MoccaPiNDevice::m_minPosition
private

◆ m_mutex

Nice::Mutex Basda::MoccaPiNDevice::m_mutex
private

◆ m_tcpConnectionTimeout

Nice::Time Basda::MoccaPiNDevice::m_tcpConnectionTimeout
private

◆ m_time

Nice::Time Basda::MoccaPiNDevice::m_time
private

◆ m_timer

Nice::Timer Basda::MoccaPiNDevice::m_timer
private

◆ m_velocity

Nice::NPoint Basda::MoccaPiNDevice::m_velocity
private

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