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