AuboStudio SDK 0.6.3

program_node_factory.h
浏览该文件的文档.
1 #ifndef AUBO_SCOPE_PROGRAM_NODE_FACTORY_H
2 #define AUBO_SCOPE_PROGRAM_NODE_FACTORY_H
3
4 #include <aubo_caps/domain/program/nodes/builtin/assignment_node.h>
5 #include <aubo_caps/domain/program/nodes/builtin/circle_move_node.h>
6 #include <aubo_caps/domain/program/nodes/builtin/comment_node.h>
7 #include <aubo_caps/domain/program/nodes/builtin/direction_node.h>
8 #include <aubo_caps/domain/program/nodes/builtin/folder_node.h>
9 #include <aubo_caps/domain/program/nodes/builtin/force_node.h>
10 #include <aubo_caps/domain/program/nodes/builtin/halt_node.h>
11 #include <aubo_caps/domain/program/nodes/builtin/program_home_node.h>
12 #include <aubo_caps/domain/program/nodes/builtin/if_node.h>
13 #include <aubo_caps/domain/program/nodes/builtin/else_if_node.h>
14 #include <aubo_caps/domain/program/nodes/builtin/else_node.h>
15 #include <aubo_caps/domain/program/nodes/builtin/loop_node.h>
16 #include <aubo_caps/domain/program/nodes/builtin/move_node.h>
17 #include <aubo_caps/domain/program/nodes/builtin/pallet_node.h>
18 #include <aubo_caps/domain/program/nodes/builtin/popup_node.h>
19 #include <aubo_caps/domain/program/nodes/builtin/timer_node.h>
20 #include <aubo_caps/domain/program/nodes/builtin/screw_driving_node.h>
21 #include <aubo_caps/domain/program/nodes/builtin/script_node.h>
22 #include <aubo_caps/domain/program/nodes/builtin/seek_node.h>
23 #include <aubo_caps/domain/program/nodes/builtin/set_node.h>
24 #include <aubo_caps/domain/program/nodes/builtin/set_payload_node.h>
25 #include <aubo_caps/domain/program/nodes/builtin/until_node.h>
26 #include <aubo_caps/domain/program/nodes/builtin/wait_node.h>
27 #include <aubo_caps/domain/program/nodes/builtin/waypoint_node.h>
28 #include <aubo_caps/domain/program/nodes/builtin/switch_node.h>
29 #include <aubo_caps/domain/program/nodes/builtin/case_node.h>
30 #include <aubo_caps/domain/program/nodes/builtin/default_case_node.h>
31 #include <aubo_caps/domain/program/nodes/builtin/break_node.h>
32 #include <aubo_caps/domain/program/nodes/builtin/sub_prog_node.h>
33 #include <aubo_caps/domain/program/nodes/builtin/call_node.h>
34 #include <aubo_caps/domain/program/nodes/builtin/thread_node.h>
35 #include <aubo_caps/domain/program/nodes/builtin/offline_track_node.h>
36 #include <aubo_caps/domain/program/nodes/builtin/record_track_node.h>
37 #include <aubo_caps/domain/program/nodes/builtin/gripper_node.h>
38 #include <aubo_caps/domain/program/nodes/builtin/assembly_node.h>
39 #include <aubo_caps/domain/program/nodes/builtin/visual_localization_program_node.h>
40 #include <aubo_caps/domain/program/nodes/builtin/conveyor_tracking_node.h>
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 */
62 class ARCS_ABI_EXPORT ProgramNodeFactory
63 {
64 public:
65 ProgramNodeFactory(ProgramNodeFactory &f);
66 ProgramNodeFactory(ProgramNodeFactory &&f);
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;
200 ProgramNodeFactory();
201 void *d_{ nullptr };
202 };
203
204 } // namespace aubo_scope
205 } // namespace arcs
206
207 #endif
assembly_node.h
assignment_node.h
break_node.h
call_node.h
case_node.h
circle_move_node.h
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
arcs::aubo_scope::ProgramNodeFactory
Definition: program_node_factory.h:63
arcs::aubo_scope::ProgramNodeFactory::createWaypointNode
WaypointNodePtr createWaypointNode(const std::string &suggested_name)
arcs::aubo_scope::ProgramNodeFactory::createSeekNode
SeekNodePtr createSeekNode()
arcs::aubo_scope::ProgramNodeFactory::createSetPayloadNode
SetPayloadNodePtr createSetPayloadNode()
arcs::aubo_scope::ProgramNodeFactory::~ProgramNodeFactory
virtual ~ProgramNodeFactory()
arcs::aubo_scope::ProgramNodeFactory::createSwitchNode
SwitchNodePtr createSwitchNode()
arcs::aubo_scope::ProgramNodeFactory::createHaltNode
HaltNodePtr createHaltNode()
arcs::aubo_scope::ProgramNodeFactory::createVisualLocalizationProgramNode
VisualLocalizationProgramNodePtr createVisualLocalizationProgramNode()
arcs::aubo_scope::ProgramNodeFactory::createCallNode
CallNodePtr createCallNode()
arcs::aubo_scope::ProgramNodeFactory::createMoveNode
MoveNodePtr createMoveNode()
Creates a default Move node with one default Waypoint node under it.
arcs::aubo_scope::ProgramNodeFactory::createConveyorTrackingNode
ConveyorTrackingNodePtr createConveyorTrackingNode()
arcs::aubo_scope::ProgramNodeFactory::createBreakNode
BreakNodePtr createBreakNode()
arcs::aubo_scope::ProgramNodeFactory::createRecordTrackNode
RecordTrackNodePtr createRecordTrackNode()
arcs::aubo_scope::ProgramNodeFactory::createLoopNode
LoopNodePtr createLoopNode()
arcs::aubo_scope::ProgramNodeFactory::createOfflineTrackNode
OfflineTrackNodePtr createOfflineTrackNode()
arcs::aubo_scope::ProgramNodeFactory::createUserProgramNode
ProgramNodePtr createUserProgramNode(const char *typeid_service)
This method creates a AuboCap program node which is an instance of a contribution/ProgramNodeContribu...
arcs::aubo_scope::ProgramNodeFactory::createCircleMoveNode
CircleMoveNodePtr createCircleMoveNode()
arcs::aubo_scope::ProgramNodeFactory::createForceNode
ForceNodePtr createForceNode()
arcs::aubo_scope::ProgramNodeFactory::createScriptNode
ScriptNodePtr createScriptNode()
arcs::aubo_scope::ProgramNodeFactory::createProgramHomeNode
ProgramHomeNodePtr createProgramHomeNode()
arcs::aubo_scope::ProgramNodeFactory::createGripperNode
GripperNodePtr createGripperNode(GripperDevicePtr gripperDevice)
arcs::aubo_scope::ProgramNodeFactory::ProgramNodeFactory
ProgramNodeFactory(ProgramNodeFactory &&f)
arcs::aubo_scope::ProgramNodeFactory::createWaitNode
WaitNodePtr createWaitNode()
arcs::aubo_scope::ProgramNodeFactory::ProgramNodeFactory
ProgramNodeFactory()
arcs::aubo_scope::ProgramNodeFactory::createDefaultCaseNode
DefaultCaseNodePtr createDefaultCaseNode()
arcs::aubo_scope::ProgramNodeFactory::createCommentNode
CommentNodePtr createCommentNode()
arcs::aubo_scope::ProgramNodeFactory::createPalletNode
PalletNodePtr createPalletNode()
arcs::aubo_scope::ProgramNodeFactory::ProgramNodeFactory
ProgramNodeFactory(ProgramNodeFactory &f)
arcs::aubo_scope::ProgramNodeFactory::createTimerNode
TimerNodePtr createTimerNode()
arcs::aubo_scope::ProgramNodeFactory::createSubProgNode
SubProgNodePtr createSubProgNode()
arcs::aubo_scope::ProgramNodeFactory::createPopupNode
PopupNodePtr createPopupNode()
arcs::aubo_scope::ProgramNodeFactory::createDirectionNode
DirectionNodePtr createDirectionNode()
arcs::aubo_scope::ProgramNodeFactory::createScrewdrivingNode
ScrewdrivingNodePtr createScrewdrivingNode()
arcs::aubo_scope::ProgramNodeFactory::createWaypointNode
WaypointNodePtr createWaypointNode()
Creates a Waypoint node with default waypoint name (corresponds to the name generated if the end user...
arcs::aubo_scope::ProgramNodeFactory::createFolderNode
FolderNodePtr createFolderNode()
arcs::aubo_scope::ProgramNodeFactory::createAssignmentNode
AssignmentNodePtr createAssignmentNode()
arcs::aubo_scope::ProgramNodeFactory::createMoveNodeNoTemplate
MoveNodePtr createMoveNodeNoTemplate()
arcs::aubo_scope::ProgramNodeFactory::createAssemblyNode
AssemblyNodePtr createAssemblyNode()
arcs::aubo_scope::ProgramNodeFactory::createElseNode
ElseNodePtr createElseNode()
arcs::aubo_scope::ProgramNodeFactory::createThreadNode
ThreadNodePtr createThreadNode()
arcs::aubo_scope::ProgramNodeFactory::createElseIfNode
ElseIfNodePtr createElseIfNode()
arcs::aubo_scope::ProgramNodeFactory::createCaseNode
CaseNodePtr createCaseNode()
arcs::aubo_scope::ProgramNodeFactory::createUntilNode
UntilNodePtr createUntilNode()
Creates an Until Node with no until type specified.
arcs::aubo_scope::ProgramNodeFactory::createSetNode
SetNodePtr createSetNode()
arcs::aubo_scope::ProgramNodeFactory::createIfNode
IfNodePtr createIfNode()
arcs::aubo_scope::ProgramNodeService
Defines an API required for adding a new type of program node to AuboScope.
Definition: program_node_service.h:19
comment_node.h
conveyor_tracking_node.h
default_case_node.h
direction_node.h
else_if_node.h
else_node.h
folder_node.h
force_node.h
gripper_node.h
halt_node.h
if_node.h
loop_node.h
move_node.h
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs
Definition: contribution_provider.h:7
offline_track_node.h
pallet_node.h
popup_node.h
program_home_node.h
record_track_node.h
screw_driving_node.h
script_node.h
seek_node.h
set_node.h
set_payload_node.h
sub_prog_node.h
switch_node.h
thread_node.h
timer_node.h
until_node.h
visual_localization_program_node.h
wait_node.h
waypoint_node.h