10#include <math/Types.h>
19class ProjectAnalysisPropertyPage;
20class ParamMappingPropertyPage;
21class ScanMethodPositionPropertyPage;
22class ScanMethodCalibrationPropertyPage;
23class ScanMethodAcquisitionPropertyPage;
24class ScanDirectivePropertyPage;
36 : _projectData(prj_data)
76 dpiSURFACEANGLE_A = 7,
78 dpiSURFACEANGLE_B = 8,
342 const Vector3D& GetScanOffset()
const;
372 TDataFilterLinks& GetFilterLinks();
379 bool ExecuteFilters(TDataFilterEntry::EAction action = TDataFilterEntry::feaSTART);
384 const std::vector<int>& GetUsedDevices()
const;
436 virtual void HandleCursorEvent(
bool btn_down, Qt::KeyboardModifiers shift,
int index,
double frac) {}
517 std::string GetFilterConfigs();
690 virtual bool GetMeasureOffset(Vector3D& vector,
int index,
double frac,
bool rect);
728 bool LoadVariableSettingsHandler(
long vid,
Value& value);
730 void HandleParamMappingApply(QObject*);
737 void ReadWriteConfig(
bool rd);
743 void SetStatePriv(
EState state);
748 Vector3D FScanOffset;
754 std::string FNamePrefix;
761 QString FDirectiveText;
762 bool FDirectiveEnabled;
764 TDataFilterLinks FFilterLinks;
765 std::string FFilterConfigs;
766 ClusterList* FClusterList;
792 friend ScanMethodPositionPropertyPage;
793 friend ParamMappingPropertyPage;
794 friend ProjectAnalysisPropertyPage;
795 friend ScanMethodCalibrationPropertyPage;
796 friend ScanMethodAcquisitionPropertyPage;
797 friend ScanDirectivePropertyPage;
825 return FCalibrationIds;
830 return FFilterConfigs;
#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:31
Class to store application configuration. Uses the global application settings or a given ini-file.
Definition ConfigStore.h:16
Class for reading and writing ini-profiles.
Definition IniProfile.h:17
Create a local variable by calling the protected constructor.
Definition Variable.h:947
Definition ProjectData.h:23
Object for scripts to interact with the inspection project.
Definition ProjectScriptObject.h:14
Dialog containing multiple property pages.
Definition qt/PropertySheetDialog.h:14
Class for creating and referencing global created data called result data. This class allows linking ...
Definition ResultData.h:20
Definition ScanMethod.h:28
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.
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.
virtual std::ostream & Cout()
void LoadSystemSettings()
Loads the system setting associated with the scan method.
QString GetSettingsName() const
Gets the settings name.
ECalibrationType GetCalibrationType()
Gets the calibration type name.
gmi::Controller * GetController()
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.
QString GetMethodName() const
Gets this methods name.
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 overloaded 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:828
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:813
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.
ECommand
Available commands.
Definition ScanMethod.h:118
@ smcOFFSETCHANGE
Definition ScanMethod.h:134
@ smcEVALUATE
Definition ScanMethod.h:130
@ smcINIT
Definition ScanMethod.h:120
@ smcDEACTIVATE
Definition ScanMethod.h:124
@ smcSCAN
Definition ScanMethod.h:128
@ smcCHECK
Definition ScanMethod.h:126
@ smcACTIVATE
Definition ScanMethod.h:122
@ smcSTOP
Definition ScanMethod.h:132
virtual bool GetIndexPos(gmi::AxesCoord &pos, int index, double frac, bool rect)=0
Gets the axes position of specified index and scan fraction. Must be overridden in a derived class.
bool SetState(EState 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:60
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:403
@ smsACTIVE
Definition ScanMethod.h:413
@ smsCHECKING
Definition ScanMethod.h:415
@ smsSCANNING
Definition ScanMethod.h:417
@ smsREADY
Definition ScanMethod.h:411
@ smsEVALUATING
Definition ScanMethod.h:419
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 GetGenericInfoList(StringList &)=0
Gets the list of linked variables or results. Must be overridden in a derived class.
void SetIndexCount(int idx_count)
const std::vector< int > & GetUsedDevices() const
Gets the acquisition devices used.
Definition ScanMethod.h:818
void SetIndexFracRange(double start, double stop)
Sets the new scan range for defined surface.
bool DoGetIndexPos(gmi::AxesCoord &pos, int index, double frac, bool rect) 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 GetScanStart(gmi::AxesCoord &ac) const
Gets the position coordinate where the project passes control to the scan method.
virtual bool GetMeasureOffset(Vector3D &vector, int index, double frac, bool rect)
Gets the vector caused by changing measurement offsets. This means the offset caused by the A-scan de...
Definition ScanMethod.h:833
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:436
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.
bool DoGetMeasureOffset(Vector3D &vector, int index, double frac, bool rect) const
Gets the vector caused by changing measurement offsets. This means the offset caused by the A-scan de...
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()
QWidget * GetFrame()
Called by a derived class to get its UI frame pointer.
virtual void Write(IniProfile *inifile)=0
Writes the settings to the passed inifile.
virtual void DestroyFrame()
Variable::PtrVector & GetLocalVars()
Gets the local variables in a pointer vector.
Definition ScanMethod.h:808
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()
bool ClipTriggerValue(gmi::AxisValue &trigger_value)
void SetFrame(QWidget *frame)
virtual gmi::EAxisLocation GetScanAxis()=0
Gets the scan and index axis for position calculations. Must be overloaded by a derived class.
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 overloaded to do background processing.
ScanMethod(const Parameters &)
Constructor for passing general structure for derived classes create by the class factory.
virtual bool CreateFrame()
Creates a scan method UI frame if possible. Can be overloaded by a derived class.
const Vector3D & GetScanOffset() const
Gets the offset of the part to its programmed position.
Definition ScanMethod.h:803
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:823
std::string GetNamePrefix() const
Gets the name prefix.
ESystemPosition GetDirectivePosition()
??
bool SaveSystemSettings()
Saves the system setting associated with the scan method.
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 overloaded by a derived class.
Links a script to a script interpreter derived instance.
Definition ScriptLink.h:12
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
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:297
ECalibrationType
Type to identify a scan area type.
Definition ipj/iface/Namespace.h:247
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:34
QString _areaName
Mode for scanning.
Definition ScanMethod.h:43
QString _methodName
Holds the project data structure.
Definition ScanMethod.h:42
ProjectData * _projectData
Definition ScanMethod.h:41
Parameters(ProjectData *prj_data, const QString &method, const QString &area)
Definition ScanMethod.h:35
Used to create static lookup lists.
Definition ScriptObject.h:62