10class DefaultBinderFrame;
295 bool MoveTo(
int scan,
int index,
double frac,
bool rect)
override;
320 bool Rotate(
int scan,
int index)
override;
356 bool MoveTo(
int scan,
int index,
double frac,
bool rect,
bool chk);
895 if (Stage != stage_pos.
Stage)
903 if (Index != stage_pos.
Index)
912 if (Rect != stage_pos.
Rect)
Definition BinderCommonPropertyPage.h:15
Definition CheckPositionsPropertyPage.h:16
Definition DefaultBinderConfigPropertyPage.h:15
Definition DefaultBinderFrame.h:18
Definition DefaultBinderProjectPropertyPage.h:15
Definition DefaultBinderPropertyPage.h:15
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:198
InfoBase * GetScanInfoBase(int scan)
Gets the scan base information of the passed project scan list index.
Definition ScanMethod.h:28
Definition SelectCurrentPositionDialog.h:16
Structure to stage position information.
Definition DefaultScanBinder.h:383
const TStagePosition & Set(int scan, EBinderStage stage, int index=-1, double frac=-1.0, bool rect=false)
Initialize function.
Definition DefaultScanBinder.h:882
EBinderStage Stage
Stage in the movement process.
Definition DefaultScanBinder.h:457
TStagePosition()
Default constructor.
Definition DefaultScanBinder.h:858
bool Rect
Specifies if the position is rectangular to the surface or not.
Definition DefaultScanBinder.h:463
bool IsEqual(const TStagePosition &stage_pos) const
Compares the members taking the binder stage into account.
Definition DefaultScanBinder.h:892
double Frac
Fraction of the scan line. (bsSCAN only)
Definition DefaultScanBinder.h:461
bool operator!=(const TStagePosition &sp) const
Equal operator.
Definition DefaultScanBinder.h:426
int Scan
Scan index in the project list.
Definition DefaultScanBinder.h:455
std::string GetName(TDefaultScanBinder *) const
Gets the name of this stage position.
bool operator==(const TStagePosition &sp) const
Unequal operator.
Definition DefaultScanBinder.h:434
std::string GetString() const
Retrieves information as a string.
bool SetString(const std::string &s)
Sets information as a string.
int Index
Index of the scan line or approach index or system position.
Definition DefaultScanBinder.h:459
Definition DefaultScanBinder.h:13
TStagePosition FTarget
Holds the targeted stage position information.
Definition DefaultScanBinder.h:476
int FTrajectIndex
Holds the current traject index. Movement is enabled when set other than -1.
Definition DefaultScanBinder.h:539
void AddPropertyPages(PropertySheetDialog *sheet) override
Overridden from base class.
Variable VBalance
For switching on balance and to detect when it is ready when it is reset.
Definition DefaultScanBinder.h:795
static std::string GetSourceName(int value)
Gets the name of the given enumerate value.
static constexpr int MAX_POSITIONS
Maximum amount of positions.
Definition DefaultScanBinder.h:63
bool GetGenericInfoList(StringList &) override
Overridden from base class.
bool SetScanAxes(bool)
Sets the axes according to the active scan mode.
TStagePositions FTraject
Holds the current trajectory of movements of the applied command.
Definition DefaultScanBinder.h:537
TVariableHandler< TDefaultScanBinder > _handlerVariableEventImport
Variable handler callback hook.
Definition DefaultScanBinder.h:789
void DoReadWriteConfig(IniEnvelope &ini, bool rd) override
Overridden from base class.
TVector< TStagePosition > TStagePositions
Type of list of stage positions.
Definition DefaultScanBinder.h:469
bool AddCalculatedTraject(TStagePositions &traject, const TStagePosition &from, const TStagePosition &to)
Calculates the trajectory of move steps to approach a certain position.
bool MoveTo(int scan, int index, double frac, bool rect, bool chk)
Same as the overloaded function allowing to skip the position check.
DefaultBinderFrame * FBinderFrame
Holds the special binder frame when it is created.
Definition DefaultScanBinder.h:652
EState FResumeState
State to set when motion stops.
Definition DefaultScanBinder.h:648
~TDefaultScanBinder() override
Virtual destructor.
const TStagePosition FCur
Holds the current stage position when the scan binder is active.
Definition DefaultScanBinder.h:472
bool Abort() override
Overridden from base class.
void ReadProfile(IniProfile &inifile) override
Overridden from base class.
bool CanMoveToCheckPosition()
Checks if execution of MoveToCheckPosition() is possible.
TDefaultScanBinder(const Parameters ¶meters)
Constructor for passing general structure for the class factory.
EMoveMode
Definition DefaultScanBinder.h:679
@ mmCON
Continuous move by the scan axis on unlimited axis.
Definition DefaultScanBinder.h:683
@ mmBI
Bidirectional move by the scan axis.
Definition DefaultScanBinder.h:687
@ mmVEL
Continuous move by the scan axis on unlimited axis and the other axis are used in velocity mode.
Definition DefaultScanBinder.h:681
@ mmUNI
Bidirectional move by the scan axis.
Definition DefaultScanBinder.h:685
bool Rotate(int scan, int index) override
Overridden from base class.
bool QueryCheckPosition(TCheckPosition &check_pos)
Reads a check position from user input.
bool Evaluate(int scan) override
Overridden from base class.
int GetCommonApproachCount(int scan1, int scan2)
Gets the common amount of approach stages between the passed two scans.
bool MoveTo(int scan, int index, double frac, bool rect) override
Overridden from base class.
void Clear() override
Clears the settings of the derived instance initial state.
TCheckPosition FManualPosition
Holds the last manual entered check position.
Definition DefaultScanBinder.h:823
Variable VScanGainActive
To signal scan gain must be active.
Definition DefaultScanBinder.h:799
EState FAfterStopState
State to set when motion stops.
Definition DefaultScanBinder.h:646
QWidget * GetFrame() override
Overridden from base class.
void StateChange(EState prev, EState cur) override
Overridden from base class.
bool SetTrigger(int scan)
Sets the trigger to frequency or density according the axis value.
bool MoveToCheckPosition(int check_index)
Mostly called by the binder frame to execute checks.
bool Initialize() override
Initializes the instance for action.
const Vector3D & GetCheckOffset() const
Gets the check offset for the part established during check positions.
Definition DefaultScanBinder.h:918
void handleVariableEventImport(Variable::EEvent event, const Variable &caller, Variable &link, bool same_inst)
Event handler for imported variables.
bool MoveToCheckPosition(int scan, const TCheckPosition &, bool confirm)
Moves to the check position of the given scan.
bool Stop() override
Overridden from base class.
Variable::PtrVector FVarsImport
Holds the imported variable pointers for iterations.
Definition DefaultScanBinder.h:781
bool Suspend(bool immediate) override
Suspends action at a convenient position.
int GetIndex() override
Overridden from base class.
EPositionSource
Enumerating the position sources.
Definition DefaultScanBinder.h:30
@ psSAFE
Scan method safe position.
Definition DefaultScanBinder.h:38
@ psSCANSTART
Scan method start position.
Definition DefaultScanBinder.h:40
@ psLASTENTRY
Entry to enbale iteration.
Definition DefaultScanBinder.h:46
@ psSCANINDEX
Scan method index position.
Definition DefaultScanBinder.h:44
@ psSCANSTOP
Scan method stop position.
Definition DefaultScanBinder.h:42
@ psSET
Position set in the structure.
Definition DefaultScanBinder.h:34
@ psNONE
For reading from stream.
Definition DefaultScanBinder.h:32
@ psPARK
Park position.
Definition DefaultScanBinder.h:36
bool FCheckMoveConfirm
When enabled each position move wil be asked for7 confirmation.
Definition DefaultScanBinder.h:817
EBalance
State set when balancing needs to be called after motion completes.
Definition DefaultScanBinder.h:805
@ balACTIVE
Balancing needs to be triggered on motion position complete.
Definition DefaultScanBinder.h:809
@ balWAIT
Waiting for balance completion.
Definition DefaultScanBinder.h:811
@ balDISABLED
Balancing sequence is disabled.
Definition DefaultScanBinder.h:807
void Sustain(timespec) override
Overridden from base class.
static EPositionSource GetSourceValue(const std::string &name)
Gets enumerate value.
TStagePosition FMove
Holds the step movement position when moving.
Definition DefaultScanBinder.h:474
void ControllerEventHandler(gmi::Controller *ctrl, gmi::EControllerEvent event)
Handler type for motion event handling.
virtual bool GetSetValue(const IdInfo *info, Value *value, Value::vector_type *params, bool flag_set)
Overridden from base class.
bool GetScanPos(gmi::AxesCoord &pos, int index, bool begin)
Gets the scan index position.
bool MoveToCheckPosition(const TCheckPosition &check_pos)
Moves to the check position of the active scan by default.
bool GetStagePos(gmi::AxesCoord &pos, const TStagePosition &stage_pos) const
Gets the position for the given stage at given coordinate reference.
bool Resume() override
Resumes a suspended action.
TStagePosition FResume
Holds the coordinates where the controller was heading for.
Definition DefaultScanBinder.h:478
Vector3D GetOffset() const override
Overridden from base class.
TScanInfo & GetScanInfo(int scan)
Gets the cast scan info structure of the base class.
Definition DefaultScanBinder.h:848
bool SetCheckOffset(const Vector3D &chk_ofs)
Applies a new check offset if in the range of allowed displacement otherwise it returns false.
bool CheckPos(const gmi::AxesCoord &pos) const
Checks if the given position is equals the current position.
void WriteProfile(IniProfile &inifile) override
Overridden from base class.
static std::string GetStageName(int stage)
Gets the name of the given stage.
bool Scan(int scan) override
Overridden from base class.
EScanningStage
Stages for scanning.
Definition DefaultScanBinder.h:658
@ ssTRACE
Tracing for data in uni- or bidirectional mode.
Definition DefaultScanBinder.h:666
@ ssFINISH
Finishing scanning.
Definition DefaultScanBinder.h:670
@ ssSPINUP
Continuous mode axis spin up. Uses the timer.
Definition DefaultScanBinder.h:664
@ ssRETRACE
Moving back in unidirectional mode.
Definition DefaultScanBinder.h:668
@ ssRETURN
Return to position from continuous mode.
Definition DefaultScanBinder.h:672
@ ssABORTED
Scanning was aborted.
Definition DefaultScanBinder.h:660
@ ssREADY
Scanning has finished.
Definition DefaultScanBinder.h:674
@ ssSTART
Start of scanning.
Definition DefaultScanBinder.h:662
bool ScanMoveTo(int index, bool begin, bool trace)
Starts movement to the passed scan index.
EBinderStage
Stages of operation of this scan binder. Order of these enumerates are important.
Definition DefaultScanBinder.h:363
@ bsSTART
Position is at scan start.
Definition DefaultScanBinder.h:369
@ bsAPPROACH
Position is at approach position index.
Definition DefaultScanBinder.h:367
@ bsSYSTEM
Position is at system position.
Definition DefaultScanBinder.h:365
@ bsSCAN
Position is at specified scan index.
Definition DefaultScanBinder.h:371
bool GetNextStep(TStagePosition &next, const TStagePosition &sp1, const TStagePosition &sp2, TStagePositions &traject)
Calculate the atomic next step to move from point 1 to point 2.
void SetCurStage(const TStagePosition &stage_pos)
Sets a new stage.
bool FClearCheckOffset
When enabled a change in scan index will clear the offset.
Definition DefaultScanBinder.h:819
bool CalcCheckOffset(Vector3D &vect) const
Calculates the check offset made using the manipulator or acquisition instrument.
TPositions FPositions
Holds the list of position.
Definition DefaultScanBinder.h:572
void AddPropertyPages(PropertySheetDialog *sheet, bool scan) override
Overridden from base class.
Variable VBidirectional
To signal bidirectional was switched on.
Definition DefaultScanBinder.h:797
Vector3D FCheckOffset
Holds the check offset for the project established during checking.
Definition DefaultScanBinder.h:779
ListenerList _listenerList
Holds the listeners for this instance to auto removed at destruction.
Definition DefaultScanBinder.h:480
struct sf::TDefaultScanBinder::TScanning FScanning
gmi::AxesCoord FStopCoord
Holds the coordinates where the controller stopped.
Definition DefaultScanBinder.h:650
virtual void Sustain(const timespec &ts)
Overridden from base class.
bool Activate(int scan) override
Overridden from base class.
bool CheckStagePos(const TStagePosition &stage_pos) const
Checks if the current controller position is equals the stage position.
friend TScanning
Definition DefaultScanBinder.h:835
InfoBase * NewScanInfo() override
Overridden from base class.
const IdInfo * getInfo(const std::string &name) const override
Overridden from base class.
bool MoveToStage(const TStagePosition &stage_pos)
Moves the given stage_pos.
int FCheckOffsetScanIndex
Holds the scan index used for the last check offset.
Definition DefaultScanBinder.h:821
bool Check(int scan) override
Overridden from base class.
EBalance FBalanceState
Holds the balance state.
Definition DefaultScanBinder.h:815
bool CheckScanPos(int index, bool begin)
Checks if the position has been reached.
String list with optional object association and sorting.
Definition TStringList.h:12
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:20
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
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
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
Structure to hold and compare check positions.
Definition DefaultScanBinder.h:115
TCheckPosition(const TCheckPosition &p)
Definition DefaultScanBinder.h:122
std::string toString() const
TCheckPosition()
Definition DefaultScanBinder.h:116
bool fromString(const std::string &s)
bool operator==(const TCheckPosition &p) const
Compare equal operator.
Definition DefaultScanBinder.h:134
double Frac
Scan line fraction. Is always between 0 and 1.
Definition DefaultScanBinder.h:152
bool operator!=(const TCheckPosition &p) const
Compare unequal operator.
Definition DefaultScanBinder.h:140
bool Rect
Definition DefaultScanBinder.h:155
bool isEqual(const TCheckPosition &p) const
Definition DefaultScanBinder.h:128
double Line
Scan line. Is always between 0 and 1.
Definition DefaultScanBinder.h:150
List of approach positions.
Definition DefaultScanBinder.h:578
bool IsEqual(const TCheckPositions &p) const
bool operator!=(const TCheckPositions &p) const
Definition DefaultScanBinder.h:581
bool operator==(const TCheckPositions &p) const
Definition DefaultScanBinder.h:586
Structure to hold and compare approach positions.
Definition DefaultScanBinder.h:69
bool isEqual(const TPosition &p) const
Definition DefaultScanBinder.h:82
void fromString(const std::string &s)
bool Enabled
Holds the enabled flag.
Definition DefaultScanBinder.h:102
std::string Name
Name of the position.
Definition DefaultScanBinder.h:104
std::string toString() const
TPosition(const TPosition &p)
Definition DefaultScanBinder.h:75
bool operator!=(const TPosition &p) const
Definition DefaultScanBinder.h:92
gmi::AxesCoord Coord
Coordinate when not using a source.
Definition DefaultScanBinder.h:108
TPosition()
Definition DefaultScanBinder.h:70
EPositionSource Source
Uses axis information of source.
Definition DefaultScanBinder.h:106
bool operator==(const TPosition &p) const
Definition DefaultScanBinder.h:87
List of approach positions.
Definition DefaultScanBinder.h:557
bool operator!=(const TPositions &p) const
Definition DefaultScanBinder.h:560
bool operator==(const TPositions &p) const
Definition DefaultScanBinder.h:565
bool isEqual(const TPositions &p) const
Holds the safe position of all scan area in the project.
Definition DefaultScanBinder.h:596
TCheckPositions CheckPos
Holds the list of position.
Definition DefaultScanBinder.h:620
gmi::AxesCoord SafePos
Holds the scan safe position.
Definition DefaultScanBinder.h:618
TScanInfo(const TScanInfo &si)
Definition DefaultScanBinder.h:606
bool Balance
True when balancing is required for th acquisition device.
Definition DefaultScanBinder.h:624
TScanInfo()
Definition DefaultScanBinder.h:598
virtual void ReadWrite(IniProfile *inifile, bool rd)
Read or writes the scan scan-binder information to profile. Derived classes need to inherit this memb...
bool ScanGainActive
True when a scan gain needs to be added.
Definition DefaultScanBinder.h:628
bool Bidirectional
True when bidirectional scanning is allowed for line scans.
Definition DefaultScanBinder.h:626
bool StraightMove
True when straight index moves are allowed.
Definition DefaultScanBinder.h:622
Structure holding all information during the scanning state.
Definition DefaultScanBinder.h:694
gmi::EAxisLocation ScanAxis
Axis used for scanning.
Definition DefaultScanBinder.h:728
int TargetIndex
Holds the targeted index.
Definition DefaultScanBinder.h:736
TScanInfo * Info
Holds the scan information of method which is scanned.
Definition DefaultScanBinder.h:722
gmi::AxisValue Trigger
Triggering axis and density when alNA it is the frequency.
Definition DefaultScanBinder.h:734
EMoveMode MoveMode
The way the scan is performed.
Definition DefaultScanBinder.h:726
EScanningStage Stage
Holds the current scan stage.
Definition DefaultScanBinder.h:724
TScanning()
Default constructor.
Definition DefaultScanBinder.h:698
ScanMethod * Method
Holds the method instance which is scanned.
Definition DefaultScanBinder.h:720
ElapseTimer SpinUpTimer
Timer for delays for spinning up.
Definition DefaultScanBinder.h:730
ElapseTimer Timer
Timer for delays in the scanning process.
Definition DefaultScanBinder.h:732
int ScanIndex
Holds the executing scan index.
Definition DefaultScanBinder.h:718
void Clear()
Clears the structure to the initial state.
Definition DefaultScanBinder.h:706