9class DefaultBinderFrame;
295 bool moveTo(
int scan,
int index,
double frac,
bool perp)
override;
320 bool rotate(
int scan,
int index)
override;
356 bool moveTo(
int scan,
int index,
double frac,
bool perp,
bool chk);
869 if (_stage != stage_pos.
_stage)
872 if (_scan != stage_pos.
_scan)
877 if (_index != stage_pos.
_index)
886 if (_rect != stage_pos.
_rect)
Definition BinderCommonPropertyPage.h:15
Property page for editing check positions.
Definition CheckPositionsPropertyPage.h:19
Definition DefaultBinderConfigPropertyPage.h:15
Definition DefaultBinderFrame.h:18
Definition DefaultBinderProjectPropertyPage.h:15
Definition DefaultBinderPropertyPage.h:15
Structure for stage position information.
Definition DefaultScanBinder.h:383
StagePosition()
Default constructor.
Definition DefaultScanBinder.h:832
bool operator!=(const StagePosition &sp) const
Equal operator.
Definition DefaultScanBinder.h:413
std::string getString() const
Retrieves information as a string.
bool operator==(const StagePosition &sp) const
Unequal operator.
Definition DefaultScanBinder.h:419
int _index
Index of the scan line or approach index or system position.
Definition DefaultScanBinder.h:438
bool setString(const std::string &s)
Sets information as a string.
double _frac
Fraction of the scan line. (bsSCAN only)
Definition DefaultScanBinder.h:440
bool _rect
Specifies if the position is rectangular to the surface or not.
Definition DefaultScanBinder.h:442
const StagePosition & set(int scan, EBinderStage stage, int index=-1, double frac=-1.0, bool perp=false)
Initialize function.
Definition DefaultScanBinder.h:856
int _scan
Scan the index in the project list.
Definition DefaultScanBinder.h:434
std::string getName(DefaultScanBinder *) const
Gets the name of this stage position.
EBinderStage _stage
Stage in the movement process.
Definition DefaultScanBinder.h:436
bool isEqual(const StagePosition &stage_pos) const
Compares the members taking the binder stage into account.
Definition DefaultScanBinder.h:866
Definition DefaultScanBinder.h:12
ListenerList _listenerList
Holds the listeners for this instance to auto remove at destruction.
Definition DefaultScanBinder.h:459
QWidget * GetFrame() override
Overridden from base class.
EState _resumeState
State to set when motion stops.
Definition DefaultScanBinder.h:627
void clear() override
Clears the settings of the derived instance initial state.
bool activate(int scan) override
Overridden from base class.
bool CanMoveToCheckPosition()
Checks if execution of MoveToCheckPosition() is possible.
int GetCommonApproachCount(int scan1, int scan2)
Gets the common number of approach stages between the passed two scans.
TVector< StagePosition > StagePositions
Type for a list of stage positions.
Definition DefaultScanBinder.h:448
bool getStagePos(gmi::AxesCoord &pos, const StagePosition &stage_pos) const
Gets the position for the given stage at a given coordinate reference.
bool moveToStage(const StagePosition &stage_pos)
Moves the given stage_pos.
void sustain(const timespec &ts) override
Overridden from base class.
static std::string getStageName(int stage)
Gets the name of the given stage.
void addPropertyPages(PropertySheetDialog *sheet, bool scan) override
Overridden from base class.
void addPropertyPages(PropertySheetDialog *sheet) override
Overridden from base class.
bool abort() override
Overridden from base class.
void readProfile(IniProfile &inifile) override
Overridden from base class.
bool check(int scan) override
Overridden from base class.
bool addCalculatedTraject(StagePositions &traject, const StagePosition &from, const StagePosition &to)
Calculates the trajectory of move steps to approach a certain position.
~DefaultScanBinder() override
Virtual destructor.
bool stop() override
Overridden from base class.
StagePosition _move
Holds the step movement position when moving.
Definition DefaultScanBinder.h:453
void doStoreConfig(IniEnvelope &ini, bool rd) override
Overridden from base class.
bool setScanAxes(bool)
Sets the axes according to the active scan mode.
virtual bool GetSetValue(const IdInfo *info, Value *value, Value::vector_type *params, bool flag_set)
Overridden from base class.
bool _checkMoveConfirm
When enabled, each position move will be asked for confirmation.
Definition DefaultScanBinder.h:796
bool moveTo(int scan, int index, double frac, bool perp) override
Overridden from base class.
bool getGenericInfoList(StringList &) override
Overridden from base class.
const Vector3D & GetCheckOffset() const
Gets the check offset for the part established during check positions.
Definition DefaultScanBinder.h:892
bool rotate(int scan, int index) override
Overridden from base class.
int _checkOffsetScanIndex
Holds the scan index used for the last check offset.
Definition DefaultScanBinder.h:800
int getIndex() override
Overridden from base class.
EMoveMode
Definition DefaultScanBinder.h:658
@ mmBI
Bidirectional move by the scan axis.
Definition DefaultScanBinder.h:666
@ mmVEL
Continuous move by the scan axis on unlimited axis and the other axis are used in velocity mode.
Definition DefaultScanBinder.h:660
@ mmCON
Continuous move by the scan axis on unlimited axis.
Definition DefaultScanBinder.h:662
@ mmUNI
Bidirectional move by the scan axis.
Definition DefaultScanBinder.h:664
static constexpr int MAX_POSITIONS
Maximum number of positions.
Definition DefaultScanBinder.h:62
bool checkPos(const gmi::AxesCoord &pos) const
Checks if the given position equals the current position.
EBalance
State set when balancing needs to be called after the motion completes.
Definition DefaultScanBinder.h:784
@ balACTIVE
Balancing needs to be triggered on motion position complete.
Definition DefaultScanBinder.h:788
@ balWAIT
Waiting for balance completion.
Definition DefaultScanBinder.h:790
@ balDISABLED
Balancing sequence is disabled.
Definition DefaultScanBinder.h:786
friend Scanning
Definition DefaultScanBinder.h:809
Variable::PtrVector _varsImport
Holds the imported variable pointers for iterations.
Definition DefaultScanBinder.h:760
void stateChange(EState prev, EState cur) override
Overridden from base class.
EState _afterStopState
State to set when motion stops.
Definition DefaultScanBinder.h:625
bool checkScanPos(int index, bool begin)
Checks if the position has been reached.
PositionList FPositions
Holds the list of position.
Definition DefaultScanBinder.h:551
bool moveTo(int scan, int index, double frac, bool perp, bool chk)
Same as the overridden function allowing to skip the position check.
bool getNextStep(StagePosition &next, const StagePosition &sp1, const StagePosition &sp2, StagePositions &traject)
Calculate the atomic next step to move from point 1 to point 2.
bool MoveToCheckPosition(int scan, const CheckPosition &, bool confirm)
Moves to the check position of the given scan.
EBalance _balanceState
Holds the balance state.
Definition DefaultScanBinder.h:794
bool MoveToCheckPosition(int check_index)
Mostly called by the binder frame to execute checks.
int _trajectIndex
Holds the current traject index. Movement is enabled when set other than -1.
Definition DefaultScanBinder.h:518
bool initialize() override
Initializes the instance for action.
bool checkStagePos(const StagePosition &stage_pos) const
Checks if the current controller position equals the stage position.
Variable vBalance
For switching on balance and to detect when it is ready when it is reset.
Definition DefaultScanBinder.h:774
bool queryCheckPosition(CheckPosition &check_pos)
Reads a check position from user input.
StagePosition _resume
Holds the coordinates where the controller was heading for.
Definition DefaultScanBinder.h:457
static EPositionSource GetSourceValue(const std::string &name)
Gets enumerate value.
bool resume() override
Resumes a suspended action.
DefaultBinderFrame * _binderFrame
Holds the special binder frame when it is created.
Definition DefaultScanBinder.h:631
InfoBase * createScanInfo() override
Overridden from base class.
TVariableHandler< DefaultScanBinder > _handlerVariableEventImport
Variable handler callback hook.
Definition DefaultScanBinder.h:768
Vector3D _checkOffset
Holds the check offset for the project established during checking.
Definition DefaultScanBinder.h:758
EBinderStage
Operation stages of this scan binder. Enumeration order is important.
Definition DefaultScanBinder.h:363
@ bsSYSTEM
Position is at system position.
Definition DefaultScanBinder.h:365
@ bsSCAN
Position is at the specified scan index.
Definition DefaultScanBinder.h:371
@ bsAPPROACH
Position is at approach position index.
Definition DefaultScanBinder.h:367
@ bsSTART
Position is at scan start.
Definition DefaultScanBinder.h:369
struct sf::DefaultScanBinder::Scanning _scanning
bool evaluate(int scan) override
Overridden from base class.
Variable vScanGainActive
To signal, scan gain must be active.
Definition DefaultScanBinder.h:778
bool _clearCheckOffset
When enabled, a change in the scan index will clear the offset.
Definition DefaultScanBinder.h:798
static std::string GetSourceName(int value)
Gets the name of the given enumerated value.
bool setTrigger(int scan)
Sets the trigger to frequency or density according to the axis value.
StagePosition _target
Holds the targeted stage position information.
Definition DefaultScanBinder.h:455
EPositionSource
Enumeration of the position sources.
Definition DefaultScanBinder.h:29
@ psLASTENTRY
Entry to enable iteration.
Definition DefaultScanBinder.h:45
@ psPARK
Park position.
Definition DefaultScanBinder.h:35
@ psSCANSTOP
Scan method stop position.
Definition DefaultScanBinder.h:41
@ psSAFE
Scan method safe position.
Definition DefaultScanBinder.h:37
@ psSCANINDEX
Scan method index position.
Definition DefaultScanBinder.h:43
@ psSET
Position set in the structure.
Definition DefaultScanBinder.h:33
@ psNONE
For reading from stream.
Definition DefaultScanBinder.h:31
@ psSCANSTART
Scan method start position.
Definition DefaultScanBinder.h:39
bool suspend(bool immediate) override
Suspends action at a convenient position.
CheckPosition _manualPosition
Holds the last manual entered check position.
Definition DefaultScanBinder.h:802
Variable vBidirectional
To signal, bidirectional was switched on.
Definition DefaultScanBinder.h:776
void setCurrentStage(const StagePosition &stage_pos)
Sets a new stage.
bool CalcCheckOffset(Vector3D &vect) const
Calculates the check offset made using the manipulator or acquisition instrument.
StagePositions _traject
Holds the current trajectory for movements of the applied command.
Definition DefaultScanBinder.h:516
bool getScanPos(gmi::AxesCoord &pos, int index, bool begin)
Gets the scan index position.
const IdInfo * getInfo(const std::string &name) const override
Overridden from base class.
EScanningStage
Stages for scanning.
Definition DefaultScanBinder.h:637
@ ssABORTED
Scanning was aborted.
Definition DefaultScanBinder.h:639
@ ssREADY
Scanning has finished.
Definition DefaultScanBinder.h:653
@ ssFINISH
Finishing scanning.
Definition DefaultScanBinder.h:649
@ ssTRACE
Tracing for data in uni- or bidirectional mode.
Definition DefaultScanBinder.h:645
@ ssSTART
Scanning start.
Definition DefaultScanBinder.h:641
@ ssSPINUP
Continuous mode axis spin up. Uses the timer.
Definition DefaultScanBinder.h:643
@ ssRETRACE
Moving back in unidirectional mode.
Definition DefaultScanBinder.h:647
@ ssRETURN
Return to position from continuous mode.
Definition DefaultScanBinder.h:651
Vector3D getOffset() const override
Overridden from base class.
void ControllerEventHandler(gmi::Controller *ctrl, gmi::EControllerEvent event)
Handler type for motion event handling.
gmi::AxesCoord _stopCoord
Holds the coordinates where the controller stopped.
Definition DefaultScanBinder.h:629
const StagePosition _current
Holds the current stage position when the scan binder is active.
Definition DefaultScanBinder.h:451
void writeProfile(IniProfile &inifile) override
Overridden from base class.
void handleVariableEventImport(Variable::EEvent event, const Variable &caller, Variable &link, bool same_inst)
Event handler for imported variables.
bool startScan(int scan) override
Overridden from base class.
bool scanMoveTo(int index, bool begin, bool trace)
Starts movement to the passed scan index.
bool SetCheckOffset(const Vector3D &chk_ofs)
Applies a new check offset if in the range of allowed displacement otherwise it returns false.
bool MoveToCheckPosition(const CheckPosition &check_pos)
Moves to the check position of the active scan by default.
ScanInfo & getScanInfo(int scan)
Gets the cast scan info structure of the base class.
Definition DefaultScanBinder.h:822
DefaultScanBinder(const Parameters ¶meters)
Constructor for passing general structure for the class factory.
Timer for turning true when a certain amount of time has passed.
Definition ElapseTimer.h:12
Class for reading and writing ini-profiles.
Definition IniProfile.h:17
Base class used as container for classes having listeners created by sf::TListener template.
Definition TListener.h:13
Dialog containing multiple property pages.
Definition qt/PropertySheetDialog.h:15
Abstract base class for implementing scan binders.
Definition ScanBinder.h:30
EState
Enumeration of states of a scan binder.
Definition ScanBinder.h:215
InfoBase * getScanInfoBase(int scan)
Gets the scan base information of the passed project scan list index.
Definition ScanMethod.h:22
Definition SelectCurrentPositionDialog.h:16
Template for linking pointers of member function to Variable instances.
Definition VariableHandler.h:38
Counted vector having additional methods and operators for ease of usage. This template class extends...
Definition TVector.h:19
Value container class able to performing arithmetic functions.
Definition Value.h:19
EEvent
Events send to the handler set with sf::Variable::setHandler.
Definition VariableTypes.h:130
Class for creating and referencing global or local created parameters or settings called variables....
Definition Variable.h:16
All axis values in one structure accompanied by some handy manipulation methods.
Definition AxesCoord.h:13
bool isEqual(const AxesCoord &ac, const AxesCoord &tolerances={}) const
Compares if the given coord is equal to this one using the compare() method.
Single position, speed or acceleration value of a specific axis.
Definition GmiTypes.h:174
Pure virtual class for implementation of motion controllers.
Definition Controller.h:13
EControllerEvent
Enumerate for controller events.
Definition GmiInterface.h:654
EAxisLocation
Enumeration of axis locations.
Definition GmiTypes.h:81
@ alNA
Not available axis.
Definition GmiTypes.h:85
Definition Application.h:10
bool isEqual(T a, T b, T epsilon=std::numeric_limits< T >::epsilon())
Compares 2 floating point values of the same type with a given epsilon.
Definition misc/gen/math.h:252
List of approach positions.
Definition DefaultScanBinder.h:557
bool operator!=(const CheckPositionList &p) const
Definition DefaultScanBinder.h:560
bool isEqual(const CheckPositionList &p) const
bool operator==(const CheckPositionList &p) const
Definition DefaultScanBinder.h:565
Structure to hold and compare check positions.
Definition DefaultScanBinder.h:114
std::string toString() const
Writes a check position to string.
CheckPosition()
Definition DefaultScanBinder.h:115
bool operator!=(const CheckPosition &p) const
Compare unequal operator.
Definition DefaultScanBinder.h:139
double _frac
Scan line fraction. Is always between 0 and 1.
Definition DefaultScanBinder.h:153
bool operator==(const CheckPosition &p) const
Compare equal operator.
Definition DefaultScanBinder.h:133
bool fromString(const std::string &s)
Reads a check position from a string.
bool isEqual(const CheckPosition &p) const
Definition DefaultScanBinder.h:127
double _line
Scan line. Is always between 0 and 1.
Definition DefaultScanBinder.h:151
bool _perp
Beam perpendicular to the surface.
Definition DefaultScanBinder.h:155
CheckPosition(const CheckPosition &p)
Definition DefaultScanBinder.h:121
List of approach positions.
Definition DefaultScanBinder.h:536
bool operator==(const PositionList &p) const
Definition DefaultScanBinder.h:544
bool isEqual(const PositionList &p) const
bool operator!=(const PositionList &p) const
Definition DefaultScanBinder.h:539
Structure to hold and compare approach positions.
Definition DefaultScanBinder.h:68
gmi::AxesCoord Coord
Coordinate when not using a source.
Definition DefaultScanBinder.h:107
Position(const Position &p)
Definition DefaultScanBinder.h:74
EPositionSource Source
Uses axis information of the source.
Definition DefaultScanBinder.h:105
bool operator==(const Position &p) const
Definition DefaultScanBinder.h:86
Position()
Definition DefaultScanBinder.h:69
bool isEqual(const Position &p) const
Definition DefaultScanBinder.h:81
std::string toString() const
void fromString(const std::string &s)
std::string Name
Name of the position.
Definition DefaultScanBinder.h:103
bool operator!=(const Position &p) const
Definition DefaultScanBinder.h:91
bool Enabled
Holds the enabled flag.
Definition DefaultScanBinder.h:101
Holds the safe position for all scan-areas in the project.
Definition DefaultScanBinder.h:575
ScanInfo(const ScanInfo &si)
Definition DefaultScanBinder.h:585
CheckPositionList _checkPositions
Holds the list of position.
Definition DefaultScanBinder.h:599
bool _straightMove
True when straight index moves are allowed.
Definition DefaultScanBinder.h:601
bool _scanGainActive
True when a scan gain needs to be added.
Definition DefaultScanBinder.h:607
void ReadWrite(IniProfile *inifile, bool rd) override
Read or writes the scan scan-binder information to profile. Derived classes need to inherit this memb...
bool _bidirectional
True when bidirectional scanning is allowed for line scans.
Definition DefaultScanBinder.h:605
gmi::AxesCoord _safePosition
Holds the scan safe position.
Definition DefaultScanBinder.h:597
ScanInfo()
Definition DefaultScanBinder.h:577
bool _balance
True when balancing is required for the acquisition device.
Definition DefaultScanBinder.h:603
Structure holding all information during the scanning state.
Definition DefaultScanBinder.h:673
void Clear()
Clears the structure to the initial state.
Definition DefaultScanBinder.h:685
EMoveMode MoveMode
The way the scan is performed.
Definition DefaultScanBinder.h:705
gmi::EAxisLocation ScanAxis
Axis used for scanning.
Definition DefaultScanBinder.h:707
ScanMethod * Method
Holds the method instance which is scanned.
Definition DefaultScanBinder.h:699
Scanning()
Default constructor.
Definition DefaultScanBinder.h:677
gmi::AxisValue Trigger
Triggering axis and density when alNA it is the frequency.
Definition DefaultScanBinder.h:713
int TargetIndex
Holds the targeted index.
Definition DefaultScanBinder.h:715
ScanInfo * Info
Holds the scan information of the method which is scanned.
Definition DefaultScanBinder.h:701
ElapseTimer SpinUpTimer
Timer for delays for spinning up.
Definition DefaultScanBinder.h:709
int ScanIndex
Holds the executing scan index.
Definition DefaultScanBinder.h:697
ElapseTimer Timer
Timer for delays in the scanning process.
Definition DefaultScanBinder.h:711
EScanningStage Stage
Holds the current scan stage.
Definition DefaultScanBinder.h:703
Structure used a base class for derived binder classes to store scan dependant information.
Definition ScanBinder.h:36
Mandatory structure for initialization of derive class.
Definition ScanBinder.h:64
Used to create static lookup lists.
Definition ScriptObject.h:62