AuboStudio SDK  0.6.2
program_node_factory.h
Go to the documentation of this file.
1 #ifndef AUBO_SCOPE_PROGRAM_NODE_FACTORY_H
2 #define AUBO_SCOPE_PROGRAM_NODE_FACTORY_H
3 
40 
41 namespace arcs {
42 namespace aubo_scope {
43 ARCS_CLASS_FORWARD(ProgramNodeFactory);
44 ARCS_CLASS_FORWARD(ProgramNodeService);
45 
46 /**
47  * <p>
48  * This interfaces supplies methods to create different types of program nodes.
49  * </p>
50  *
51  * <p>
52  * Both built-in program nodes (provided by Universal Robots) and AuboCap
53  * program nodes can be created. Most methods will create a node with the same
54  * default configuration as if the end user added the node manually.
55  * </p>
56  *
57  * <p>
58  * Note that this default configuration may change between AuboScope versions.
59  * </p>
60  */
62 {
63 public:
66  virtual ~ProgramNodeFactory();
67 
68  /**
69  * This method creates a AuboCap program node which is an instance of a
70  * {@link contribution/ProgramNodeContribution}.
71  *
72  * @param typeid_service is the service creating the program node
73  * contribution/
74  *
75  * @return the {@link ProgramNode} which represents the {@link
76  * contribution/ProgramNodeContribution} created by {@link
77  * ProgramNodeService}. Returns <code>null</code> if AuboCap providing
78  * ProgramNodeService is not installed.
79  *
80  * @throws IllegalArgumentException if the argument ProgramNodeService
81  * is <code>null</code>or ProgramNodeService does not implement {@link
82  * ProgramNodeService}.
83  */
84  ProgramNodePtr createUserProgramNode(const char *typeid_service);
85 
86  /**
87  * Creates a default Move node with one default Waypoint node under it.
88  *
89  * @return new Move Node.
90  */
91  MoveNodePtr createMoveNode();
92 
93  /**
94  * <p>
95  * Creates a default Move node without a Waypoint node under it (e.g. to be
96  * used for inserting named waypoints).
97  * </p>
98  *
99  * Note that at least one Waypoint node must be under it for a Move node to
100  * be valid.
101  *
102  * @return new Move Node.
103  */
104  MoveNodePtr createMoveNodeNoTemplate();
105 
106  /**
107  * Creates a Waypoint node with default waypoint name (corresponds to the
108  * name generated if the end user added a new node manually).
109  *
110  * @return new Waypoint Node.
111  */
112  WaypointNodePtr createWaypointNode();
113 
114  /**
115  * <p>
116  * Creates a Waypoint node with a suggested name.
117  * </p>
118  *
119  * <p>
120  * The final name can be different if the suggested name is already
121  * registered. The waypoint name is registered when it is inserted into the
122  * program tree.
123  * </p>
124  *
125  * Variable waypoints will use the name of the variable instead of the
126  * suggested name.
127  *
128  * @param suggested_name the suggested name of the waypoint. Valid names
129  * must match regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters.
130  * @return new Waypoint Node.
131  * @throws IllegalWaypointNameException In case of an illegal name.
132  */
133  WaypointNodePtr createWaypointNode(const std::string &suggested_name);
134 
135  /**
136  * Creates an Until Node with no until type specified.
137  *
138  * @return a new Until Node.
139  */
140  UntilNodePtr createUntilNode();
141  DirectionNodePtr createDirectionNode();
142  WaitNodePtr createWaitNode();
143  SetNodePtr createSetNode();
144  SetPayloadNodePtr createSetPayloadNode();
145  PopupNodePtr createPopupNode();
146  HaltNodePtr createHaltNode();
147  CommentNodePtr createCommentNode();
148  FolderNodePtr createFolderNode();
149  LoopNodePtr createLoopNode();
150  AssignmentNodePtr createAssignmentNode();
151  IfNodePtr createIfNode();
152  ElseIfNodePtr createElseIfNode();
153  ElseNodePtr createElseNode();
154  CircleMoveNodePtr createCircleMoveNode();
155  PalletNodePtr createPalletNode();
156  SeekNodePtr createSeekNode();
157  ForceNodePtr createForceNode();
158  AssemblyNodePtr createAssemblyNode();
159  ScrewdrivingNodePtr createScrewdrivingNode();
160  ScriptNodePtr createScriptNode();
161  TimerNodePtr createTimerNode();
162  SwitchNodePtr createSwitchNode();
163  CaseNodePtr createCaseNode();
164  DefaultCaseNodePtr createDefaultCaseNode();
165  BreakNodePtr createBreakNode();
166  SubProgNodePtr createSubProgNode();
167  CallNodePtr createCallNode();
168  OfflineTrackNodePtr createOfflineTrackNode();
169  RecordTrackNodePtr createRecordTrackNode();
170  ThreadNodePtr createThreadNode();
171  ProgramHomeNodePtr createProgramHomeNode();
172  VisualLocalizationProgramNodePtr createVisualLocalizationProgramNode();
173 
174  /**
175  * <p>
176  * This method creates a new Gripper program node. This node type can be
177  * used for programming grip and release actions with a selected gripper
178  * device.
179  * </p>
180  *
181  * The program node will be created with the same default configuration as
182  * if the end user added the node manually in AuboScope, i.e. an undefined
183  * configuration where the gripper action is unselected.
184  *
185  * @param gripperDevice the gripper device to create a Gripper node for, not
186  * <code>null</code>. The created Gripper node will program gripper actions
187  * for this device.
188  * @return a new Gripper program node (which can be inserted into the
189  * program tree using the {@link TreeNode} interface).
190  * @throws UnresolvedDeviceException when the specified
191  * <code>gripperDevice</code> device is unresolved. See
192  * {@link GripperDevice#isResolvable()}.
193  */
194  GripperNodePtr createGripperNode(GripperDevicePtr gripperDevice);
195 
196 private:
197  friend class DataSwitch;
199  void *d_{ nullptr };
200 };
201 
202 } // namespace aubo_scope
203 } // namespace arcs
204 
205 #endif
ARCS_CLASS_FORWARD(GripForceCapability)
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16