Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::ScanMethod Class Referenceabstract

#include <ScanMethod.h>

Inheritance diagram for sf::ScanMethod:
Collaboration diagram for sf::ScanMethod:

Classes

struct  Parameters
 Mandatory structure for initialization of derived class. More...
 

Public Types

enum  EDefaultParamIndex {
  dpiINDEXCOUNT = 0 , dpiINDEXDENS = 1 , dpiSCANDENS = 2 , dpiSCANLEN = 3 ,
  dpiDENSMODE = 4 , dpiANGLE_A = 5 , dpiANGLE_B = 6 , dpiSURFACEANGLE_A = 7 ,
  dpiSURFACEANGLE_B = 8 , dpiGATEMODE = 10 , dpiDEPTH = 23 , dpiDEPTHFACTOR = 24 ,
  dpiLAST = 0x100
}
 Default parameter ID indices for derived scan methods. More...
 
enum  ECommand {
  smcINIT , smcACTIVATE , smcDEACTIVATE , smcCHECK ,
  smcSCAN , smcEVALUATE , smcSTOP , smcOFFSETCHANGE
}
 Available commands. More...
 
enum  EState {
  smsCFGERR = -2 , smsERROR = -1 , smsNOINIT = 0 , smsREADY ,
  smsACTIVE , smsCHECKING , smsSCANNING , smsEVALUATING ,
  smsLASTENTRY
}
 States of operation. More...
 
- Public Types inherited from sf::ScriptObject
enum  EIdentifier {
  idUnknown = 0 , idConstant , idVariable , idFunction ,
  idTypedef , idKeyword
}
 Keyword identifiers. More...
 
typedef std::string::size_type pos_type
 Source position type.
 
typedef ssize_t ip_type
 Instruction pointer type.
 

Public Member Functions

 ScanMethod (const Parameters &)
 Constructor for passing general structure for derived classes create by the class factory.
 
 ~ScanMethod () override
 Virtual destructor for derived classes.
 
void SetAreaName (const QString &name)
 Changes the area name so it is saved by the project under this new name.
 
QString GetAreaName () const
 Gets the area name of the scan entry.
 
bool DoInitialize ()
 Initializes the class after the constructor is called. Final virtual functions are only valid after full construction of a scan method. This function actually calls virtual function Initialize.
 
virtual void DestroyFrame ()
 
virtual std::ostream & Cout ()
 
bool Execute (ECommand cmd)
 Calls HandleCommand() after several checks.
 
ECommand GetCommand ()
 Gets the last Issued command.
 
void DoAddPropertyPages (PropertySheetDialog *sheet)
 Calls AddPropertyPages if the state allows it.
 
void SetIndexFracRange (double start, double stop)
 Sets the new scan range for defined surface.
 
int GetIndexCount () const
 Gets the amount of indices in the scan method.
 
int GetIndexStart () const
 Gets the clipped start value of the set range.
 
int GetIndexStop () const
 Gets the clipped stop value of the set range.
 
int GetScanListIndex () const
 Returns the scan list index of this instance in the project.
 
bool Reinitialize ()
 When the state is ready the scan method can be reinitialize. After changes are made to the settings for example.
 
void DoRead (IniEnvelope ini)
 Reads the settings of the scan method. Calls eventually the overridden Read() method.
 
void DoWrite (IniEnvelope ini)
 Writes the settings of the scan method. Calls eventually the overridden Write() method.
 
void LoadSystemSettings ()
 Loads the system setting associated with the scan method.
 
bool SaveSystemSettings ()
 Saves the system setting associated with the scan method.
 
bool IsActivated () const
 Check if the scan method was activated.
 
bool DoSustain (const timespec &)
 Called by the inspection project to enable the derived class to do some background processing.
 
bool DoCreateFrame ()
 Creates a scan method UI frame if possible. Calls the overridden CreateFrame() method.
 
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. Actually calls the overridden ConvertPosition() method.
 
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() method.
 
bool DoGetFocusPos (gmi::AxesCoord &dest, int index, double frac) const
 Gets the focus position calculated by the derived scan mode. Actually calls the overridden GetFocusPos() method.
 
bool DoGetIndexVel (gmi::AxesCoord &dest, int index) const
 Gets the velocity calculated by the derived scan mode.
 
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 delay change.
 
bool DoSetAcqParams (int index, double frac)
 Calls the overridden SetAcqParams() method on the derived class.
 
bool DoGetTriggerValue (gmi::AxisValue &value) const
 Gets the axis used for triggering measurements or when the axis location is #sf::EAxisLocation::alNA the internal generation is to be used. Calls the overridden GetTriggerValue() method.
 
gmi::EAxisLocation DoGetScanAxis () const
 Gets the scan and index axis for position calculations. Calls the overridden GetScanAxis() method.
 
bool GetScanStart (gmi::AxesCoord &ac) const
 Gets the position coordinate where the project passes control to the scan method.
 
bool GetScanStop (gmi::AxesCoord &ac) const
 Gets the position where the scan method passes control to the project.
 
const gmi::AxesCoordGetScanVelocity () const
 Gets the velocity for the scan method to move. Actually calls the scan binder method sf::ScanBinder::GetVelocity().
 
const gmi::AxesCoordGetScanAcceleration () const
 Gets the acceleration for the scan method to move. Actually calls the scan binder method sf::ScanBinder::GetVelocity().
 
const ScanBinder::InfoBaseGetScanInfo () const
 Gets the binder information of this scan method instance. Actually calls sf::ScanBinder::GetScanInfo().
 
const Vector3D & GetScanOffset () const
 Gets the offset of the part to its programmed position.
 
Vector3D GetOffset () const
 Gets the total offsets added.
 
const VariableGetMediumVelocity () const
 Gets the medium sound velocity system variable.
 
const VariableGetMaterialVelocity () const
 Gets the material sound velocity system variable.
 
bool GetRefractionAngle (double &dest, double src, bool to_medium=true)
 Gets the refracted angle.
 
TDataFilterLinks & GetFilterLinks ()
 Gets the analysis filter links.
 
bool ExecuteFilters (TDataFilterEntry::EAction action=TDataFilterEntry::feaSTART)
 Execute the referenced filters.
 
const std::vector< int > & GetUsedDevices () const
 Gets the acquisition devices used.
 
bool IsCalibReady ()
 Checks if the calibration is complete.
 
void SetAcqState (InformationServer::EState sel_state, InformationServer::EState unsel_state=InformationServer::issOff)
 Sets the state on all acquisition devices.
 
EState GetState () const
 Gets the state of the instance.
 
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.
 
ProjectDataGetProjectData ()
 Gets the project this instance is part of.
 
QString GetMethodName () const
 Gets this methods name.
 
QString GetDirectiveText () const
 Gets the directive text.
 
bool GetDirectiveEnabled () const
 Gets the flag weather the directive is enabled.
 
ESystemPosition GetDirectivePosition ()
 ??
 
QString GetElementName ()
 Gets the element name.
 
QString GetToolName ()
 Gets the tool name.
 
QString GetMaterialName ()
 Gets the material name.
 
QString GetSettingsName () const
 Gets the settings name.
 
std::string GetNamePrefix () const
 Gets the name prefix.
 
ECalibrationType GetCalibrationType ()
 Gets the calibration type name.
 
QString GetCalibrationSetName () const
 Gets the calibration set name.
 
InformationTypes::IdVectorGetCalibrationIds ()
 Gets the calibration ids.
 
std::string GetFilterConfigs ()
 Gets the comma separated string of filter configuration names.
 
Variable::PtrVectorGetLocalVars ()
 Gets the local variables in a pointer vector.
 
QWidget * GetFrame ()
 Called by a derived class to get its UI frame pointer.
 
- Public Member Functions inherited from sf::ProjectScriptObject
 ProjectScriptObject (const char *type_name)
 Constructor.
 
 ~ProjectScriptObject () override
 Virtual overridden destructor.
 
void AddScriptParam (const std::string &name, Variable *variable)
 Adds the passed variable as a parameter in the script.
 
- Public Member Functions inherited from sf::ScriptObject
 ScriptObject (const char *type_name, ScriptObject *parent=nullptr)
 
virtual ~ScriptObject ()=default
 Virtual destructor which can be overloaded to clean up objects.
 
virtual std::string getStatusText ()
 Gets the status text of this object for debugging purposes.
 
int getRefCount () const
 Gets the reference count.
 
 operator Value () const
 Cast operator to be able to return this instance as a Value.
 
std::string getTypeName () const
 Returns the type name Set at the constructor.
 
ScriptObjectgetParent ()
 Gets the script object owner.
 
const ScriptObjectgetParent () const
 Gets the script object owner.
 
ScriptObjectcastToObject (const Value &value)
 Casts a sf::Value::vitCustom typed sf::Value to a ScriptObject typed pointer.
 

Static Public Member Functions

static const char * GetStateName (EState)
 Gets the state name of the given state value.
 
static const char * GetCommandName (ECommand)
 Gets the command name of the given command value.
 
- Static Public Member Functions inherited from sf::ScriptObject
static const IdInfogetInfoUnknown ()
 Returns the static Info structure for unknowns.
 

Protected Member Functions

ConfigStoreGetSaveState ()
 Gets the config store for saving and restoring the state of a frame. It is probably in the projects ini-profile.
 
const IdInfogetInfo (const std::string &name) const override
 Overridden from base class sf::ProjectScriptObject.
 
bool getSetValue (const IdInfo *info, Value *value, Value::vector_type *params, bool flag_set) override
 Overridden from base class sf::ProjectScriptObject.
 
virtual bool CreateFrame ()
 Creates a scan method UI frame if possible. Can be overloaded by a derived class.
 
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.
 
virtual ScriptLinkGetScriptLink ()
 Gets the script link when one is associated. Can be overridden by a derived class.
 
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 derived class.
 
virtual bool Initialize ()=0
 Initializes the scan method. Must be overridden by a derived class.
 
virtual void Read (IniProfile *inifile)=0
 Reads the settings from the passed inifile.
 
virtual void Write (IniProfile *inifile)=0
 Writes the settings to the passed inifile.
 
virtual bool GetGenericInfoList (StringList &)=0
 Gets the list of linked variables or results. Must be overridden in a derived class.
 
virtual bool Sustain (const timespec &ts)
 Can be overloaded to do background processing.
 
virtual bool HandleCommand (ECommand cmd)=0
 Handles the command given by Execute(). Must be overridden in a derived class.
 
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.
 
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 GetIndexVel (gmi::AxesCoord &dest, int index)=0
 Gets the velocity calculated by the derived scan mode. Must be overridden in a derived class.
 
virtual bool GetTriggerValue (gmi::AxisValue &value)=0
 Gets the axis used for triggering measurements or when the axis location is #sf::EAxisLocation::alNA the internal generation is to be used. Must be overridden in a derived class.
 
virtual gmi::EAxisLocation GetScanAxis ()=0
 Gets the scan and index axis for position calculations. Must be overloaded by 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 derived class.
 
virtual void AddPropertyPages (PropertySheetDialog *sheet)
 Adds scan method specific property pages to the passed sheet. Can be overloaded by a derived class.
 
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 delay change. Can be overloaded by a derived class.
 
bool FilterHandler (TDataFilterLink *, EFilterNotifyCode fnc)
 Event handler for filter events which are passed to the scan method script.
 
bool UpdatePositionsData ()
 
bool SetState (EState state)
 
void SetFrame (QWidget *frame)
 
gmi::ControllerGetController ()
 
bool ClipTriggerValue (gmi::AxisValue &trigger_value)
 
void SetIndexCount (int idx_count)
 
InformationTypes::id_type GetIdOffset ()
 
- Protected Member Functions inherited from sf::ProjectScriptObject
void destroyObject (bool &should_delete) override
 Overridden from base class.
 
- Protected Member Functions inherited from sf::ScriptObject
void makeParent (ScriptObject *so)
 Makes this object the owner of the other object.
 
void setParent (ScriptObject *parent)
 Sets the owner to the pass script object.
 

Member Enumeration Documentation

◆ ECommand

Available commands.

Enumerator
smcINIT 

Initialize the scan method instance after properties have been set.

smcACTIVATE 

Activate scan method.

smcDEACTIVATE 

Deactivate scan method.

smcCHECK 

Start checking by setting running mode.

smcSCAN 

Start scan recording.

smcEVALUATE 

Start scan evaluation by setting running mode.

smcSTOP 

Stop scan recording.

smcOFFSETCHANGE 

Handle the binder offset has changed.

◆ EDefaultParamIndex

Default parameter ID indices for derived scan methods.

Enumerator
dpiINDEXCOUNT 

Amount of index steps.

dpiINDEXDENS 

Index density.

dpiSCANDENS 

Scan width or length.

dpiSCANLEN 

Scan width or length.

dpiDENSMODE 

Density mode where 0 = Static and 1 = Dynamic.

dpiANGLE_A 

Angle A in the material.

dpiANGLE_B 

Angle B in the material.

dpiSURFACEANGLE_A 

Angle A on the surface.

dpiSURFACEANGLE_B 

Angle B on the surface.

dpiGATEMODE 

Positioning of the gates.

dpiDEPTH 

Actual depth into to the material rectangular to the surface.

dpiDEPTHFACTOR 

Factor between depth and material distance.

dpiLAST 

◆ EState

States of operation.

Enumerator
smsCFGERR 

Scan a configuration error.

smsERROR 

Execution resulted in an error.

smsNOINIT 

Scan has not been initialized.

smsREADY 

Execution has finished successfully or can be activated.

smsACTIVE 

Scan is activated.

smsCHECKING 

Instance is in checking mode.

smsSCANNING 

Instance is in scanning mode.

smsEVALUATING 

Instance is in evaluation mode.

smsLASTENTRY 

For proframming iterations.

Constructor & Destructor Documentation

◆ ScanMethod()

sf::ScanMethod::ScanMethod ( const Parameters )
explicit

Constructor for passing general structure for derived classes create by the class factory.

◆ ~ScanMethod()

sf::ScanMethod::~ScanMethod ( )
override

Virtual destructor for derived classes.

Member Function Documentation

◆ AddPropertyPages()

virtual void sf::ScanMethod::AddPropertyPages ( PropertySheetDialog sheet)
protectedvirtual

Adds scan method specific property pages to the passed sheet. Can be overloaded by a derived class.

Parameters
sheet
Todo:
make this method pure virtual by adding the page addition to AddPropertyPages() method.

Reimplemented in sf::ipj::LineScanMethod, sf::ipj::MeanderScanMethod, and sf::ipj::ToolBaseScanMethod.

◆ ClipTriggerValue()

bool sf::ScanMethod::ClipTriggerValue ( gmi::AxisValue trigger_value)
protected

◆ ConvertPosition()

virtual bool sf::ScanMethod::ConvertPosition ( gmi::AxesCoord dest,
const gmi::AxesCoord src,
bool  to_focus 
) const
protectedpure virtual

Converts a physical position to or from a focus position using the scan's configuration.

Parameters
destReturns the focus coordinate.
srcSource physical coordinate.
to_focusDirection focus or physical.
Returns
True on a succes.

Implemented in sf::ipj::MeanderScanMethod, and sf::ipj::ToolBaseScanMethod.

◆ Cout()

virtual std::ostream & sf::ScanMethod::Cout ( )
virtual

◆ CreateFrame()

virtual bool sf::ScanMethod::CreateFrame ( )
protectedvirtual

Creates a scan method UI frame if possible. Can be overloaded by a derived class.

Returns
True when successful.

Reimplemented in sf::ipj::LineScanMethod, and sf::ipj::MeanderScanMethod.

◆ DestroyFrame()

virtual void sf::ScanMethod::DestroyFrame ( )
virtual

◆ DoAddPropertyPages()

void sf::ScanMethod::DoAddPropertyPages ( PropertySheetDialog sheet)

Calls AddPropertyPages if the state allows it.

Parameters
sheetSheet to attach the pages to.

◆ DoConvertPosition()

bool sf::ScanMethod::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. Actually calls the overridden ConvertPosition() method.

Parameters
destReturns the focus/physical coordinate.
srcSource physical/focus coordinate.
to_focusDirection focus or physical.
Returns
True on a succes.

◆ DoCreateFrame()

bool sf::ScanMethod::DoCreateFrame ( )

Creates a scan method UI frame if possible. Calls the overridden CreateFrame() method.

◆ DoGetFocusPos()

bool sf::ScanMethod::DoGetFocusPos ( gmi::AxesCoord dest,
int  index,
double  frac 
) const

Gets the focus position calculated by the derived scan mode. Actually calls the overridden GetFocusPos() method.

Parameters
destReturns the position coordinate.
indexMeasurement indexed position.
fracScan line fraction.
Returns
True on success.

◆ DoGetIndexPos()

bool sf::ScanMethod::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() method.

Parameters
posReturns the axes coordinated.
indexMeasurement indexed position.
fracScan line fraction.
rectWhen true the rectangular position if possible is returned.
Returns
True on success.

◆ DoGetIndexVel()

bool sf::ScanMethod::DoGetIndexVel ( gmi::AxesCoord dest,
int  index 
) const

Gets the velocity calculated by the derived scan mode.

Parameters
destReturns the velocity coordinate.
indexMeasurement indexed position.
Returns
True on success.

◆ DoGetMeasureOffset()

bool sf::ScanMethod::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 delay change.

Parameters
vector
indexMeasurement indexed position.
fracScan line fraction.
rectWhen true the rectangular position if possible is returned.
Returns
True on success.

◆ DoGetScanAxis()

gmi::EAxisLocation sf::ScanMethod::DoGetScanAxis ( ) const

Gets the scan and index axis for position calculations. Calls the overridden GetScanAxis() method.

Returns
Scan axis location.

◆ DoGetTriggerValue()

bool sf::ScanMethod::DoGetTriggerValue ( gmi::AxisValue value) const

Gets the axis used for triggering measurements or when the axis location is #sf::EAxisLocation::alNA the internal generation is to be used. Calls the overridden GetTriggerValue() method.

Parameters
valueAxis value.
Returns
True on success.

◆ DoInitialize()

bool sf::ScanMethod::DoInitialize ( )

Initializes the class after the constructor is called. Final virtual functions are only valid after full construction of a scan method. This function actually calls virtual function Initialize.

Returns
True on success.

◆ DoRead()

void sf::ScanMethod::DoRead ( IniEnvelope  ini)

Reads the settings of the scan method. Calls eventually the overridden Read() method.

◆ DoSetAcqParams()

bool sf::ScanMethod::DoSetAcqParams ( int  index,
double  frac 
)

Calls the overridden SetAcqParams() method on the derived class.

Parameters
indexMeasurement indexed position.
fracScan line fraction.
Returns
True on success.

◆ DoSustain()

bool sf::ScanMethod::DoSustain ( const timespec &  )

Called by the inspection project to enable the derived class to do some background processing.

Returns
False when an exception is intercepted.

◆ DoWrite()

void sf::ScanMethod::DoWrite ( IniEnvelope  ini)

Writes the settings of the scan method. Calls eventually the overridden Write() method.

◆ Execute()

bool sf::ScanMethod::Execute ( ECommand  cmd)

Calls HandleCommand() after several checks.

Parameters
cmdCommand to handle.
Returns
True when successful.

◆ ExecuteFilters()

bool sf::ScanMethod::ExecuteFilters ( TDataFilterEntry::EAction  action = TDataFilterEntry::feaSTART)

Execute the referenced filters.

Parameters
actionAction to perform by the filter list.
Returns
True when successful.

◆ FilterHandler()

bool sf::ScanMethod::FilterHandler ( TDataFilterLink *  ,
EFilterNotifyCode  fnc 
)
protected

Event handler for filter events which are passed to the scan method script.

Parameters
fncNotification code.
Returns
True on success.

◆ GetAreaName()

QString sf::ScanMethod::GetAreaName ( ) const

Gets the area name of the scan entry.

◆ GetCalibrationIds()

InformationTypes::IdVector & sf::ScanMethod::GetCalibrationIds ( )
inline

Gets the calibration ids.

◆ GetCalibrationSetName()

QString sf::ScanMethod::GetCalibrationSetName ( ) const

Gets the calibration set name.

◆ GetCalibrationType()

ECalibrationType sf::ScanMethod::GetCalibrationType ( )

Gets the calibration type name.

◆ GetCommand()

ECommand sf::ScanMethod::GetCommand ( )

Gets the last Issued command.

Returns
Command last issued.

◆ GetCommandName()

static const char * sf::ScanMethod::GetCommandName ( ECommand  )
static

Gets the command name of the given command value.

◆ GetController()

gmi::Controller * sf::ScanMethod::GetController ( )
protected

◆ GetDirectiveEnabled()

bool sf::ScanMethod::GetDirectiveEnabled ( ) const

Gets the flag weather the directive is enabled.

◆ GetDirectivePosition()

ESystemPosition sf::ScanMethod::GetDirectivePosition ( )

??

Todo:
Add comment what this function does.

◆ GetDirectiveText()

QString sf::ScanMethod::GetDirectiveText ( ) const

Gets the directive text.

◆ GetElementName()

QString sf::ScanMethod::GetElementName ( )

Gets the element name.

◆ GetFilterConfigs()

std::string sf::ScanMethod::GetFilterConfigs ( )
inline

Gets the comma separated string of filter configuration names.

◆ GetFilterLinks()

TDataFilterLinks & sf::ScanMethod::GetFilterLinks ( )
inline

Gets the analysis filter links.

◆ GetFocusPos()

virtual bool sf::ScanMethod::GetFocusPos ( gmi::AxesCoord dest,
int  index,
double  frac 
)
protectedpure virtual

Gets the focus position of specified index and scan fraction. Must be overridden in a derived class.

Parameters
destReturns the position coordinate.
indexMeasurement indexed position.
fracScan line fraction.
Returns
True when successful.

Implemented in sf::ipj::MeanderScanMethod, and sf::ipj::ToolBaseScanMethod.

◆ GetFrame()

QWidget * sf::ScanMethod::GetFrame ( )

Called by a derived class to get its UI frame pointer.

◆ GetGenericInfoList()

virtual bool sf::ScanMethod::GetGenericInfoList ( StringList )
protectedpure virtual

Gets the list of linked variables or results. Must be overridden in a derived class.

Implemented in sf::ipj::LineScanMethod, sf::ipj::MeanderScanMethod, and sf::ipj::ToolBaseScanMethod.

◆ GetIdOffset()

InformationTypes::id_type sf::ScanMethod::GetIdOffset ( )
protected

◆ GetIndexCount()

int sf::ScanMethod::GetIndexCount ( ) const

Gets the amount of indices in the scan method.

◆ GetIndexPos()

virtual bool sf::ScanMethod::GetIndexPos ( gmi::AxesCoord pos,
int  index,
double  frac,
bool  rect 
)
protectedpure virtual

Gets the axes position of specified index and scan fraction. Must be overridden in a derived class.

Parameters
posReturns the axes coordinated.
indexMeasurement indexed position.
fracScan line fraction.
rectWhen true the rectangular position if possible is returned.
Returns
True ion success.

Implemented in sf::ipj::MeanderScanMethod, and sf::ipj::ToolBaseScanMethod.

◆ GetIndexStart()

int sf::ScanMethod::GetIndexStart ( ) const

Gets the clipped start value of the set range.

◆ GetIndexStop()

int sf::ScanMethod::GetIndexStop ( ) const

Gets the clipped stop value of the set range.

◆ GetIndexVel()

virtual bool sf::ScanMethod::GetIndexVel ( gmi::AxesCoord dest,
int  index 
)
protectedpure virtual

Gets the velocity calculated by the derived scan mode. Must be overridden in a derived class.

Parameters
destReturns the velocity coordinate.
indexMeasurement indexed position.
Returns
True on success.

Implemented in sf::ipj::LineScanMethod, and sf::ipj::MeanderScanMethod.

◆ getInfo()

const IdInfo * sf::ScanMethod::getInfo ( const std::string &  name) const
overrideprotectedvirtual

Overridden from base class sf::ProjectScriptObject.

Reimplemented from sf::ProjectScriptObject.

◆ GetLocalVars()

Variable::PtrVector & sf::ScanMethod::GetLocalVars ( )
inline

Gets the local variables in a pointer vector.

◆ GetMaterialName()

QString sf::ScanMethod::GetMaterialName ( )

Gets the material name.

◆ GetMaterialVelocity()

const Variable & sf::ScanMethod::GetMaterialVelocity ( ) const

Gets the material sound velocity system variable.

◆ GetMeasureOffset()

bool sf::ScanMethod::GetMeasureOffset ( Vector3D &  vector,
int  index,
double  frac,
bool  rect 
)
inlineprotectedvirtual

Gets the vector caused by changing measurement offsets. This means the offset caused by the A-scan delay change. Can be overloaded by a derived class.

Parameters
vector
indexMeasurement indexed position.
fracScan line fraction.
rectWhen true the rectangular position if possible is returned.
Returns
True on success.

Reimplemented in sf::ipj::ToolBaseScanMethod.

◆ GetMediumVelocity()

const Variable & sf::ScanMethod::GetMediumVelocity ( ) const

Gets the medium sound velocity system variable.

◆ GetMethodName()

QString sf::ScanMethod::GetMethodName ( ) const

Gets this methods name.

◆ GetNamePrefix()

std::string sf::ScanMethod::GetNamePrefix ( ) const

Gets the name prefix.

◆ GetOffset()

Vector3D sf::ScanMethod::GetOffset ( ) const

Gets the total offsets added.

Returns
3D Vector.

◆ GetProjectData()

ProjectData * sf::ScanMethod::GetProjectData ( )

Gets the project this instance is part of.

◆ GetRefractionAngle()

bool sf::ScanMethod::GetRefractionAngle ( double &  dest,
double  src,
bool  to_medium = true 
)

Gets the refracted angle.

Parameters
destReceives the resulting angle.
src
to_medium
Returns

◆ GetSaveState()

ConfigStore & sf::ScanMethod::GetSaveState ( )
protected

Gets the config store for saving and restoring the state of a frame. It is probably in the projects ini-profile.

Returns
Reference to the config store.

◆ GetScanAcceleration()

const gmi::AxesCoord & sf::ScanMethod::GetScanAcceleration ( ) const

Gets the acceleration for the scan method to move. Actually calls the scan binder method sf::ScanBinder::GetVelocity().

Returns
Acceleration coordinate.

◆ GetScanAxis()

virtual gmi::EAxisLocation sf::ScanMethod::GetScanAxis ( )
protectedpure virtual

Gets the scan and index axis for position calculations. Must be overloaded by a derived class.

Returns
Scan axis location.

Implemented in sf::ipj::LineScanMethod, and sf::ipj::MeanderScanMethod.

◆ GetScanInfo()

const ScanBinder::InfoBase * sf::ScanMethod::GetScanInfo ( ) const

Gets the binder information of this scan method instance. Actually calls sf::ScanBinder::GetScanInfo().

◆ GetScanListIndex()

int sf::ScanMethod::GetScanListIndex ( ) const

Returns the scan list index of this instance in the project.

◆ GetScanOffset()

const Vector3D & sf::ScanMethod::GetScanOffset ( ) const
inline

Gets the offset of the part to its programmed position.

Returns

◆ GetScanStart()

bool sf::ScanMethod::GetScanStart ( gmi::AxesCoord ac) const

Gets the position coordinate where the project passes control to the scan method.

Parameters
acReturns the axes coordinate.
Returns
True on success.

◆ GetScanStop()

bool sf::ScanMethod::GetScanStop ( gmi::AxesCoord ac) const

Gets the position where the scan method passes control to the project.

Parameters
acReturns the axes coordinate.
Returns
True on success.

◆ GetScanVelocity()

const gmi::AxesCoord & sf::ScanMethod::GetScanVelocity ( ) const

Gets the velocity for the scan method to move. Actually calls the scan binder method sf::ScanBinder::GetVelocity().

Returns
Velocity coordinate.

◆ GetScriptLink()

virtual ScriptLink * sf::ScanMethod::GetScriptLink ( )
protectedvirtual

Gets the script link when one is associated. Can be overridden by a derived class.

Returns
nullptr since it is not implemented.

Reimplemented in sf::ipj::MeanderScanMethod.

◆ GetSettingsName()

QString sf::ScanMethod::GetSettingsName ( ) const

Gets the settings name.

◆ getSetValue()

bool sf::ScanMethod::getSetValue ( const IdInfo info,
Value value,
Value::vector_type params,
bool  flag_set 
)
overrideprotectedvirtual

Overridden from base class sf::ProjectScriptObject.

Reimplemented from sf::ProjectScriptObject.

◆ GetState()

EState sf::ScanMethod::GetState ( ) const

Gets the state of the instance.

◆ GetStateName()

static const char * sf::ScanMethod::GetStateName ( EState  )
static

Gets the state name of the given state value.

◆ GetToolName()

QString sf::ScanMethod::GetToolName ( )

Gets the tool name.

◆ GetTriggerValue()

virtual bool sf::ScanMethod::GetTriggerValue ( gmi::AxisValue value)
protectedpure virtual

Gets the axis used for triggering measurements or when the axis location is #sf::EAxisLocation::alNA the internal generation is to be used. Must be overridden in a derived class.

Parameters
valueAxis value.
Returns
True on success.

Implemented in sf::ipj::MeanderScanMethod, and sf::ipj::LineScanMethod.

◆ GetUsedDevices()

const std::vector< int > & sf::ScanMethod::GetUsedDevices ( ) const
inline

Gets the acquisition devices used.

◆ HandleCommand()

virtual bool sf::ScanMethod::HandleCommand ( ECommand  cmd)
protectedpure virtual

Handles the command given by Execute(). Must be overridden in a derived class.

Parameters
cmdCommand to handle.
Returns
TRue on success.

Implemented in sf::ipj::LineScanMethod, and sf::ipj::MeanderScanMethod.

◆ HandleCursorEvent()

virtual void sf::ScanMethod::HandleCursorEvent ( bool  btn_down,
Qt::KeyboardModifiers  shift,
int  index,
double  frac 
)
inlinevirtual

Can be overridden to handle cursor events when the scan is selected in the project.

Parameters
btn_downTrue when button is down.
shiftKeyboard modifiers.
indexMeasurement index position.
fracScan line fraction.

Reimplemented in sf::ipj::LineScanMethod.

◆ Initialize()

virtual bool sf::ScanMethod::Initialize ( )
protectedpure virtual

Initializes the scan method. Must be overridden by a derived class.

Returns
True on success.

Implemented in sf::ipj::LineScanMethod, and sf::ipj::MeanderScanMethod.

◆ IsActivated()

bool sf::ScanMethod::IsActivated ( ) const

Check if the scan method was activated.

Returns
True when activated.

◆ IsCalibReady()

bool sf::ScanMethod::IsCalibReady ( )

Checks if the calibration is complete.

Returns
True when complete.

◆ LoadSystemSettings()

void sf::ScanMethod::LoadSystemSettings ( )

Loads the system setting associated with the scan method.

◆ Read()

virtual void sf::ScanMethod::Read ( IniProfile inifile)
protectedpure virtual

Reads the settings from the passed inifile.

Parameters
inifile

Implemented in sf::ipj::MeanderScanMethod, sf::ipj::LineScanMethod, and sf::ipj::ToolBaseScanMethod.

◆ Reinitialize()

bool sf::ScanMethod::Reinitialize ( )

When the state is ready the scan method can be reinitialize. After changes are made to the settings for example.

Returns
True if successful to change the state.

◆ SaveSystemSettings()

bool sf::ScanMethod::SaveSystemSettings ( )

Saves the system setting associated with the scan method.

Returns
True on success.

◆ SetAcqParams()

virtual bool sf::ScanMethod::SetAcqParams ( int  index,
double  frac 
)
protectedpure virtual

Sets the project acquisition parameters/variables based on the passed index. Must be overloaded by a derived class.

Parameters
indexMeasurement indexed position.
fracScan line fraction.
Returns
True on success.

Implemented in sf::ipj::LineScanMethod, and sf::ipj::MeanderScanMethod.

◆ SetAcqState()

void sf::ScanMethod::SetAcqState ( InformationServer::EState  sel_state,
InformationServer::EState  unsel_state = InformationServer::issOff 
)

Sets the state on all acquisition devices.

Parameters
sel_stateState for the selected devices.
unsel_stateState for the un-selected devices.

◆ SetAreaName()

void sf::ScanMethod::SetAreaName ( const QString &  name)

Changes the area name so it is saved by the project under this new name.

Parameters
nameNew name.

◆ SetFrame()

void sf::ScanMethod::SetFrame ( QWidget *  frame)
protected

◆ SetIndexCount()

void sf::ScanMethod::SetIndexCount ( int  idx_count)
protected

◆ SetIndexFracRange()

void sf::ScanMethod::SetIndexFracRange ( double  start,
double  stop 
)

Sets the new scan range for defined surface.

Parameters
startStart fraction of the range.
stopStop fraction of the range.

◆ SetState()

bool sf::ScanMethod::SetState ( EState  state)
protected

◆ StateChange()

virtual void sf::ScanMethod::StateChange ( EState  prev,
EState  cur 
)
protectedpure virtual

Is called when the current state changes for a derived class to act up on. Must be overridden by a derived class.

Parameters
prevThe previous state.
curThe current state.

Implemented in sf::ipj::LineScanMethod, and sf::ipj::MeanderScanMethod.

◆ Sustain()

virtual bool sf::ScanMethod::Sustain ( const timespec &  ts)
protectedvirtual

Can be overloaded to do background processing.

Parameters
tsCurrent time or time to act on.
Returns
When false is returned the function is called no-longer.

Reimplemented in sf::ipj::MeanderScanMethod.

◆ UpdatePositionsData()

bool sf::ScanMethod::UpdatePositionsData ( )
protected

◆ Write()

virtual void sf::ScanMethod::Write ( IniProfile inifile)
protectedpure virtual

Writes the settings to the passed inifile.

Parameters
inifile

Implemented in sf::ipj::MeanderScanMethod, sf::ipj::LineScanMethod, and sf::ipj::ToolBaseScanMethod.


The documentation for this class was generated from the following file: