AuboCaps  0.6.0
arcs::aubo_scope::ScrewdriverConfiguration Class Referenceabstract

This interface provides access to register or setup various properties and capabilities of a screwdriver. More...

#include <screw_driver_configuration.h>

Public Member Functions

virtual ~ScrewdriverConfiguration ()=default
 
virtual void addScrewdriverProgram (ScrewdriverProgramPtr screwdriverProgram)=0
 Add a screwdriver program to the list of programs. More...
 
virtual void addScrewdriverPrograms (std::vector< ScrewdriverProgramPtr > screwdriverProgramList)=0
 Add a list of screwdriver programs to the list of programs. More...
 
virtual void registerProgramSelectionCapability (std::function< void(ScriptWriterPtr, ProgramSelectionParametersPtr)> scriptCodeGenerator)=0
 
virtual void registerOperationTypeCapability ()=0
 Register an operation type capability for a screwdriver that supports/requires the parameter for the screwdriving operation type (i.e. More...
 
virtual void registerPrepareToStartScrewdriverCapability (std::function< void(ScriptWriterPtr, PrepareToStartScrewdriverParametersPtr)> scriptCodeGenerator)=0
 
virtual void registerFeedScrewCapability (std::function< void(ScriptWriterPtr, FeedScrewParametersPtr)> scriptCodeGenerator)=0
 
virtual void registerDriveScrewOKCapability (std::function< void(ScriptWriterPtr, DriveScrewOKParametersPtr)> scriptCodeGenerator)=0
 
virtual void registerDriveScrewNotOKCapability (std::function< void(ScriptWriterPtr, DriveScrewNotOKParametersPtr)> scriptCodeGenerator)=0
 
virtual void registerScrewdriverReadyCapability (std::function< void(ScriptWriterPtr, ScrewdriverReadyParametersPtr)> scriptCodeGenerator)=0
 

Detailed Description

This interface provides access to register or setup various properties and capabilities of a screwdriver.

It is optional to register these capabilities and properties.

Definition at line 163 of file screw_driver_configuration.h.

Constructor & Destructor Documentation

virtual arcs::aubo_scope::ScrewdriverConfiguration::~ScrewdriverConfiguration ( )
virtualdefault

Member Function Documentation

virtual void arcs::aubo_scope::ScrewdriverConfiguration::addScrewdriverProgram ( ScrewdriverProgramPtr  screwdriverProgram)
pure virtual

Add a screwdriver program to the list of programs.

Parameters
screwdriverProgramprogram to add, not null
Exceptions
DuplicateScrewdriverProgramIDif the ids of the screwdriver programs (returned by the method ScrewdriverProgram#getId()) are not unique.
NameOfScrewdriverProgramCannotBeNullOrEmptyif the display name of a program (returned by the method ScrewdriverProgram#getDisplayName()) is null or an empty string.
virtual void arcs::aubo_scope::ScrewdriverConfiguration::addScrewdriverPrograms ( std::vector< ScrewdriverProgramPtr >  screwdriverProgramList)
pure virtual

Add a list of screwdriver programs to the list of programs.

Parameters
screwdriverProgramListlist of programs to add, not null
Exceptions
DuplicateScrewdriverProgramIDif the ids of the screwdriver programs (returned by the method ScrewdriverProgram#getId()) are not unique.
NameOfScrewdriverProgramCannotBeNullOrEmptyif the display name of a program (returned by the method ScrewdriverProgram#getDisplayName()) is null or an empty string.
virtual void arcs::aubo_scope::ScrewdriverConfiguration::registerDriveScrewNotOKCapability ( std::function< void(ScriptWriterPtr, DriveScrewNotOKParametersPtr)>  scriptCodeGenerator)
pure virtual

Register a feedback capability for a screwdriver that is capable of providing information about whether or not an ongoing screwdriving operation (driving the screw) failed, i.e. ended in Not Ok (NOK) state.

Note: This capability must only be used to provide feedback about the failure of the screwing operation. It should not be used to provide feedback about successes. To support feedback about when the operation succeeds, register the Drive Screw Ok feedback capability the using the registerDriveScrewOKCapability(ScriptCodeGenerator) method.

The provided implementation of the ScriptCodeGenerator interface must generate the script code for determining if the screwing operation ended in failure. The return value of the script code must be a boolean, i.e. 'True' or 'False'. 'True' must be returned if the screwing operation failed, otherwise 'False' must be returned.

Note: A return value of 'False' must not be used to indicate that the operation succeeded, but simply that a failure was not (yet) detected. If the screwdriver can provide feedback on whether or not the screwing operation succeeded, the Drive Screw Ok feedback capability should be used.

Example:
The digital tool input 1 will go high if the operation ended in NOT OK-state. The script code is:

 return get_tool_digital_in(1)

So the implementation of ScriptCodeGenerator#generateScript(ScriptWriter, Object) could be:

   scriptWriter.appendLine("return get_tool_digital_in(1)");
Parameters
scriptCodeGeneratorscript code generator responsible for generating the script code for determining if the screwing operation failed. When the script code needs to be generated, the ScriptCodeGenerator#generateScript(ScriptWriter, Object) method will be called (by AuboScope). Return value for the generated script code must be a boolean, i.e. 'True' or 'False'.
Exceptions
CapabilityAlreadyRegisteredif this capability has already been registered
CalledOutsideScrewdriverConfigurationPhaseif this method is called at the wrong time, i.e. outside the scope of the ScrewdriverApiProvider) method.
virtual void arcs::aubo_scope::ScrewdriverConfiguration::registerDriveScrewOKCapability ( std::function< void(ScriptWriterPtr, DriveScrewOKParametersPtr)>  scriptCodeGenerator)
pure virtual

Register a feedback capability for a screwdriver that is capable of providing information about whether or not an ongoing screwdriving operation (driving the screw) ended successfully (ended in OK-state).

Note: This capability must only be used to provide feedback about the success of the screwing operation. It should not be used to provide feedback about failures. To support feedback about when the operation fails, register the Drive Screw Not Ok feedback capability the using the registerDriveScrewNotOKCapability(ScriptCodeGenerator) method.

The provided implementation of the ScriptCodeGenerator interface must generate the script code for determining if the screwing operation succeeded. The return value of the script code must be a boolean, i.e. 'True' or 'False'. 'True' must be returned if the screwing operation was successful, otherwise 'False' must be returned.

Note: A return value of 'False' must not be used to indicate that the operation failed, but simply that a success was not (yet) detected. If the screwdriver can provide feedback on whether or not the screwing operation failed, the Drive Screw Not Ok feedback capability must be used.

Example:
The digital tool input 0 will go high if the operation ended in OK-state. The script code is:

 return get_tool_digital_in(0)

So the implementation of ScriptCodeGenerator#generateScript(ScriptWriter, Object) could be:

scriptWriter.appendLine("return get_tool_digital_in(0)");
Parameters
scriptCodeGeneratorscript code generator responsible for generating the script code for determining if the screwing operation succeeded. When the script code needs to be generated, the ScriptCodeGenerator#generateScript(ScriptWriter, Object) method will be called (by AuboScope). Return value for the generated script code must be a boolean, i.e. 'True' or 'False'.
Exceptions
CapabilityAlreadyRegisteredif this capability has already been registered
CalledOutsideScrewdriverConfigurationPhaseif this method is called at the wrong time, i.e. outside the scope of the ScrewdriverApiProvider) method.
virtual void arcs::aubo_scope::ScrewdriverConfiguration::registerFeedScrewCapability ( std::function< void(ScriptWriterPtr, FeedScrewParametersPtr)>  scriptCodeGenerator)
pure virtual

Register a capability for a screwdriver that supports automatic screw feeding.

The provided implementation of the ScriptCodeGenerator interface must generate the script code for feeding a screw to the screwdriver. The return value of the script code must be a boolean, i.e. 'True' or 'False'. 'True' must be returned if the screw feed operation was successful and 'False' must be returned if the operation failed.

The generated script code is executed before the script code for preparing the screwdriver, i.e the script code generated by registerPrepareToStartScrewdriverCapability(ScriptCodeGenerator).

Parameters
scriptCodeGeneratorscript code generator responsible for generating the script code for feeding a screw to the screwdriver. When the script code needs to be generated, the ScriptCodeGenerator#generateScript(ScriptWriter, Object) method will be called (by AuboScope). Return value for the generated script code must be a boolean, i.e. 'True' or 'False'
Exceptions
CapabilityAlreadyRegisteredif this capability has already been registered
CalledOutsideScrewdriverConfigurationPhaseif this method is called at the wrong time, i.e. outside the scope of the ScrewdriverApiProvider) method.
virtual void arcs::aubo_scope::ScrewdriverConfiguration::registerOperationTypeCapability ( )
pure virtual

Register an operation type capability for a screwdriver that supports/requires the parameter for the screwdriving operation type (i.e.

if the operation is Tighten or Loosen).

Exceptions
CapabilityAlreadyRegisteredif this capability has already been registered
CalledOutsideScrewdriverConfigurationPhaseif this method is called at the wrong time, i.e. outside the scope of the ScrewdriverApiProvider) method.
virtual void arcs::aubo_scope::ScrewdriverConfiguration::registerPrepareToStartScrewdriverCapability ( std::function< void(ScriptWriterPtr, PrepareToStartScrewdriverParametersPtr)>  scriptCodeGenerator)
pure virtual

Register a capability/requirement for a screwdriver that needs to generate script code for preparing the screwdriver for a screwdriving operation (before starting the screw driver).

The provided implementation of the ScriptCodeGenerator interface must generate the script code for preparing the screwdriver. The return value of the script code must be a boolean, i.e. 'True' or 'False'. 'True' must be returned if the preparation of the screwdriver was successful and 'False' must be returned if the preparation failed.

The generated script code is executed before the script code for starting the screwdriver (could be from a different node), i.e the script code generated by ScrewdriverParameters).

Parameters
scriptCodeGeneratorscript code generator responsible for generating the script code for preparing the screwdriver. When the script code needs to be generated, the ScriptCodeGenerator#generateScript(ScriptWriter, Object) method will be called (by AuboScope). Return value for the generated script code must be a boolean, i.e. 'True' or 'False'.
Exceptions
CapabilityAlreadyRegisteredif this capability has already been registered
CalledOutsideScrewdriverConfigurationPhaseif this method is called at the wrong time, i.e. outside the scope of the ScrewdriverApiProvider) method.
virtual void arcs::aubo_scope::ScrewdriverConfiguration::registerProgramSelectionCapability ( std::function< void(ScriptWriterPtr, ProgramSelectionParametersPtr)>  scriptCodeGenerator)
pure virtual

Register a program selection capability for a screwdriver that supports selecting between a set of screwdriver programs, typically defined on an external control box for the screwdriver.

The provided implementation of the ScriptCodeGenerator interface must generate the script code for selecting the specified screwdriver program. The return value of the script code must be a boolean, i.e. 'True' or 'False'. 'True' must be returned if selecting the program succeeded and 'False' must be returned if the program selection failed.

The generated script code is executed before the script code for starting the screwdriver (could be from a different node), i.e the script code generated by ScrewdriverParameters).

Parameters
programListProviderprovider of the list of screwdriver programs, not null
scriptCodeGeneratorscript code generator responsible for generating the script code for selecting the specified screwdriver program. When the script code needs to be generated, the ScriptCodeGenerator#generateScript(ScriptWriter, Object) method will be called (by AuboScope). Return value for the generated script code must be a boolean, i.e. 'True' or 'False'.
Exceptions
CapabilityAlreadyRegisteredif this capability has already been registered
CalledOutsideScrewdriverConfigurationPhaseif this method is called at the wrong time, i.e. outside the scope of the ScrewdriverApiProvider) method.
virtual void arcs::aubo_scope::ScrewdriverConfiguration::registerScrewdriverReadyCapability ( std::function< void(ScriptWriterPtr, ScrewdriverReadyParametersPtr)>  scriptCodeGenerator)
pure virtual

Register a feedback capability for a screwdriver that is capable of providing information about whether or not the screwdriver device is ready to operate (receive commands). This capability is used (by AuboScope) in a program to ensure that the screwdriver is ready before sending commands to it.

The provided implementation of the ScriptCodeGenerator interface must generate the script code for determining if the screwdriver is ready. The return value of the script code must be a boolean, i.e. 'True' or 'False'. 'True' must be returned if the screwdriver is ready, otherwise 'False' must be returned.

The generated script code is executed before the script code for the program selected capability (if that capability has been registered).

Parameters
scriptCodeGeneratorscript code generator responsible for generating the script code for determining if the screwdriver is ready. When the script code needs to be generated, the ScriptCodeGenerator#generateScript(ScriptWriter, Object) method will be called (by AuboScope). Return value for the generated script code must be a boolean, i.e. 'True' or 'False'.
Exceptions
CapabilityAlreadyRegisteredif this capability has already been registered
CalledOutsideScrewdriverConfigurationPhaseif this method is called at the wrong time, i.e. outside the scope of the ScrewdriverApiProvider) method.

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