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