10#include <math/Types.h>
30 : _projectData(prj_data)
73 dpiSURFACEANGLE_A = 7,
75 dpiSURFACEANGLE_B = 8,
347 const Vector3D& GetScanOffset()
const;
377 TDataFilterLinks& GetFilterLinks();
384 bool ExecuteFilters(TDataFilterEntry::EAction action = TDataFilterEntry::feaSTART);
389 const std::vector<int>& GetUsedDevices()
const;
441 virtual void HandleCursorEvent(
bool btn_down, Qt::KeyboardModifiers shift,
int index,
double frac) {}
522 std::string GetFilterConfigs();
695 virtual bool GetMeasureOffset(Vector3D& vector,
int index,
double frac,
bool perp);
757 bool LoadVariableSettingsHandler(
long vid,
Value& value);
762 void HandleParamMappingApply(QObject*);
769 void ReadWriteConfig(
bool rd);
775 void SetStatePriv(
EState state);
784 Vector3D _scanOffset;
794 std::string _methodName;
796 std::string _namePrefix;
810 QString _directiveText;
812 bool _directiveEnabled;
816 TDataFilterLinks _filterLinks;
818 std::string _filterConfigs;
820 ClusterList* _clusterList;
873 friend class ProjectAnalysisPropertyPage;
874 friend class ScanMethodCalibrationPropertyPage;
875 friend class ScanMethodAcquisitionPropertyPage;
876 friend class ScanDirectivePropertyPage;
904 return _calibrationIds;
909 return _filterConfigs;
#define SF_DECL_IFACE(InterfaceType, ParamType, FuncName)
Declares a public static function in the class where it is used. Where: InterfaceType: Global typenam...
Definition TClassRegistration.h:71
Holds a single calibration set of parameters.
Definition CalibrationSets.h:30
Class to store application configuration. Uses the global application settings or a given ini-file.
Definition ConfigStore.h:17
Class for reading and writing ini-profiles.
Definition IniProfile.h:17
Create a local variable by calling the protected constructor.
Definition Variable.h:953
Definition ParamMappingPropertyPage.h:16
Keeps the project and all scan areas to inspect.
Definition ProjectData.h:25
Object for scripts to interact with the inspection project.
Definition ProjectScriptObject.h:14
Dialog containing multiple property pages.
Definition qt/PropertySheetDialog.h:15
Class for creating and referencing global created data called result data. This class allows linking ...
Definition ResultData.h:20
Definition ScanMethodConfigurationPropertyPage.h:15
Definition ScanMethodPositionPropertyPage.h:15
Definition ScanMethod.h:22
bool ExecuteFilters(TDataFilterEntry::EAction action=TDataFilterEntry::feaSTART)
Execute the referenced filters.
const gmi::AxesCoord & GetScanVelocity() const
Gets the velocity for the scan method to move. Actually calls the scan binder method sf::ScanBinder::...
EState GetState() const
Gets the state of the instance.
QWidget * getViewer()
Called by a derived class to get its UI widget pointer.
bool getSetValue(const IdInfo *info, Value *value, Value::vector_type *params, bool flag_set) override
Overridden from base class sf::ProjectScriptObject.
const Variable & GetMediumVelocity() const
Gets the medium sound velocity system variable.
QString GetSettingsName() const
Gets the settings name.
ECalibrationType GetCalibrationType()
Gets the calibration type name.
gmi::Controller * GetController()
Gets the allocated controller.
virtual bool GetTriggerValue(gmi::AxisValue &value)=0
Gets the axis used for triggering measurements or when the axis location is #sf::EAxisLocation::alNA ...
int GetIndexStop() const
Gets the clipped stop value of the set range.
gmi::EAxisLocation DoGetScanAxis() const
Gets the scan and index axis for position calculations. Calls the overridden GetScanAxis() method.
QString GetDirectiveText() const
Gets the directive text.
bool DoSustain(const timespec &)
Called by the inspection project to enable the derived class to do some background processing.
ConfigStore & GetSaveState()
Gets the config store for saving and restoring the state of a frame. It is probably in the projects i...
virtual bool GetFocusPos(gmi::AxesCoord &dest, int index, double frac)=0
Gets the focus position of specified index and scan fraction. Must be overridden in a derived class.
virtual bool SetAcqParams(int index, double frac)=0
Sets the project acquisition parameters/variables based on the passed index. Must be overridden by a ...
virtual bool ConvertPosition(gmi::AxesCoord &dest, const gmi::AxesCoord &src, bool to_focus) const =0
Converts a physical position to or from a focus position using the scan's configuration.
std::string GetFilterConfigs()
Gets the comma separated string of filter configuration names.
Definition ScanMethod.h:907
bool DoInitialize()
Initializes the class after the constructor is called. Final virtual functions are only valid after f...
TDataFilterLinks & GetFilterLinks()
Gets the analysis filter links.
Definition ScanMethod.h:892
virtual void StateChange(EState prev, EState cur)=0
Is called when the current state changes for a derived class to act up on. Must be overridden by a de...
const IdInfo * getInfo(const std::string &name) const override
Overridden from base class sf::ProjectScriptObject.
virtual void Read(IniProfile *inifile)=0
Reads the settings from the passed inifile.
bool IsActivated() const
Check if the scan method was activated.
~ScanMethod() override
Virtual destructor for derived classes.
QString GetMaterialName()
Gets the material name.
ECommand GetCommand()
Gets the last Issued command.
void DoAddPropertyPages(PropertySheetDialog *sheet)
Calls AddPropertyPages if the state allows it.
bool SetState(EState state)
Sets the state.
static const char * GetStateName(EState)
Gets the state name of the given state value.
virtual ScriptLink * GetScriptLink()
Gets the script link when one is associated. Can be overridden by a derived class.
EDefaultParamIndex
Default parameter ID indices for derived scan methods.
Definition ScanMethod.h:57
bool DoCreateFrame()
Creates a scan method UI frame if possible. Calls the overridden #CreateFrame() method.
bool GetRefractionAngle(double &dest, double src, bool to_medium=true)
Gets the refracted angle.
static const char * GetCommandName(ECommand)
Gets the command name of the given command value.
void DoWrite(IniEnvelope ini)
Writes the settings of the scan method. Calls eventually the overridden Write() method.
QString GetCalibrationSetName() const
Gets the calibration set name.
int GetIndexCount() const
Gets the amount of indices in the scan method.
EState
States of operation.
Definition ScanMethod.h:408
@ smsACTIVE
Definition ScanMethod.h:418
@ smsCHECKING
Definition ScanMethod.h:420
@ smsSCANNING
Definition ScanMethod.h:422
@ smsREADY
Definition ScanMethod.h:416
@ smsEVALUATING
Definition ScanMethod.h:424
bool DoGetIndexVel(gmi::AxesCoord &dest, int index) const
Gets the velocity calculated by the derived scan mode.
ProjectData * GetProjectData()
Gets the project this instance is part of.
bool DoGetTriggerValue(gmi::AxisValue &value) const
Gets the axis used for triggering measurements or when the axis location is #sf::EAxisLocation::alNA ...
int GetScanListIndex() const
Returns the scan list index of this instance in the project.
void SetAcqState(InformationServer::EState sel_state, InformationServer::EState unsel_state=InformationServer::issOff)
Sets the state on all acquisition devices.
void SetAreaName(const QString &name)
Changes the area name so it is saved by the project under this new name.
virtual bool GetIndexVel(gmi::AxesCoord &dest, int index)=0
Gets the velocity calculated by the derived scan mode. Must be overridden in a derived class.
bool DoConvertPosition(gmi::AxesCoord &dest, const gmi::AxesCoord &src, bool to_focus) const
Converts a physical position to or from a focus position using the scan's configuration....
virtual bool createViewer()
Creates a scan method UI frame if possible. Can be overridden by a derived class.
virtual bool GetGenericInfoList(StringList &)=0
Gets the list of linked variables or results. Must be overridden in a derived class.
void SetIndexCount(int idx_count)
A derived classes uses this function to set the index count for the scan method initialization.
const std::vector< int > & GetUsedDevices() const
Gets the acquisition devices used.
Definition ScanMethod.h:897
void SetIndexFracRange(double start, double stop)
Sets the new scan range for defined surface.
bool DoGetIndexPos(gmi::AxesCoord &pos, int index, double frac, bool perp) const
Gets the axes position calculated by the derived scan mode. Actually calls the overridden GetIndexPos...
QString GetToolName()
Gets the tool name.
const ScanBinder::InfoBase * GetScanInfo() const
Gets the binder information of this scan method instance. Actually calls #sf::ScanBinder::GetScanInfo...
const Variable & GetMaterialVelocity() const
Gets the material sound velocity system variable.
bool DoGetFocusPos(gmi::AxesCoord &dest, int index, double frac) const
Gets the focus position calculated by the derived scan mode. Actually calls the overridden GetFocusPo...
bool SaveSystemSettings(const QString &settings)
Saves the system setting associated with the scan method.
bool GetScanStart(gmi::AxesCoord &ac) const
Gets the position coordinate where the project passes control to the scan method.
void setViewer(QWidget *viewer)
Called by a derived class to set its frame pointer.
virtual void HandleCursorEvent(bool btn_down, Qt::KeyboardModifiers shift, int index, double frac)
Can be overridden to handle cursor events when the scan is selected in the project.
Definition ScanMethod.h:441
const gmi::AxesCoord & GetScanAcceleration() const
Gets the acceleration for the scan method to move. Actually calls the scan binder method sf::ScanBind...
bool Execute(ECommand cmd)
Calls HandleCommand() after several checks.
int GetIndexStart() const
Gets the clipped start value of the set range.
virtual std::ostream & cout()
Gets a output stream to print error or no error information to std::cout. Which can be overridden to ...
QString GetElementName()
Gets the element name.
bool IsCalibReady()
Checks if the calibration is complete.
virtual bool HandleCommand(ECommand cmd)=0
Handles the command given by Execute(). Must be overridden in a derived class.
void DoRead(IniEnvelope ini)
Reads the settings of the scan method. Calls eventually the overridden Read() method.
bool UpdatePositionsData()
Refills the positions result.
ECommand
Available commands.
Definition ScanMethod.h:120
@ smcOFFSETCHANGE
Handle the binder offset has changed.
Definition ScanMethod.h:137
@ smcEVALUATE
Start scan evaluation by setting running mode.
Definition ScanMethod.h:133
@ smcINIT
Initialize the scan method instance after properties have been set.
Definition ScanMethod.h:123
@ smcDEACTIVATE
Deactivate scan method.
Definition ScanMethod.h:127
@ smcSCAN
Start scan recording.
Definition ScanMethod.h:131
@ smcCHECK
Start checking by setting running mode.
Definition ScanMethod.h:129
@ smcACTIVATE
Activate scan method.
Definition ScanMethod.h:125
@ smcSTOP
Stop scan recording.
Definition ScanMethod.h:135
virtual bool GetIndexPos(gmi::AxesCoord &pos, int index, double frac, bool perp)=0
Gets the axes position of specified index and scan fraction. Must be overridden in a derived class.
virtual void Write(IniProfile *inifile)=0
Writes the settings to the passed inifile.
bool DoGetMeasureOffset(Vector3D &vector, int index, double frac, bool perp) const
Gets the vector caused by changing measurement offsets. This means the offset caused by the A-scan de...
Variable::PtrVector & GetLocalVars()
Gets the local variables in a pointer vector.
Definition ScanMethod.h:887
bool FilterHandler(TDataFilterLink *, EFilterNotifyCode fnc)
Event handler for filter events which are passed to the scan method script.
QString GetAreaName() const
Gets the area name of the scan entry.
virtual bool Initialize()=0
Initializes the scan method. Must be overridden by a derived class.
bool DoSetAcqParams(int index, double frac)
Calls the overridden SetAcqParams() method on the derived class.
InformationTypes::id_type GetIdOffset()
Gets Offset used to create the local ID's with for exporting.
bool ClipTriggerValue(gmi::AxisValue &trigger_value)
Clips a trigger value to a value which is allowed by the controller. Is to be used by property pages ...
virtual bool GetMeasureOffset(Vector3D &vector, int index, double frac, bool perp)
Gets the vector caused by changing measurement offsets. This means the offset caused by the A-scan de...
Definition ScanMethod.h:912
virtual gmi::EAxisLocation GetScanAxis()=0
Gets the scan and index axis for position calculations. Must be overridden by a derived class.
virtual void DestroyViewer()
Called before a scan method is deleted.
bool GetScanStop(gmi::AxesCoord &ac) const
Gets the position where the scan method passes control to the project.
virtual bool Sustain(const timespec &ts)
Can be overridden to do background processing.
ScanMethod(const Parameters &)
Constructor for passing general structure for derived classes create by the class factory.
const std::string & GetMethodName() const
Gets this methods name.
const Vector3D & GetScanOffset() const
Gets the offset of the part to its programmed position.
Definition ScanMethod.h:882
void LoadSystemSettings(const QString &settings={})
Loads the system setting associated with the scan method overriding the settings from the selected ca...
Vector3D GetOffset() const
Gets the total offsets added.
bool GetDirectiveEnabled() const
Gets the flag weather the directive is enabled.
InformationTypes::IdVector & GetCalibrationIds()
Gets the calibration ids.
Definition ScanMethod.h:902
std::string GetNamePrefix() const
Gets the name prefix.
ESystemPosition GetDirectivePosition()
??
bool Reinitialize()
When the state is ready the scan method can be reinitialize. After changes are made to the settings f...
virtual void AddPropertyPages(PropertySheetDialog *sheet)
Adds scan method specific property pages to the passed sheet. Can be overridden by a derived class.
Links a script to a script interpreter derived instance.
Definition ScriptLink.h:12
Template for linking pointers of member function to Variable instances.
Definition VariableHandler.h:38
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
#define _IPJ_CLASS
Definition ipj/iface/global.h:35
EAxisLocation
Enumeration of axis locations.
Definition GmiTypes.h:81
Definition Application.h:10
ESystemPosition
Fixed system dependent axis positions.
Definition ipj/iface/Namespace.h:239
ECalibrationType
Type to identify a scan area type.
Definition ipj/iface/Namespace.h:187
Structure used a base class for derived binder classes to store scan dependant information.
Definition ScanBinder.h:36
Mandatory structure for initialization of derived class.
Definition ScanMethod.h:28
QString _areaName
Area name for scanning.
Definition ScanMethod.h:40
QString _methodName
Mode for scanning.
Definition ScanMethod.h:38
ProjectData * _projectData
Holds the project data structure.
Definition ScanMethod.h:36
Parameters(ProjectData *prj_data, const QString &method, const QString &area)
Definition ScanMethod.h:29
Used to create static lookup lists.
Definition ScriptObject.h:62