10class DefaultBinderFrame;
296 bool moveTo(
int scan,
int index,
double frac,
bool perp)
override;
321 bool rotate(
int scan,
int index)
override;
357 bool moveTo(
int scan,
int index,
double frac,
bool perp,
bool chk);
870 if (_stage != stage_pos.
_stage)
873 if (_scan != stage_pos.
_scan)
878 if (_index != stage_pos.
_index)
887 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 to stage position information.
Definition DefaultScanBinder.h:384
StagePosition()
Default constructor.
Definition DefaultScanBinder.h:833
bool operator!=(const StagePosition &sp) const
Equal operator.
Definition DefaultScanBinder.h:414
std::string getString() const
Retrieves information as a string.
bool operator==(const StagePosition &sp) const
Unequal operator.
Definition DefaultScanBinder.h:420
int _index
Index of the scan line or approach index or system position.
Definition DefaultScanBinder.h:439
bool setString(const std::string &s)
Sets information as a string.
double _frac
Fraction of the scan line. (bsSCAN only)
Definition DefaultScanBinder.h:441
bool _rect
Specifies if the position is rectangular to the surface or not.
Definition DefaultScanBinder.h:443
const StagePosition & set(int scan, EBinderStage stage, int index=-1, double frac=-1.0, bool perp=false)
Initialize function.
Definition DefaultScanBinder.h:857
int _scan
Scan index in the project list.
Definition DefaultScanBinder.h:435
std::string getName(DefaultScanBinder *) const
Gets the name of this stage position.
EBinderStage _stage
Stage in the movement process.
Definition DefaultScanBinder.h:437
bool isEqual(const StagePosition &stage_pos) const
Compares the members taking the binder stage into account.
Definition DefaultScanBinder.h:867
Definition DefaultScanBinder.h:13
ListenerList _listenerList
Holds the listeners for this instance to auto removed at destruction.
Definition DefaultScanBinder.h:460
QWidget * GetFrame() override
Overridden from base class.
EState _resumeState
State to set when motion stops.
Definition DefaultScanBinder.h:628
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 amount of approach stages between the passed two scans.
TVector< StagePosition > StagePositions
Type of list of stage positions.
Definition DefaultScanBinder.h:449
bool getStagePos(gmi::AxesCoord &pos, const StagePosition &stage_pos) const
Gets the position for the given stage at 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:454
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 wil be asked for7 confirmation.
Definition DefaultScanBinder.h:797
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:893
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:801
int getIndex() override
Overridden from base class.
EMoveMode
Definition DefaultScanBinder.h:659
@ mmBI
Bidirectional move by the scan axis.
Definition DefaultScanBinder.h:667
@ mmVEL
Continuous move by the scan axis on unlimited axis and the other axis are used in velocity mode.
Definition DefaultScanBinder.h:661
@ mmCON
Continuous move by the scan axis on unlimited axis.
Definition DefaultScanBinder.h:663
@ mmUNI
Bidirectional move by the scan axis.
Definition DefaultScanBinder.h:665
static constexpr int MAX_POSITIONS
Maximum amount of positions.
Definition DefaultScanBinder.h:63
bool checkPos(const gmi::AxesCoord &pos) const
Checks if the given position is equals the current position.
EBalance
State set when balancing needs to be called after motion completes.
Definition DefaultScanBinder.h:785
@ balACTIVE
Balancing needs to be triggered on motion position complete.
Definition DefaultScanBinder.h:789
@ balWAIT
Waiting for balance completion.
Definition DefaultScanBinder.h:791
@ balDISABLED
Balancing sequence is disabled.
Definition DefaultScanBinder.h:787
friend Scanning
Definition DefaultScanBinder.h:810
Variable::PtrVector _varsImport
Holds the imported variable pointers for iterations.
Definition DefaultScanBinder.h:761
void stateChange(EState prev, EState cur) override
Overridden from base class.
EState _afterStopState
State to set when motion stops.
Definition DefaultScanBinder.h:626
bool checkScanPos(int index, bool begin)
Checks if the position has been reached.
PositionList FPositions
Holds the list of position.
Definition DefaultScanBinder.h:552
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:795
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:519
bool initialize() override
Initializes the instance for action.
bool checkStagePos(const StagePosition &stage_pos) const
Checks if the current controller position is equals the stage position.
Variable vBalance
For switching on balance and to detect when it is ready when it is reset.
Definition DefaultScanBinder.h:775
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:458
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:632
InfoBase * createScanInfo() override
Overridden from base class.
TVariableHandler< DefaultScanBinder > _handlerVariableEventImport
Variable handler callback hook.
Definition DefaultScanBinder.h:769
Vector3D _checkOffset
Holds the check offset for the project established during checking.
Definition DefaultScanBinder.h:759
EBinderStage
Stages of operation of this scan binder. Order of these enumerates are important.
Definition DefaultScanBinder.h:364
@ bsSYSTEM
Position is at system position.
Definition DefaultScanBinder.h:366
@ bsSCAN
Position is at specified scan index.
Definition DefaultScanBinder.h:372
@ bsAPPROACH
Position is at approach position index.
Definition DefaultScanBinder.h:368
@ bsSTART
Position is at scan start.
Definition DefaultScanBinder.h:370
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:779
bool _clearCheckOffset
When enabled a change in scan index will clear the offset.
Definition DefaultScanBinder.h:799
static std::string GetSourceName(int value)
Gets the name of the given enumerate value.
bool setTrigger(int scan)
Sets the trigger to frequency or density according the axis value.
StagePosition _target
Holds the targeted stage position information.
Definition DefaultScanBinder.h:456
EPositionSource
Enumerating the position sources.
Definition DefaultScanBinder.h:30
@ psLASTENTRY
Entry to enable iteration.
Definition DefaultScanBinder.h:46
@ psPARK
Park position.
Definition DefaultScanBinder.h:36
@ psSCANSTOP
Scan method stop position.
Definition DefaultScanBinder.h:42
@ psSAFE
Scan method safe position.
Definition DefaultScanBinder.h:38
@ psSCANINDEX
Scan method index position.
Definition DefaultScanBinder.h:44
@ psSET
Position set in the structure.
Definition DefaultScanBinder.h:34
@ psNONE
For reading from stream.
Definition DefaultScanBinder.h:32
@ psSCANSTART
Scan method start position.
Definition DefaultScanBinder.h:40
bool suspend(bool immediate) override
Suspends action at a convenient position.
CheckPosition _manualPosition
Holds the last manual entered check position.
Definition DefaultScanBinder.h:803
Variable vBidirectional
To signal bidirectional was switched on.
Definition DefaultScanBinder.h:777
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 of movements of the applied command.
Definition DefaultScanBinder.h:517
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:638
@ ssABORTED
Scanning was aborted.
Definition DefaultScanBinder.h:640
@ ssREADY
Scanning has finished.
Definition DefaultScanBinder.h:654
@ ssFINISH
Finishing scanning.
Definition DefaultScanBinder.h:650
@ ssTRACE
Tracing for data in uni- or bidirectional mode.
Definition DefaultScanBinder.h:646
@ ssSTART
Start of scanning.
Definition DefaultScanBinder.h:642
@ ssSPINUP
Continuous mode axis spin up. Uses the timer.
Definition DefaultScanBinder.h:644
@ ssRETRACE
Moving back in unidirectional mode.
Definition DefaultScanBinder.h:648
@ ssRETURN
Return to position from continuous mode.
Definition DefaultScanBinder.h:652
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:630
const StagePosition _current
Holds the current stage position when the scan binder is active.
Definition DefaultScanBinder.h:452
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:823
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:558
bool operator!=(const CheckPositionList &p) const
Definition DefaultScanBinder.h:561
bool isEqual(const CheckPositionList &p) const
bool operator==(const CheckPositionList &p) const
Definition DefaultScanBinder.h:566
Structure to hold and compare check positions.
Definition DefaultScanBinder.h:115
std::string toString() const
Writes a check position to string.
CheckPosition()
Definition DefaultScanBinder.h:116
bool operator!=(const CheckPosition &p) const
Compare unequal operator.
Definition DefaultScanBinder.h:140
double _frac
Scan line fraction. Is always between 0 and 1.
Definition DefaultScanBinder.h:154
bool operator==(const CheckPosition &p) const
Compare equal operator.
Definition DefaultScanBinder.h:134
bool fromString(const std::string &s)
Reads a check position from string.
bool isEqual(const CheckPosition &p) const
Definition DefaultScanBinder.h:128
double _line
Scan line. Is always between 0 and 1.
Definition DefaultScanBinder.h:152
bool _perp
Beam perpendicular to the surface.
Definition DefaultScanBinder.h:156
CheckPosition(const CheckPosition &p)
Definition DefaultScanBinder.h:122
List of approach positions.
Definition DefaultScanBinder.h:537
bool operator==(const PositionList &p) const
Definition DefaultScanBinder.h:545
bool isEqual(const PositionList &p) const
bool operator!=(const PositionList &p) const
Definition DefaultScanBinder.h:540
Structure to hold and compare approach positions.
Definition DefaultScanBinder.h:69
gmi::AxesCoord Coord
Coordinate when not using a source.
Definition DefaultScanBinder.h:108
Position(const Position &p)
Definition DefaultScanBinder.h:75
EPositionSource Source
Uses axis information of source.
Definition DefaultScanBinder.h:106
bool operator==(const Position &p) const
Definition DefaultScanBinder.h:87
Position()
Definition DefaultScanBinder.h:70
bool isEqual(const Position &p) const
Definition DefaultScanBinder.h:82
std::string toString() const
void fromString(const std::string &s)
std::string Name
Name of the position.
Definition DefaultScanBinder.h:104
bool operator!=(const Position &p) const
Definition DefaultScanBinder.h:92
bool Enabled
Holds the enabled flag.
Definition DefaultScanBinder.h:102
Holds the safe position of all scan area in the project.
Definition DefaultScanBinder.h:576
ScanInfo(const ScanInfo &si)
Definition DefaultScanBinder.h:586
CheckPositionList _checkPositions
Holds the list of position.
Definition DefaultScanBinder.h:600
bool _straightMove
True when straight index moves are allowed.
Definition DefaultScanBinder.h:602
bool _scanGainActive
True when a scan gain needs to be added.
Definition DefaultScanBinder.h:608
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:606
gmi::AxesCoord _safePosition
Holds the scan safe position.
Definition DefaultScanBinder.h:598
ScanInfo()
Definition DefaultScanBinder.h:578
bool _balance
True when balancing is required for th acquisition device.
Definition DefaultScanBinder.h:604
Structure holding all information during the scanning state.
Definition DefaultScanBinder.h:674
void Clear()
Clears the structure to the initial state.
Definition DefaultScanBinder.h:686
EMoveMode MoveMode
The way the scan is performed.
Definition DefaultScanBinder.h:706
gmi::EAxisLocation ScanAxis
Axis used for scanning.
Definition DefaultScanBinder.h:708
ScanMethod * Method
Holds the method instance which is scanned.
Definition DefaultScanBinder.h:700
Scanning()
Default constructor.
Definition DefaultScanBinder.h:678
gmi::AxisValue Trigger
Triggering axis and density when alNA it is the frequency.
Definition DefaultScanBinder.h:714
int TargetIndex
Holds the targeted index.
Definition DefaultScanBinder.h:716
ScanInfo * Info
Holds the scan information of method which is scanned.
Definition DefaultScanBinder.h:702
ElapseTimer SpinUpTimer
Timer for delays for spinning up.
Definition DefaultScanBinder.h:710
int ScanIndex
Holds the executing scan index.
Definition DefaultScanBinder.h:698
ElapseTimer Timer
Timer for delays in the scanning process.
Definition DefaultScanBinder.h:712
EScanningStage Stage
Holds the current scan stage.
Definition DefaultScanBinder.h:704
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