AuboStudio SDK 0.6.3

Public 成员函数 | 所有成员列表
arcs::aubo_scope::ScrewdriverConfiguration类 参考abstract

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

`#include <screw_driver_configuration.h>`

## Public 成员函数
virtual | ~ScrewdriverConfiguration ()=default
virtual void | addScrewdriverProgram (ScrewdriverProgramPtr screwdriverProgram)=0
| Add a screwdriver program to the list of programs. 更多...
virtual void | addScrewdriverPrograms (std::vector< ScrewdriverProgramPtr > screwdriverProgramList)=0
| Add a list of screwdriver programs to the list of programs. 更多...
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. 更多...
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

## 详细描述

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

It is optional to register these capabilities and properties.

在文件 screw_driver_configuration.h 第 163 行定义.

## 构造及析构函数说明

## ◆ ~ScrewdriverConfiguration()

virtual arcs::aubo_scope::ScrewdriverConfiguration::~ScrewdriverConfiguration | ( |  | ) |
| virtual default

## 成员函数说明

## ◆ addScrewdriverProgram()

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

Add a screwdriver program to the list of programs.

参数

  screwdriverProgram | program to add, not `null`

异常

  DuplicateScrewdriverProgramID | if the ids of the screwdriver programs (returned by the method ScrewdriverProgram#getId()) are not unique.
  NameOfScrewdriverProgramCannotBeNullOrEmpty | if the display name of a program (returned by the method {}) is `null` or an empty string.

## ◆ addScrewdriverPrograms()

virtual void arcs::aubo_scope::ScrewdriverConfiguration::addScrewdriverPrograms | ( | std::vector< ScrewdriverProgramPtr > | screwdriverProgramList | ) |
| pure virtual

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

参数

  screwdriverProgramList | list of programs to add, not `null`

异常

  DuplicateScrewdriverProgramID | if the ids of the screwdriver programs (returned by the method ScrewdriverProgram#getId()) are not unique.
  NameOfScrewdriverProgramCannotBeNullOrEmpty | if the display name of a program (returned by the method {}) is `null` or an empty string.

## ◆ registerDriveScrewNotOKCapability()

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 {} could be: scriptWriter.appendLine("return get_tool_digital_in(1)"); scriptCodeGenerator script 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'. CapabilityAlreadyRegistered if this capability has already been registered CalledOutsideScrewdriverConfigurationPhase if this method is called at the wrong time, i.e. outside the scope of the { ScrewdriverContribution#configureScrewdriver(ScrewdriverConfiguration, ScrewdriverApiProvider)} method.

## ◆ registerDriveScrewOKCapability()

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 {} could be: scriptWriter.appendLine("return get_tool_digital_in(0)"); scriptCodeGenerator script 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'. CapabilityAlreadyRegistered if this capability has already been registered CalledOutsideScrewdriverConfigurationPhase if this method is called at the wrong time, i.e. outside the scope of the { ScrewdriverContribution#configureScrewdriver(ScrewdriverConfiguration, ScrewdriverApiProvider)} method.

## ◆ registerFeedScrewCapability()

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 {}. 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 AuboScope). Return value for the generated script code must be a boolean, i.e. 'True' or 'False' CapabilityAlreadyRegistered if this capability has already been registered CalledOutsideScrewdriverConfigurationPhase if this method is called at the wrong time, i.e. outside the scope of the { ScrewdriverContribution#configureScrewdriver(ScrewdriverConfiguration, ScrewdriverApiProvider)} method.

## ◆ registerOperationTypeCapability()

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).

异常

  CapabilityAlreadyRegistered | if this capability has already been registered
  CalledOutsideScrewdriverConfigurationPhase | if this method is called at the wrong time, i.e. outside the scope of the {ScrewdriverApiProvider)} method.

## ◆ registerPrepareToStartScrewdriverCapability()

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)}. 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 AuboScope). Return value for the generated script code must be a boolean, i.e. 'True' or 'False'. CapabilityAlreadyRegistered if this capability has already been registered CalledOutsideScrewdriverConfigurationPhase if this method is called at the wrong time, i.e. outside the scope of the { ScrewdriverContribution#configureScrewdriver(ScrewdriverConfiguration, ScrewdriverApiProvider)} method.

## ◆ registerProgramSelectionCapability()

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)}. 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 AuboScope). Return value for the generated script code must be a boolean, i.e. 'True' or 'False'. CapabilityAlreadyRegistered if this capability has already been registered CalledOutsideScrewdriverConfigurationPhase if this method is called at the wrong time, i.e. outside the scope of the { ScrewdriverContribution#configureScrewdriver(ScrewdriverConfiguration, ScrewdriverApiProvider)} method.

## ◆ registerScrewdriverReadyCapability()

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).

参数

  scriptCodeGenerator | script code generator responsible for generating the script code for determining if the screwdriver is ready. When the script code needs to be generated, the {} method will be called (by AuboScope). Return value for the generated script code must be a boolean, i.e. 'True' or 'False'. CapabilityAlreadyRegistered if this capability has already been registered CalledOutsideScrewdriverConfigurationPhase if this method is called at the wrong time, i.e. outside the scope of the { ScrewdriverContribution#configureScrewdriver(ScrewdriverConfiguration, ScrewdriverApiProvider)} method.

该类的文档由以下文件生成:

- include/aubo_caps/contribution/driver/screw_driver/screw_driver_configuration.h