public interface ScrewdriverCapabilities
Register the capabilities of the screwdriver using this interface.
A capability is something the screwdriver is capable of doing. PolyScope will execute the script code associated with the capability at appropriate times in the given context.Modifier and Type | Method and Description |
---|---|
void |
registerFeedScrewCapability(ScriptCodeGenerator<FeedScrewParameters> scriptCodeGenerator)
Register a capability for a screwdriver that supports automatic screw feeding.
|
void |
registerOperationTypeCapability()
Register an operation type capability for a screwdriver that supports/requires the parameter for the screwdriving
operation type (i.e.
|
void |
registerPrepareToStartScrewdriverCapability(ScriptCodeGenerator<PrepareToStartScrewdriverParameters> scriptCodeGenerator)
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).
|
void |
registerProgramSelectionCapability(ScrewdriverProgramListProvider programListProvider,
ScriptCodeGenerator<ProgramSelectionParameters> scriptCodeGenerator)
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.
|
void registerProgramSelectionCapability(ScrewdriverProgramListProvider programListProvider, ScriptCodeGenerator<ProgramSelectionParameters> scriptCodeGenerator)
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.
ScrewdriverContribution.generateStartScrewdriverScript(ScriptWriter, ScrewdriverParameters)
.programListProvider
- provider of the list of screwdriver programs, not null
scriptCodeGenerator
- script 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 PolyScope). Return value for the generated script code must be a boolean, i.e.
'True' or 'False'.CapabilityAlreadyRegistered
- if this capability has already been registeredCalledOutsideScrewdriverConfigurationPhase
- if this method is called at the wrong time, i.e. outside the scope
of the ScrewdriverContribution.configureScrewdriver(ScrewdriverConfiguration, ScrewdriverAPIProvider)
method.void registerOperationTypeCapability()
CapabilityAlreadyRegistered
- if this capability has already been registeredCalledOutsideScrewdriverConfigurationPhase
- if this method is called at the wrong time, i.e. outside the scope
of the ScrewdriverContribution.configureScrewdriver(ScrewdriverConfiguration, ScrewdriverAPIProvider)
method.void registerPrepareToStartScrewdriverCapability(ScriptCodeGenerator<PrepareToStartScrewdriverParameters> scriptCodeGenerator)
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.
ScrewdriverContribution.generateStartScrewdriverScript(ScriptWriter, ScrewdriverParameters)
.scriptCodeGenerator
- script 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 PolyScope). Return value for the generated script code must be a boolean, i.e.
'True' or 'False'.CapabilityAlreadyRegistered
- if this capability has already been registeredCalledOutsideScrewdriverConfigurationPhase
- if this method is called at the wrong time, i.e. outside the scope
of the ScrewdriverContribution.configureScrewdriver(ScrewdriverConfiguration, ScrewdriverAPIProvider)
method.void registerFeedScrewCapability(ScriptCodeGenerator<FeedScrewParameters> scriptCodeGenerator)
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.
registerPrepareToStartScrewdriverCapability(ScriptCodeGenerator)
.scriptCodeGenerator
- script 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 PolyScope). Return value for the generated script code must be a boolean, i.e.
'True' or 'False'CapabilityAlreadyRegistered
- if this capability has already been registeredCalledOutsideScrewdriverConfigurationPhase
- if this method is called at the wrong time, i.e. outside the scope
of the ScrewdriverContribution.configureScrewdriver(ScrewdriverConfiguration, ScrewdriverAPIProvider)
method.Copyright © 2023. All rights reserved.