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

#include <ModuleDummyMock.h>

Inheritance diagram for Basda::WheelMoConModuleDummyMock:
Inheritance graph
Collaboration diagram for Basda::WheelMoConModuleDummyMock:
Collaboration graph

Public Member Functions

 WheelMoConModuleDummyMock (std::string _name, const Nice::JointPtr &_config)
 
virtual ~WheelMoConModuleDummyMock ()
 
void setDistanceToHomePosition (int _distance)
 
int getCommandedPositionTarget ()
 
 WheelMoConModuleDummyMock (std::string _name, const Nice::JointPtr &_config)
 
virtual ~WheelMoConModuleDummyMock ()
 
void setDistanceToHomePosition (int _distance)
 
int getCommandedPositionTarget ()
 
- Public Member Functions inherited from Basda::MoConModuleDummy
 MoConModuleDummy (std::string _name, const Nice::JointPtr &_config)
 
virtual ~MoConModuleDummy ()
 
void setBasicSettings (const SelectBasicSettings::Constant _selectID, const double _parameter)
 
With this method a value of the basic configuration can be changed. More...
 
void setBasicSettings ()
 This method sets all basic configuration with the values stored in the property tree. More...
 
void getBasicSettings ()
 This method returns the basic configuration of the motor. More...
 
void stop ()
 This method stops the motor with a deceleration. More...
 
void abort ()
 Abort the moving of the motor immediately without deceleration. More...
 
void moveToPositiveLimit ()
 The motor moves to the positive software limit switch. More...
 
void moveToLimit (const int &_limit)
 move the motor to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More...
 
virtual void moveAbsolute (const int &_position)
 The motor move to the absolute position. More...
 
virtual void moveRelative (const int &_position)
 The motor moves to the relative position. More...
 
void moveToNegativeLimit ()
 The motor moves to the negative software limit switch. More...
 
virtual void moveToHome ()
 The motor is looking for the reference positions and reset the step counter to zero. More...
 
void setExternalProfileBufferSize (const unsigned int _bufferSize, bool _extended=true)
 This method set the external buffer size. More...
 
virtual bool isMoving ()
 Checks if the motors is in motion. More...
 
bool isAtHome ()
 This method indicate whether the motor is at the home position. More...
 
bool isMotionComplete ()
 Checks if the motor has finished the motion. More...
 
void setMotionComplete (bool _complete)
 Set the MOTOR_COMPLETE flag. More...
 
int isAtLimit ()
 Checks if the motors is in limit. More...
 
virtual double getMEncPosition ()
 Returns the current position of the motor. More...
 
double getAEncPosition ()
 Returns the current position of the motor. More...
 
double getIEncPosition ()
 Returns the current positions of the motor. More...
 
double getVelocity ()
 Returns the current velocity of the motor. More...
 
void waitForEvent (Nice::Time _time, Basda::DeviceAsync &_async)
 This method wait till an event was received. More...
 
Nice::I64 getReferenceTime ()
 This method synchronize the MoCon time with the PC time. More...
 
Nice::I64 getCurrentTime ()
 This method returns the current MoCon time. More...
 
void setExternalProfileData (const unsigned int _index, const unsigned int _timeBase, const int _velocity, const int _position, const int _acceleration=0, const int _jerk=0)
 This method set the external profile data. More...
 
void setExternalProfileStart (const ValueStartMode::Constant _startMode, const Nice::Date _startTime=Nice::Date::microSeconds(-1))
 This method starts the external profile from the beginning or from the last position. More...
 
void setExternalProfileStop ()
 This method starts the external profile at a defined time. More...
 
int getExternalProfileInfo ()
 This method returns the actual index of the external profile. More...
 
Nice::Time initExternalProfile (int _frequency, unsigned int _maxSamplesPerSegment, unsigned int _minSamplesPerSegment, unsigned int _faultTolerance)
 
void clearExternalProfileBuffer ()
 This method freed the allocated memory of the external profile. More...
 
void calculateTransition (const Nice::Date &_date, const Nice::NPoint &_positionSequence)
 This method calculates the transition from one trajectory to another if a trajectory already exist. More...
 
void calculateTransition (const Nice::Date &_date, const Nice::NPoint &_positionSequence, const Nice::Time &_transitionLength)
 
unsigned int fitTrajectory ()
 This method convert the given trajectory to a motor controller profile. More...
 
void validateExternalProfile ()
 
unsigned int bufferExternalProfile ()
 
Nice::Date uploadExternalProfile ()
 This uploads the external profile data. More...
 
bool isExternalProfileDone ()
 
void uploadExternalProfile (const Nice::SeqSeqInt &_segments)
 
void setPosition (const int &_position)
 Change the absolute position of the motor. More...
 
Nice::Time getLinkTimeout ()
 This method return the TCP connection timeout. More...
 
Nice::BitSet getPositionSwitchStatus ()
 
Nice::Completion getProgress ()
 
void setChatType (Nice::ChatLinePtr _chat)
 
void setCollision (bool _collisionNegative, bool _collisionPositive)
 
void setBrokenSwitches (Nice::BitSet _brokenPositionSwitchMask, int _fromPosition, int _toPosition)
 
void setWheelPositionOffset (int _positionOffset)
 
 MoConModuleDummy (std::string _name, const Nice::JointPtr &_config)
 
virtual ~MoConModuleDummy ()
 
void setBasicSettings (const SelectBasicSettings::Constant _selectID, const double _parameter)
 
With this method a value of the basic configuration can be changed. More...
 
void setBasicSettings ()
 This method sets all basic configuration with the values stored in the property tree. More...
 
void getBasicSettings ()
 This method returns the basic configuration of the motor. More...
 
void stop ()
 This method stops the motor with a deceleration. More...
 
void abort ()
 Abort the moving of the motor immediately without deceleration. More...
 
void moveToPositiveLimit ()
 The motor moves to the positive software limit switch. More...
 
void moveToLimit (const int &_limit)
 move the motor to the positive limit switches (_limits[i]>0) or negative (_limits[i]<0) limit switches. More...
 
virtual void moveAbsolute (const int &_position)
 The motor move to the absolute position. More...
 
virtual void moveRelative (const int &_position)
 The motor moves to the relative position. More...
 
void moveToNegativeLimit ()
 The motor moves to the negative software limit switch. More...
 
virtual void moveToHome ()
 The motor is looking for the reference positions and reset the step counter to zero. More...
 
void setExternalProfileBufferSize (const unsigned int _bufferSize, bool _extended=true)
 This method set the external buffer size. More...
 
virtual bool isMoving ()
 Checks if the motors is in motion. More...
 
bool isAtHome ()
 This method indicate whether the motor is at the home position. More...
 
bool isMotionComplete ()
 Checks if the motor has finished the motion. More...
 
void setMotionComplete (bool _complete)
 Set the MOTOR_COMPLETE flag. More...
 
int isAtLimit ()
 Checks if the motors is in limit. More...
 
virtual double getMEncPosition ()
 Returns the current position of the motor. More...
 
double getAEncPosition ()
 Returns the current position of the motor. More...
 
double getIEncPosition ()
 Returns the current positions of the motor. More...
 
double getVelocity ()
 Returns the current velocity of the motor. More...
 
void waitForEvent (Nice::Time _time, Basda::DeviceAsync &_async)
 This method wait till an event was received. More...
 
Nice::I64 getReferenceTime ()
 This method synchronize the MoCon time with the PC time. More...
 
Nice::I64 getCurrentTime ()
 This method returns the current MoCon time. More...
 
void setExternalProfileData (const unsigned int _index, const unsigned int _timeBase, const int _velocity, const int _position, const int _acceleration=0, const int _jerk=0)
 This method set the external profile data. More...
 
void setExternalProfileStart (const ValueStartMode::Constant _startMode, const Nice::Date _startTime=Nice::Date::microSeconds(-1))
 This method starts the external profile from the beginning or from the last position. More...
 
void setExternalProfileStop ()
 This method starts the external profile at a defined time. More...
 
int getExternalProfileInfo ()
 This method returns the actual index of the external profile. More...
 
Nice::Time initExternalProfile (int _frequency, unsigned int _maxSamplesPerSegment, unsigned int _minSamplesPerSegment, unsigned int _faultTolerance)
 
void clearExternalProfileBuffer ()
 This method freed the allocated memory of the external profile. More...
 
void calculateTransition (const Nice::Date &_date, const Nice::NPoint &_positionSequence)
 This method calculates the transition from one trajectory to another if a trajectory already exist. More...
 
void calculateTransition (const Nice::Date &_date, const Nice::NPoint &_positionSequence, const Nice::Time &_transitionLength)
 
unsigned int fitTrajectory ()
 This method convert the given trajectory to a motor controller profile. More...
 
void validateExternalProfile ()
 
unsigned int bufferExternalProfile ()
 
Nice::Date uploadExternalProfile ()
 This uploads the external profile data. More...
 
bool isExternalProfileDone ()
 
void uploadExternalProfile (const Nice::SeqSeqInt &_segments)
 
void setPosition (const int &_position)
 Change the absolute position of the motor. More...
 
Nice::Time getLinkTimeout ()
 This method return the TCP connection timeout. More...
 
Nice::BitSet getPositionSwitchStatus ()
 
Nice::Completion getProgress ()
 
void setChatType (Nice::ChatLinePtr _chat)
 
void setCollision (bool _collisionNegative, bool _collisionPositive)
 
void setBrokenSwitches (Nice::BitSet _brokenPositionSwitchMask, int _fromPosition, int _toPosition)
 
void setWheelPositionOffset (int _positionOffset)
 

Private Attributes

Nice::SeqInt m_referencePositions
 
bool m_isMoving
 
int m_positionIndex
 

Additional Inherited Members

- Protected Types inherited from Basda::MoConModuleDummy
enum  CMDS {
  MOVETOHOME, MOVETOHOMESINGLE, MOVETOLIMIT, MOVETOPOSITIVELIMIT,
  MOVETONEGATIVELIMIT, MOVEABSOLUTE, MOVERELATIVE, STARTEXTERNALPROFILE,
  MOVETOHOME, MOVETOHOMESINGLE, MOVETOLIMIT, MOVETOPOSITIVELIMIT,
  MOVETONEGATIVELIMIT, MOVEABSOLUTE, MOVERELATIVE, STARTEXTERNALPROFILE
}
 
enum  CMDS {
  MOVETOHOME, MOVETOHOMESINGLE, MOVETOLIMIT, MOVETOPOSITIVELIMIT,
  MOVETONEGATIVELIMIT, MOVEABSOLUTE, MOVERELATIVE, STARTEXTERNALPROFILE,
  MOVETOHOME, MOVETOHOMESINGLE, MOVETOLIMIT, MOVETOPOSITIVELIMIT,
  MOVETONEGATIVELIMIT, MOVEABSOLUTE, MOVERELATIVE, STARTEXTERNALPROFILE
}
 
- Protected Member Functions inherited from Basda::MoConModuleDummy
template<typename Type >
Type checkAttribute (const std::string &_node, const std::string &_attributeName, const Type &_default)
 
void addInternalProperties ()
 This method add some internal properties like status properties. More...
 
void generateBrokenWheelSwitches ()
 
void travelRangeChanged (const Nice::Point &_p)
 
void startTimer (const Nice::Date _startDate)
 When the Date is not set (Nice::Date()) the the timer starts immediately. More...
 
template<typename Type >
Type checkAttribute (const std::string &_node, const std::string &_attributeName, const Type &_default)
 
void addInternalProperties ()
 This method add some internal properties like status properties. More...
 
void generateBrokenWheelSwitches ()
 
void travelRangeChanged (const Nice::Point &_p)
 
void startTimer (const Nice::Date _startDate)
 When the Date is not set (Nice::Date()) the the timer starts immediately. More...
 
- Protected Attributes inherited from Basda::MoConModuleDummy
std::string m_name
 
int m_cardNo
 
int m_moduleNo
 
Nice::JointPtr m_config
 
Nice::Completion m_completion
 
Nice::Timer m_timer
 
Nice::Timer m_countDown
 
Nice::Time m_duration
 
int m_maxVelocity
 
int m_minVelocity
 
int m_limit
 
bool m_collisionPositive
 
bool m_collisionNegative
 
PositionBlock m_commandedPosition
 
PositionBlock m_absEncPosition
 
PositionBlock m_incEncPosition
 
bool m_extendedProfileParamter
 member for to define buffering mode (start from the beginning or from the last position) More...
 
unsigned int m_bufferSize
 the external profile buffer size More...
 
unsigned int m_externalProfileIndexCycle
 the index of the buffer cell to store the next segment More...
 
Nice::I64 m_externalProfileStartCycle
 the cycle when the external profile started More...
 
Nice::I64 m_elapsedCyclesSinceProfileStart
 the difference between the current cycle and the m_externalProfileStartCycle (profile elapsed cycles) More...
 
Nice::I64 m_sumOfSegmentDuration
 sum of the elapsed segment duration (in cycles) since profile start More...
 
unsigned int m_externalProfileInfo
 the current index of the executed external profile segment More...
 
Nice::Time m_timeResolution
 
int m_frequency
 
Basda::MoConModuleProfile m_profile
 member for the extended external profile mode More...
 
Nice::NPoint m_positionSequence
 
Nice::NPoint m_positionSequenceBackup
 
Nice::Date m_startDate
 
Nice::Point m_travelRange
 
Nice::Time m_blockSize
 
Nice::Date m_pcReferenceDate
 
Nice::Date m_currentPcDate
 
Nice::I64 m_currentMoConClocks
 
double m_cycleTime
 
Nice::U16 m_basicResolution
 
Nice::U32 m_basicAcceleration
 
double m_accelerationPerCycle
 The basic acceleration is set during the external profile initialization, to keep the acceleration constant over the whole trajectory. More...
 
std::vector< Basda::MoConModuleProfile::Segmentm_externalProfileBuffer
 
unsigned int m_externalProfileBufferSize
 
Nice::Monitor m_monitor
 
Nice::ChatLinePtr m_chat
 
Nice::SeqSeqInt m_segments
 
unsigned int m_microsteps
 
Nice::U32 m_depth
 
Nice::SeqBitSet m_positionSwitches
 
Nice::SeqBitSet m_brokenPositionSwitchMask
 
int m_positionOffset
 
int m_correctedPositionDeviation
 
Nice::DateDummyPtr m_niceDateDummy
 

Constructor & Destructor Documentation

◆ WheelMoConModuleDummyMock() [1/2]

Basda::WheelMoConModuleDummyMock::WheelMoConModuleDummyMock ( std::string  _name,
const Nice::JointPtr _config 
)

◆ ~WheelMoConModuleDummyMock() [1/2]

Basda::WheelMoConModuleDummyMock::~WheelMoConModuleDummyMock ( )
virtual

◆ WheelMoConModuleDummyMock() [2/2]

Basda::WheelMoConModuleDummyMock::WheelMoConModuleDummyMock ( std::string  _name,
const Nice::JointPtr _config 
)

◆ ~WheelMoConModuleDummyMock() [2/2]

virtual Basda::WheelMoConModuleDummyMock::~WheelMoConModuleDummyMock ( )
virtual

Member Function Documentation

◆ getCommandedPositionTarget() [1/2]

int Basda::WheelMoConModuleDummyMock::getCommandedPositionTarget ( )

◆ getCommandedPositionTarget() [2/2]

int Basda::WheelMoConModuleDummyMock::getCommandedPositionTarget ( )

◆ setDistanceToHomePosition() [1/2]

void Basda::WheelMoConModuleDummyMock::setDistanceToHomePosition ( int  _distance)

◆ setDistanceToHomePosition() [2/2]

void Basda::WheelMoConModuleDummyMock::setDistanceToHomePosition ( int  _distance)

Member Data Documentation

◆ m_isMoving

bool Basda::WheelMoConModuleDummyMock::m_isMoving
private

◆ m_positionIndex

int Basda::WheelMoConModuleDummyMock::m_positionIndex
private

◆ m_referencePositions

Nice::SeqInt Basda::WheelMoConModuleDummyMock::m_referencePositions
private

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