AuboCaps  0.6.0
release_action_parameters.h
Go to the documentation of this file.
1 #ifndef AUBO_SCOPE_RELEASE_ACTION_PARAMETERS_H
2 #define AUBO_SCOPE_RELEASE_ACTION_PARAMETERS_H
3 
5 
6 namespace arcs {
7 namespace aubo_scope {
8 
9 ARCS_CLASS_FORWARD(ReleaseActionParameters);
10 /**
11  * <p>
12  * This interface represents parameters for a release action defined/configured
13  * by the end user.
14  * </p>
15  *
16  * These parameters are used when generating script code for a release action
17  * (see
18  * {@link GripperContribution#generateReleaseActionScript(ScriptWriter,
19  * ReleaseActionParameters)}).
20  */
22 {
23 public:
24  virtual ~ReleaseActionParameters() = default;
25 
26  /**
27  * <p>
28  * Get the selected width to be used for releasing the gripper.
29  * </p>
30  *
31  * This is only valid, if the width capability has been registered (using
32  * the method
33  * {@link GripperCapabilities#registerWidthCapability(double, double,
34  * double, double, Length.Unit)}).
35  *
36  * @return The width to use for the release action
37  * @throws UnsupportedOperationException if the gripper has not registered
38  * the width capability
39  */
40  virtual double getWidth() = 0;
41 
42  /**
43  * <p>
44  * Get the selected speed to be used for releasing the gripper.
45  * </p>
46  *
47  * This is only valid, if the speed capability has been registered (using
48  * the method
49  * {@link GripperCapabilities#registerSpeedCapability(double, double,
50  * double, double, Speed.Unit)}).
51  *
52  * @return The speed to use for the release action
53  * @throws UnsupportedOperationException if the gripper has not registered
54  * the speed capability
55  */
56  virtual double getSpeed() = 0;
57 
58  /**
59  * <p>
60  * Use this method to determine whether the release detection option in the
61  * Gripper program node is on or off.
62  * </p>
63  *
64  * <p>
65  * Note that this method will report that release detection is off, when
66  * script code is to be generated due to the user testing a release
67  * configuration of a gripper program or operating the gripper using the
68  * toolbar.
69  * </p>
70  *
71  * <p>
72  * This method should only be called, if the release detected feedback
73  * capability has been registered (using
74  * {@link
75  * GripperFeedbackCapabilities#registerReleaseDetectedCapability(ScriptCodeGenerator)}).
76  * </p>
77  *
78  * <p>
79  * The purpose of this method is to ensure that the appropriate script code
80  * for performing a release action is generated when the end user has
81  * specified a new payload value. The user-defined payload value will be
82  * applied by AuboScope immediately after the generated release action
83  * script code has finished executing. Depending on the enablement state of
84  * release detection, the generated script should have the following
85  * properties: <ul> <li> <i>Release detection off:</i> The script code
86  * should not finish earlier than when it is appropriate to apply the new
87  * payload value (i.e. when the object has been released). This typically
88  * means that the script code should wait a time period corresponding to
89  * opening the gripper's "fingers" fully (if the gripper is vacuum operated
90  * then long enough to achieve some level of vacuum).
91  * </li>
92  * <li>
93  * <i>Release detection on:</i> The payload will only be set if the
94  * release detection was successful, i.e. it will be applied immediately
95  * after a release was detected. This means that it is not necessary for the
96  * script code to wait (since the built-in detection timeout
97  * functionality will handle the waiting part).
98  * </li>
99  * </ul>
100  * </p>
101  *
102  * @return <code>true</code> if the end user has enabled release detection,
103  * and <code>false</code> if release detection is disabled.
104  * @throws UnsupportedOperationException if the gripper has not registered
105  * the release detected feedback capability
106  */
107  virtual bool isReleaseDetectionEnabled() = 0;
108 };
109 } // namespace aubo_scope
110 } // namespace arcs
111 #endif
ARCS_CLASS_FORWARD(GripForceCapability)