PDF
AUBO SDK  0.26.0
system_info.h
浏览该文件的文档.
1/** @file system_info.h
2 * @brief 获取系统信息接口,如接口板的版本号、示教器软件的版本号
3 */
4#ifndef AUBO_SDK_SYSTEM_INFO_INTERFACE_H
5#define AUBO_SDK_SYSTEM_INFO_INTERFACE_H
6
7#include <stdint.h>
8#include <string>
9#include <memory>
10
11#include <aubo/global_config.h>
12
13namespace arcs {
14namespace common_interface {
15
16/**
17 * \chinese
18 * @defgroup SystemInfo SystemInfo (系统信息)
19 * 系统信息
20 * \endchinese
21 *
22 * \english
23 * @defgroup SystemInfo System Information
24 * System Information
25 * \endenglish
26 */
27class ARCS_ABI_EXPORT SystemInfo
28{
29public:
31 virtual ~SystemInfo();
32
33 /**
34 * @ingroup SystemInfo
35 * \chinese
36 * 获取控制器软件版本号
37 *
38 * @return 返回控制器软件版本号
39 *
40 * @par Python函数原型
41 * getControlSoftwareVersionCode(self: pyaubo_sdk.SystemInfo) -> int
42 *
43 * @par Lua函数原型
44 * getControlSoftwareVersionCode() -> number
45 *
46 * @par C++示例
47 * @code
48 * int control_version =
49 * rpc_cli->getSystemInfo()->getControlSoftwareVersionCode();
50 * @endcode
51 *
52 * @par JSON-RPC请求示例
53 * {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionCode","params":[],"id":1}
54 *
55 * @par JSON-RPC响应示例
56 * {"id":1,"jsonrpc":"2.0","result":28003}
57 *
58 * \endchinese
59 * \english
60 * Get the controller software version code
61 *
62 * @return Returns the controller software version code
63 *
64 * @par Python prototype
65 * getControlSoftwareVersionCode(self: pyaubo_sdk.SystemInfo) -> int
66 *
67 * @par Lua prototype
68 * getControlSoftwareVersionCode() -> number
69 *
70 * @par C++ example
71 * @code
72 * int control_version =
73 * rpc_cli->getSystemInfo()->getControlSoftwareVersionCode();
74 * @endcode
75 *
76 * @par JSON-RPC request example
77 * {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionCode","params":[],"id":1}
78 *
79 * @par JSON-RPC response example
80 * {"id":1,"jsonrpc":"2.0","result":28003}
81 *
82 * \endenglish
83 */
85
86 /**
87 * @ingroup SystemInfo
88 * \chinese
89 * 获取完整控制器软件版本号
90 *
91 * @return 返回完整控制器软件版本号
92 *
93 * @par Python函数原型
94 * getControlSoftwareFullVersion(self: pyaubo_sdk.SystemInfo) -> str
95 *
96 * @par Lua函数原型
97 * getControlSoftwareFullVersion() -> string
98 *
99 * @par C++示例
100 * @code
101 * std::string control_version =
102 * rpc_cli->getSystemInfo()->getControlSoftwareFullVersion();
103 * @endcode
104 *
105 * @par JSON-RPC请求示例
106 * {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareFullVersion","params":[],"id":1}
107 *
108 * @par JSON-RPC响应示例
109 * {"id":1,"jsonrpc":"2.0","result":"0.31.0-alpha.16+20alc76"}
110 *
111 * \endchinese
112 * \english
113 * Get the full controller software version
114 *
115 * @return Returns the full controller software version
116 *
117 * @par Python prototype
118 * getControlSoftwareFullVersion(self: pyaubo_sdk.SystemInfo) -> str
119 *
120 * @par Lua prototype
121 * getControlSoftwareFullVersion() -> string
122 *
123 * @par C++ example
124 * @code
125 * std::string control_version =
126 * rpc_cli->getSystemInfo()->getControlSoftwareFullVersion();
127 * @endcode
128 *
129 * @par JSON-RPC request example
130 * {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareFullVersion","params":[],"id":1}
131 *
132 * @par JSON-RPC response example
133 * {"id":1,"jsonrpc":"2.0","result":"0.31.0-alpha.16+20alc76"}
134 *
135 * \endenglish
136 */
138
139 /**
140 * @ingroup SystemInfo
141 * \chinese
142 * 获取接口版本号
143 *
144 * @return 返回接口版本号
145 *
146 * @par Python函数原型
147 * getInterfaceVersionCode(self: pyaubo_sdk.SystemInfo) -> int
148 *
149 * @par Lua函数原型
150 * getInterfaceVersionCode() -> number
151 *
152 * @par C++示例
153 * @code
154 * int interface_version =
155 * rpc_cli->getSystemInfo()->getInterfaceVersionCode();
156 * @endcode
157 *
158 * @par JSON-RPC请求示例
159 * {"jsonrpc":"2.0","method":"SystemInfo.getInterfaceVersionCode","params":[],"id":1}
160 *
161 * @par JSON-RPC响应示例
162 * {"id":1,"jsonrpc":"2.0","result":22003}
163 *
164 * \endchinese
165 * \english
166 * Get the interface version code
167 *
168 * @return Returns the interface version code
169 *
170 * @par Python prototype
171 * getInterfaceVersionCode(self: pyaubo_sdk.SystemInfo) -> int
172 *
173 * @par Lua prototype
174 * getInterfaceVersionCode() -> number
175 *
176 * @par C++ example
177 * @code
178 * int interface_version =
179 * rpc_cli->getSystemInfo()->getInterfaceVersionCode();
180 * @endcode
181 *
182 * @par JSON-RPC request example
183 * {"jsonrpc":"2.0","method":"SystemInfo.getInterfaceVersionCode","params":[],"id":1}
184 *
185 * @par JSON-RPC response example
186 * {"id":1,"jsonrpc":"2.0","result":22003}
187 *
188 * \endenglish
189 */
191
192 /**
193 * @ingroup SystemInfo
194 * \chinese
195 * 获取控制器软件构建时间
196 *
197 * @return 返回控制器软件构建时间
198 *
199 * @par Python函数原型
200 * getControlSoftwareBuildDate(self: pyaubo_sdk.SystemInfo) -> str
201 *
202 * @par Lua函数原型
203 * getControlSoftwareBuildDate() -> string
204 *
205 * @par C++示例
206 * @code
207 * std::string build_date =
208 * rpc_cli->getSystemInfo()->getControlSoftwareBuildDate();
209 * @endcode
210 *
211 * @par JSON-RPC请求示例
212 * {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareBuildDate","params":[],"id":1}
213 *
214 * @par JSON-RPC响应示例
215 * {"id":1,"jsonrpc":"2.0","result":"2024-3-5 07:03:20"}
216 *
217 * \endchinese
218 * \english
219 * Get the controller software build date
220 *
221 * @return Returns the controller software build date
222 *
223 * @par Python prototype
224 * getControlSoftwareBuildDate(self: pyaubo_sdk.SystemInfo) -> str
225 *
226 * @par Lua prototype
227 * getControlSoftwareBuildDate() -> string
228 *
229 * @par C++ example
230 * @code
231 * std::string build_date =
232 * rpc_cli->getSystemInfo()->getControlSoftwareBuildDate();
233 * @endcode
234 *
235 * @par JSON-RPC request example
236 * {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareBuildDate","params":[],"id":1}
237 *
238 * @par JSON-RPC response example
239 * {"id":1,"jsonrpc":"2.0","result":"2024-3-5 07:03:20"}
240 *
241 * \endenglish
242 */
244
245 /**
246 * @ingroup SystemInfo
247 * \chinese
248 * 获取控制器软件git版本
249 *
250 * @return 返回控制器软件git版本
251 *
252 * @par Python函数原型
253 * getControlSoftwareVersionHash(self: pyaubo_sdk.SystemInfo) -> str
254 *
255 * @par Lua函数原型
256 * getControlSoftwareVersionHash() -> string
257 *
258 * @par C++示例
259 * @code
260 * std::string git_version =
261 * rpc_cli->getSystemInfo()->getControlSoftwareVersionHash();
262 * @endcode
263 *
264 * @par JSON-RPC请求示例
265 * {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionHash","params":[],"id":1}
266 *
267 * @par JSON-RPC响应示例
268 * {"id":1,"jsonrpc":"2.0","result":"fa4f64a"}
269 *
270 * \endchinese
271 * \english
272 * Get the controller software git version
273 *
274 * @return Returns the controller software git version
275 *
276 * @par Python prototype
277 * getControlSoftwareVersionHash(self: pyaubo_sdk.SystemInfo) -> str
278 *
279 * @par Lua prototype
280 * getControlSoftwareVersionHash() -> string
281 *
282 * @par C++ example
283 * @code
284 * std::string git_version =
285 * rpc_cli->getSystemInfo()->getControlSoftwareVersionHash();
286 * @endcode
287 *
288 * @par JSON-RPC request example
289 * {"jsonrpc":"2.0","method":"SystemInfo.getControlSoftwareVersionHash","params":[],"id":1}
290 *
291 * @par JSON-RPC response example
292 * {"id":1,"jsonrpc":"2.0","result":"fa4f64a"}
293 *
294 * \endenglish
295 */
297
298 /**
299 * @ingroup SystemInfo
300 * \chinese
301 * 获取系统时间(软件启动时间 ns 纳秒)
302 *
303 * @return 返回系统时间(软件启动时间 ns 纳秒)
304 *
305 * @par Python函数原型
306 * getControlSystemTime(self: pyaubo_sdk.SystemInfo) -> int
307 *
308 * @par Lua函数原型
309 * getControlSystemTime() -> number
310 *
311 * @par C++示例
312 * @code
313 * std::string system_time =
314 * rpc_cli->getSystemInfo()->getControlSystemTime();
315 * @endcode
316 *
317 * @par JSON-RPC请求示例
318 * {"jsonrpc":"2.0","method":"SystemInfo.getControlSystemTime","params":[],"id":1}
319 *
320 * @par JSON-RPC响应示例
321 * {"id":1,"jsonrpc":"2.0","result":9287799079682}
322 *
323 * \endchinese
324 * \english
325 * Get the system time (software start time in nanoseconds)
326 *
327 * @return Returns the system time (software start time in nanoseconds)
328 *
329 * @par Python prototype
330 * getControlSystemTime(self: pyaubo_sdk.SystemInfo) -> int
331 *
332 * @par Lua prototype
333 * getControlSystemTime() -> number
334 *
335 * @par C++ example
336 * @code
337 * std::string system_time =
338 * rpc_cli->getSystemInfo()->getControlSystemTime();
339 * @endcode
340 *
341 * @par JSON-RPC request example
342 * {"jsonrpc":"2.0","method":"SystemInfo.getControlSystemTime","params":[],"id":1}
343 *
344 * @par JSON-RPC response example
345 * {"id":1,"jsonrpc":"2.0","result":9287799079682}
346 *
347 * \endenglish
348 */
350
351protected:
352 void *d_;
353};
354
355using SystemInfoPtr = std::shared_ptr<SystemInfo>;
356
357} // namespace common_interface
358} // namespace arcs
359#endif
int getInterfaceVersionCode()
获取接口版本号
std::string getControlSoftwareFullVersion()
获取完整控制器软件版本号
uint64_t getControlSystemTime()
获取系统时间(软件启动时间 ns 纳秒)
std::string getControlSoftwareBuildDate()
获取控制器软件构建时间
int getControlSoftwareVersionCode()
获取控制器软件版本号
std::string getControlSoftwareVersionHash()
获取控制器软件git版本
std::shared_ptr< SystemInfo > SystemInfoPtr