TwiceAsNice
2019-02-18
|
#include <LaosStarEnlarger.h>
Public Member Functions | |
StarEnlarger (const std::string _name, const Nice::JointPtr &_config, const Basda::MoccaNDevicePtr &_device, const std::string _basicUnit, const std::string _basicCoordSys) | |
virtual | ~StarEnlarger () |
virtual void | open () |
virtual void | close () |
virtual void | init (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | deinit (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | activate (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | deactivate (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual int | getID () |
virtual Nice::SeqString | getConnectionAddress () |
virtual Nice::SeqInt | getModuleNumber () |
virtual Nice::SeqTime | getLinkTimeout () |
virtual bool | isReachable () |
virtual bool | isAtHome () |
virtual bool | isAtLimit () |
virtual bool | isMoving () |
virtual bool | isCfgEnabled () |
virtual void | setEnabled (bool _enabled, Nice::Point _position) |
virtual void | setCollision (Nice::BitSet _collision) |
virtual Nice::Point | getDeviceEncoderPosition (std::string _unit, std::string _coordSys) |
virtual Nice::Point | readDeviceEncoderPosition (std::string _unit, std::string _coordSys) |
virtual Nice::Point | getIncrementalEncoderPosition (std::string _unit, std::string _coordSys) |
virtual Nice::Point | readIncrementalEncoderPosition (std::string _unit, std::string _coordSys) |
virtual bool | isCurrentlyEnabled () |
virtual void | setPosition (const Nice::Point &_position, std::string _unit, std::string _coordSys) |
virtual Nice::Point | getPredictedPosition (Nice::Time &_time) |
virtual Nice::Point | getPredictedPosition (int _cycle) |
virtual void | stop () |
virtual void | abort () |
void | storeMotorConfig () |
virtual void | prepareMoveSync (Nice::BitSet _motors) |
virtual void | startMoveSync () |
virtual void | moveAbsoluteGetReady (Basda::DeviceAsync &=Basda::Device::s_async) |
The method prepares a trapezoidal point-to-point profile movement. More... | |
virtual void | moveAbsoluteStart (const Nice::Point &_position, std::string _unit, std::string _coordSys, Basda::DeviceAsync &=Basda::Device::s_async) |
Move the Star enlarger to the target position. More... | |
virtual void | moveRelativeGetReady (Basda::DeviceAsync &=Basda::Device::s_async) |
The method prepares a trapezoidal point-to-point profile movement. More... | |
virtual void | moveRelativeStart (const Nice::Point &_distance, std::string _unit, std::string _coordSys, Basda::DeviceAsync &=Basda::Device::s_async) |
Move the Star enlarger by a distance. More... | |
virtual void | moveToHomeSingleStart (const int _motor, Basda::DeviceAsync &=Basda::Device::s_async) |
Move the Star enlarger to its home position. More... | |
virtual void | moveToHomeStart (Basda::DeviceAsync &=Basda::Device::s_async) |
virtual void | moveToLimitStart (const Nice::NPoint &_limit, Basda::DeviceAsync &_async=Basda::Device::s_async) |
virtual void | retreatToBase (Basda::DeviceAsync &_async=Basda::Device::s_async) |
Move to the position (x,0), which means keep x and reduce y (extending into the field) to zero. More... | |
virtual bool | posReachable (const Nice::Point &_targetPosition, std::string _unit) |
Test whether the target is in the focal plane range of the motor. More... | |
virtual void | prepareDirectP2PMove (const Nice::Point &_targetPosition, std::string _unit, std::string _coordSys, bool _absolute, Basda::DeviceAsync &=Basda::Device::s_async) |
virtual QPolygon | getSilhouetteAtPosition (Nice::Point _point) |
Returns the star enlarger silhouette at the given position. More... | |
virtual Nice::Time | getMinTravelTime () |
virtual Nice::Time | getP2PTravelTime () |
int | getProgress () |
virtual void | transformationFactorChanged (const Nice::Any &) |
This method will be called automatically whenever the transformation property has changed. More... | |
virtual Nice::WMatrix | getCoordinateTransformationMatrix (std::string _unit, std::string _coordSys) |
This method returns user defined wmatrix. More... | |
virtual Nice::Rect | getTravelrange () |
This method returns travelrange. More... | |
virtual Nice::Point | coordinateTransformation (Nice::Point _value, std::string _unit, std::string _coordSys) |
This method converts an absolute position into a user defined unit. Thereby it uses the vector dx and dy of the conversion matrix. More... | |
virtual Nice::Point | coordinateTransformationInverse (Nice::Point _value, std::string _unit, std::string _coordSys) |
virtual Nice::Point | coordinateTranslate (Nice::Point _value, std::string _unit, std::string _coordSys) |
virtual Nice::Point | coordinateTranslateInverse (Nice::Point _value, std::string _unit, std::string _coordSys) |
std::map< std::string, int > | getUnitNamePrec () |
std::string | getDefaultUnit () |
std::string | getDefaultCoordinateSystem () |
void | writeDeviation () |
Private Member Functions | |
void | defineCoordinateSystem () |
void | createSESilhouette () |
void | measureShortestEdge () |
Nice::SeqSeqInt | calculateDirectP2PMove (double _d, double _v, double _a, double _currentPositionInSteps, double _targetPositionInSteps) |
double | predictPosition (Nice::SeqSeqInt &_segments, Nice::Time &_time) |
void | setScientificNotification (std::stringstream &_errorMsg, double _number) |
QString | getDir () |
QString | getTime (QString _dir) |
Laos::StarEnlarger::StarEnlarger | ( | const std::string | _name, |
const Nice::JointPtr & | _config, | ||
const Basda::MoccaNDevicePtr & | _device, | ||
const std::string | _basicUnit, | ||
const std::string | _basicCoordSys | ||
) |
|
virtual |
|
virtual |
|
virtual |
|
private |
|
virtual |
|
virtual |
This method converts an absolute position into a user defined unit. Thereby it uses the vector dx and dy of the conversion matrix.
_value | absolute position value in SE steps |
_unit | the unit in which the _value has to be converted |
_coordSys | the coordinate system in which the _value has to be converted |
|
virtual |
This method converts an absolute position into an absolute position in steps. Thereby it uses the vector dx and dy of the conversion matrix.
_value | position value |
_unit | the unit of _value |
_coordSys | coordinate system of _value |
|
virtual |
This method converts a distance into a distance in user defined unit. Thereby it ignores the vector dx and dy of the conversion matrix.
_value | distance in SE steps |
_unit | the unit in which the _value has to be converted |
_coordSys | the coordinate system in which the _value has to be converted |
|
virtual |
This method converts a distance into a distance in SE steps. Thereby it ignores the vector dx and dy of the conversion matrix.
_value | distance |
_unit | the unit of _value |
_coordSys | coordinate system of _value |
|
private |
|
virtual |
|
private |
|
virtual |
|
virtual |
|
virtual |
This method returns user defined wmatrix.
_unit | the unit in which the _value has to be converted |
_coordSys | the coordinate system in which the _value has to be converted |
std::string Laos::StarEnlarger::getDefaultCoordinateSystem | ( | ) |
std::string Laos::StarEnlarger::getDefaultUnit | ( | ) |
|
virtual |
|
private |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
int Laos::StarEnlarger::getProgress | ( | ) |
|
virtual |
Returns the star enlarger silhouette at the given position.
_point | the position in steps |
|
private |
|
virtual |
This method returns travelrange.
std::map< std::string, int > Laos::StarEnlarger::getUnitNamePrec | ( | ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
private |
|
virtual |
The method prepares a trapezoidal point-to-point profile movement.
The basic configuration parameter acceleration, deceleration, velocity and jerk are calculated and set in the Mocon.
_async | the call back object |
|
virtual |
Move the Star enlarger to the target position.
_position | the target position value |
_unit | the unit of the position values |
_async | the call back object |
|
virtual |
The method prepares a trapezoidal point-to-point profile movement.
The basic configuration parameter acceleration, deceleration, velocity and jerk are calculated and set in the Mocon.
_async | the call back object |
|
virtual |
Move the Star enlarger by a distance.
_distance | |
_unit | the unit of the position values |
_async | the call back object |
|
virtual |
Move the Star enlarger to its home position.
_motor | the index of the motor (the motors are alphabetically sorted by names; index 0 means the first entry in the list) |
_async | the call back object |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Test whether the target is in the focal plane range of the motor.
This is simpler than StarEnlargerServiceWorker::validateMoveTo: it just checks that the target is in range, but does not check whether any pairs or sets of motions would collide.
_targetPosition | The position to be checked (in the global x,y system) |
_unit | The unit of the _targetPosition |
|
private |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Move to the position (x,0), which means keep x and reduce y (extending into the field) to zero.
|
virtual |
|
virtual |
enables the SE device and updates all position property values the parameter _position is in [um]
|
virtual |
|
private |
|
virtual |
|
virtual |
void Laos::StarEnlarger::storeMotorConfig | ( | ) |
This method will be called automatically whenever the transformation property has changed.
void Laos::StarEnlarger::writeDeviation | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
The MoCon profile vector consist of segments.
|
private |
|
private |
|
private |
|
private |
A vector with the coordinate transformation matrixes.
It is also used to convert between the different units (eg. um to steps)
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |