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