AuboStudio SDK  0.6.3
application_api.h
浏览该文件的文档.
1#ifndef AUBO_SCOPE_APPLICATION_API_H
2#define AUBO_SCOPE_APPLICATION_API_H
3
11
12namespace arcs {
13
14namespace aubo_sdk {
16}
17
18namespace aubo_scope {
21
22/**
23 * \chinese
24 * @defgroup ApplicationApi ApplicationApi(应用程序)
25 * @ingroup ApplicationApi
26 * 应用程序接口
27 * 提供对各种不同应用程序和上下文相关的功能与服务的访问。这包括 AuboScope 内部已有的功
28 * 能,以及在 AuboScope 中创建要使用的额外模型元素。
29 * \endchinese
30 * \english
31 * @defgroup ApplicationApi ApplicationApi
32 * @ingroup ApplicationApi
33 * ApplicationApi
34 * Provides access to functionality and services which are relevant for various
35 * different applications and contexts. This includes what is available from
36 * within AuboScope, as well as creating additional model elements to be used
37 * within AuboScope.
38 * \endenglish
39
40 */
42{
43public:
46 virtual ~ApplicationApi();
47
48 /**
49 * @ingroup ApplicationApi
50 * @ref IoModel
51 * \chinese
52 * 获取IO模型接口,用于操作机器人的输入和输出。
53 * @return 用于操作机器人输入和输出的接口。
54 * \endchinese
55 * \english
56 * Returns an interface for working with the inputs and outputs of the robot.
57 * @return An interface for working with the inputs and outputs of the robot.
58 * \endenglish
59 */
60 IoModelPtr getIoModel();
61
62 /**
63 * @ingroup ApplicationApi
64 * @ref FeatureModel
65 * \chinese
66 * 获取特征模型接口,用于操作当前安装中的特征。
67 * @return 用于操作当前安装中特征的接口。
68 * \endchinese
69 * \english
70 * Returns an interface for working with the features of the current
71 * installation.
72 * @return An interface for working with the features of the current
73 * installation.
74 * \endenglish
75 */
76 FeatureModelPtr getFeatureModel();
77
78 /**
79 * @ingroup ApplicationApi
80 * @ref TcpModel
81 * \chinese
82 * 获取TCP模型接口,用于访问当前安装中的TCP。
83 * @return 用于访问当前安装中TCP的接口。
84 * \endchinese
85 * \english
86 * Returns an interface for accessing the TCPs of the current installation.
87 * @return An interface for accessing the TCPs of the current installation.
88 * \endenglish
89 */
90 TcpModelPtr getTcpModel();
91
92 /**
93 * @ingroup ApplicationApi
94 * @ref PayloadModel
95 * \chinese
96 * 获取负载模型接口,用于访问当前AuboScope安装中的负载。
97 *
98 * @return 用于访问当前AuboScope安装中负载的接口。
99 * \endchinese
100 * \english
101 * Gets an interface which provides access the payloads in the current
102 * AuboScope installation.
103 *
104 * @return An interface for accessing the payloads in the current AuboScope
105 * installation.
106 * \endenglish
107 */
108 PayloadModelPtr getPayloadModel();
109
110 /**
111 * @ingroup ApplicationApi
112 * @ref VariableModel
113 * \chinese
114 * 获取变量模型接口,用于操作变量。
115 * @return 用于操作变量的接口。
116 * \endchinese
117 * \english
118 * Returns an interface for working with variables.
119 * @return An interface for working with variables.
120 * \endenglish
121 */
122 VariableModelPtr getVariableModel();
123
124 /**
125 * @ingroup ApplicationApi
126 * @ref ValueFactory
127 * \chinese
128 * 获取值工厂接口,用于访问能够创建值对象的各种工厂。
129 * @return 用于访问能够创建值对象的各种工厂的接口。
130 * \endchinese
131 * \english
132 * Returns an interface for accessing various factories capable of creating
133 * value objects.
134 * @return An interface for accessing various factories capable of creating
135 * value objects.
136 * \endenglish
137 */
138 ValueFactoryPtr getValueFactory();
139
140 // /**
141 // * @return An interface with access to various queryable-only system
142 // resources
143 // */
144 // ResourceModel getResourceModel();
145
146 /**
147 * \chinese
148 * 此方法用于获取指定的{@link InstallationNodeContribution}实例。
149 *
150 * @param installationType 要返回的安装节点贡献的类。
151 * @param <T> 用于指定{@link InstallationNodeContribution}的泛型。
152 * @return 安装节点实例。
153 * \endchinese
154 * \english
155 * This method can be used to get a specific {@link
156 * InstallationNodeContribution} instance.
157 *
158 * @param installationType The class of the installation node
159 * contribution to return.
160 * @param <T> The generic for specifying the {@link
161 * InstallationNodeContribution}.
162 * @return The installation node instance.
163 * \endenglish
164 */
165 template <typename T>
166 std::shared_ptr<T> getInstallationNode()
167 {
168 return std::dynamic_pointer_cast<T>(
169 getInstallationNode(typeid(T).name()));
170 }
171 InstallationNodeContributionPtr getInstallationNode(
172 const char *typeidOfClass);
173
174 /**
175 * @ingroup ApplicationApi
176 * @ref DeviceManager
177 * \chinese
178 * 此方法用于获取指定的{@link DeviceManager}实例。
179 *
180 * @param deviceManagerClass 要返回的设备管理器类。
181 * @param <T> 要返回的类的泛型类型。
182 * @return 用于注册和操作特定设备的接口。
183 * \endchinese
184 * \english
185 * This method can be used to get a specific {@link DeviceManager}
186 * instance.
187 *
188 * @param deviceManagerClass The class for the device manager to return.
189 * @param <T> The generic type of class to return.
190 * @return An interface for registering and working with a specific
191 * device.
192 * \endenglish
193 */
194 DeviceManagerPtr getDeviceManager();
195
196 /**
197 * \chinese
198 * 获取机器人代理,提供与机器人底层SDK的交互接口。
199 * @return 机器人代理指针。
200 * \endchinese
201 * \english
202 * Returns the robot proxy, providing an interaction interface with the
203 * underlying robot SDK.
204 * @return The robot proxy pointer.
205 * \endenglish
206 */
207 aubo_sdk::RobotProxyPtr getRobotProxy();
208
209protected:
211
212private:
213 friend class DataSwitch;
214 void *d_{ nullptr };
215};
216
217} // namespace aubo_scope
218} // namespace arcs
219
220#endif // AUBO_SCOPE_APPLICATION_API_H
#define ARCS_ABI_EXPORT
#define ARCS_CLASS_FORWARD(C)
Macro that forward declares a class and defines the respective smartpointers through ARCS_DECLARE_PTR...
ApplicationApi(ApplicationApi &f)
InstallationNodeContributionPtr getInstallationNode(const char *typeidOfClass)
aubo_sdk::RobotProxyPtr getRobotProxy()
\chinese 获取机器人代理,提供与机器人底层SDK的交互接口。
std::shared_ptr< T > getInstallationNode()
\chinese 此方法用于获取指定的InstallationNodeContribution实例。
ApplicationApi(ApplicationApi &&f)
\chinese 安装节点贡献 安装节点贡献的 API。 \endchinese \english InstallationNodeContribution API for installation n...
PayloadModelPtr getPayloadModel()
PayloadModel \chinese 获取负载模型接口,用于访问当前AuboScope安装中的负载。
DeviceManagerPtr getDeviceManager()
DeviceManager \chinese 此方法用于获取指定的DeviceManager实例。
FeatureModelPtr getFeatureModel()
FeatureModel \chinese 获取特征模型接口,用于操作当前安装中的特征。
TcpModelPtr getTcpModel()
TcpModel \chinese 获取TCP模型接口,用于访问当前安装中的TCP。
ValueFactoryPtr getValueFactory()
ValueFactory \chinese 获取值工厂接口,用于访问能够创建值对象的各种工厂。
IoModelPtr getIoModel()
IoModel \chinese 获取IO模型接口,用于操作机器人的输入和输出。
VariableModelPtr getVariableModel()
VariableModel \chinese 获取变量模型接口,用于操作变量。