AUBO SDK  0.26.0
Loading...
Searching...
No Matches
register_control.h
Go to the documentation of this file.
1/** @file register_control.h
2 * @brief 寄存器操作接口,用于三个模块之间的数据交换功能
3 */
4#ifndef AUBO_SDK_REGISTER_CONTROL_INTERFACE_H
5#define AUBO_SDK_REGISTER_CONTROL_INTERFACE_H
6
7#include <stdint.h>
8#include <memory>
9#include <vector>
10
11#include <aubo/type_def.h>
12#include <aubo/global_config.h>
13
15{
16 /** MODBUS unit not initiallized
17 */
19
20 /** MODBUS unit disconnected
21 */
23
24 /** The function code received in the query is not an allowable action for
25 * the server (or slave).
26 */
28
29 /** The function code received in the query is not an allowable action for
30 * the server (or slave), check that the entered signal address corresponds
31 * to the setup of the remote MODBUS server.
32 */
34
35 /** A value contained in the query data field is not an allowable value for
36 * server (or slave), check that the enterd signal value is valid for the
37 * specified address on the remote MODBUS server.
38 */
40
41 /** An unrecoverable error occurred while the server (or slave) was
42 * attempting to perform the requested action.
43 */
45
46 /** Specialized use in conjunction with programming commands sent to the
47 * remote MODBUS unit.
48 */
50
51 /** Specialized use in conjunction with programming commands sent to the
52 * remote MODBUS unit, the slave (server) is not able to respond now
53 */
55};
56
57namespace arcs {
58namespace common_interface {
59
60/**
61 * \~chinese 通用寄存器 \~english General Registers
62 */
63class ARCS_ABI_EXPORT RegisterControl
64{
65public:
68
69 /**
70 * \chinese
71 *
72 * 从一个输入寄存器中读取布尔值,也可以通过现场总线进行访问。
73 * 注意,它使用自己的内存空间。
74 *
75 * @param address 寄存器的地址(0:127)
76 * @return 寄存器中保存的布尔值(true、false)
77 *
78 * @note 布尔输入寄存器的较低范围[0:63]保留供FieldBus/PLC接口使用。
79 * 较高范围[64:127]无法通过FieldBus/PLC接口访问,因为它保留供外部RTDE客户端使用。
80 *
81 * @par Python函数原型
82 * getBoolInput(self: pyaubo_sdk.RegisterControl, arg0: int) -> bool
83 *
84 * @par Lua函数原型
85 * getBoolInput(address: number) -> boolean
86 *
87 * @par Lua示例
88 * BoolInput_0 = getBoolInput(0)
89 *
90 * @par JSON-RPC请求示例
91 * {"jsonrpc":"2.0","method":"RegisterControl.getBoolInput","params":[0],"id":1}
92 *
93 * @par JSON-RPC响应示例
94 * {"id":1,"jsonrpc":"2.0","result":false}
95 * \endchinese
96 *
97 * \english
98 * Reads the boolean from one of the input registers, which can also be
99 * accessed by a Field bus. Note, uses its own memory space.
100 *
101 * @param address Address of the register (0:127)
102 * @return Boolean value held by the register (true, false)
103 *
104 * @note The lower range of the boolean input registers [0:63] is reserved
105 * for FieldBus/PLC interface usage. The upper range [64:127] cannot be
106 * accessed by FieldBus/PLC interfaces, since it is reserved for external
107 * RTDE clients.
108 *
109 * @par Python interface prototype
110 * getBoolInput(self: pyaubo_sdk.RegisterControl, arg0: int) -> bool
111 *
112 * @par Lua interface prototype
113 * getBoolInput(address: number) -> boolean
114 *
115 * @par Lua example
116 * BoolInput_0 = getBoolInput(0)
117 *
118 * @par JSON-RPC request example
119 * {"jsonrpc":"2.0","method":"RegisterControl.getBoolInput","params":[0],"id":1}
120 *
121 * @par JSON-RPC response example
122 * {"id":1,"jsonrpc":"2.0","result":false}
123 * \endenglish
124 */
125 bool getBoolInput(uint32_t address);
126
127 /**
128 * \chinese
129 *
130 * @param address
131 * @param value
132 * @return
133 *
134 * @note 只有在实现 RTDE/Modbus Slave/PLC 服务端时使用
135 *
136 * @par Python函数原型
137 * setBoolInput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: bool) ->
138 * int
139 *
140 * @par Lua函数原型
141 * setBoolInput(address: number, value: boolean) -> nil
142 *
143 * @par Lua示例
144 * setBoolInput(0)
145 *
146 * @par JSON-RPC请求示例
147 * {"jsonrpc":"2.0","method":"RegisterControl.setBoolInput","params":[0,true],"id":1}
148 *
149 * @par JSON-RPC响应示例
150 * {"id":1,"jsonrpc":"2.0","result":0}
151 *
152 * \endchinese
153 * \english
154 *
155 * @param address Address of the register (0:127)
156 * @param value Boolean value to set (true or false)
157 * @return Returns 0 on success, or an error code
158 *
159 * @note Only used when implementing RTDE/Modbus Slave/PLC server
160 *
161 * @par Python interface prototype
162 * setBoolInput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: bool) ->
163 * int
164 *
165 * @par Lua interface prototype
166 * setBoolInput(address: number, value: boolean) -> nil
167 *
168 * @par Lua example
169 * setBoolInput(0)
170 *
171 * @par JSON-RPC request example
172 * {"jsonrpc":"2.0","method":"RegisterControl.setBoolInput","params":[0,true],"id":1}
173 *
174 * @par JSON-RPC response example
175 * {"id":1,"jsonrpc":"2.0","result":0}
176 *
177 * \endenglish
178 */
179 int setBoolInput(uint32_t address, bool value);
180
181 /**
182 * \chinese
183 *
184 * 从一个输入寄存器中读取整数值,也可以通过现场总线进行访问。
185 * 注意,它使用自己的内存空间。
186 *
187 * @param address 寄存器的地址(0:47)
188 * @return 寄存器中保存的整数值[-2,147,483,648 : 2,147,483,647]
189 *
190 * @note 整数输入寄存器的较低范围[0:23]保留供FieldBus/PLC接口使用。
191 * 较高范围[24:47]无法通过FieldBus/PLC接口访问,因为它保留供外部RTDE客户端使用。
192 *
193 * @par Python函数原型
194 * getInt32Input(self: pyaubo_sdk.RegisterControl, arg0: int) -> int
195 *
196 * @par Lua函数原型
197 * getInt32Input(address: number) -> number
198 *
199 * @par Lua示例
200 * Int32Input_0 = getInt32Input(0)
201 *
202 * @par JSON-RPC请求示例
203 * {"jsonrpc":"2.0","method":"RegisterControl.getInt32Input","params":[0],"id":1}
204 *
205 * @par JSON-RPC响应示例
206 * {"id":1,"jsonrpc":"2.0","result":0}
207 * \endchinese
208 *
209 * \english
210 * Reads the integer from one of the input registers, which can also be
211 * accessed by a FieldBus. Note, uses it’s own memory space.
212 *
213 * @param address Address of the register (0:47)
214 * @return The value held by the register [-2,147,483,648 : 2,147,483,647]
215 *
216 * @note The lower range of the integer input registers [0:23] is reserved
217 * for FieldBus/PLC interface usage. The upper range [24:47] cannot be
218 * accessed by FieldBus/PLC interfaces, since it is reserved for external
219 * RTDE clients.
220 *
221 * @par Python interface prototype
222 * getInt32Input(self: pyaubo_sdk.RegisterControl, arg0: int) -> int
223 *
224 * @par Lua interface prototype
225 * getInt32Input(address: number) -> number
226 *
227 * @par Lua example
228 * Int32Input_0 = getInt32Input(0)
229 *
230 * @par JSON-RPC request example
231 * {"jsonrpc":"2.0","method":"RegisterControl.getInt32Input","params":[0],"id":1}
232 *
233 * @par JSON-RPC response example
234 * {"id":1,"jsonrpc":"2.0","result":0}
235 * \endchinese
236 */
237 int getInt32Input(uint32_t address);
238
239 /**
240 * \chinese
241 *
242 * @param address 寄存器的地址(0:47)
243 * @param value 要设置的整数值
244 * @return 返回0表示成功,其他为错误码
245 *
246 * @note 只有在实现 RTDE/Modbus Slave/PLC 服务端时使用
247 *
248 * @par Python函数原型
249 * setInt32Input(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: int) ->
250 * int
251 *
252 * @par Lua函数原型
253 * setInt32Input(address: number, value: number) -> nil
254 *
255 * @par Lua示例
256 * setInt32Input(0)
257 *
258 * @par JSON-RPC请求示例
259 * {"jsonrpc":"2.0","method":"RegisterControl.setInt32Input","params":[0,33],"id":1}
260 *
261 * @par JSON-RPC响应示例
262 * {"id":1,"jsonrpc":"2.0","result":0}
263 *
264 * \endchinese
265 * \english
266 *
267 * @param address Address of the register (0:47)
268 * @param value Integer value to set
269 * @return Returns 0 on success, or an error code
270 *
271 * @note Only used when implementing RTDE/Modbus Slave/PLC server
272 *
273 * @par Python interface prototype
274 * setInt32Input(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: int) ->
275 * int
276 *
277 * @par Lua interface prototype
278 * setInt32Input(address: number, value: number) -> nil
279 *
280 * @par Lua example
281 * setInt32Input(0)
282 *
283 * @par JSON-RPC request example
284 * {"jsonrpc":"2.0","method":"RegisterControl.setInt32Input","params":[0,33],"id":1}
285 *
286 * @par JSON-RPC response example
287 * {"id":1,"jsonrpc":"2.0","result":0}
288 *
289 * \endenglish
290 */
291 int setInt32Input(uint32_t address, int value);
292
293 /**
294 * \chinese
295 * Reads the float from one of the input registers, which can also be
296 * accessed by a Field bus. Note, uses it’s own memory space.
297 *
298 * 从一个输入寄存器中读取浮点数,也可以通过现场总线进行访问。
299 * 注意,它使用自己的内存空间。
300 *
301 * @param address Address of the register (0:47)
302 * 寄存器地址(0:47)
303 * @return The value held by the register (float)
304 * 寄存器中保存的浮点数值
305 *
306 * @note The lower range of the float input registers [0:23] is reserved
307 * for FieldBus/PLC interface usage. The upper range [24:47] cannot be
308 * accessed by FieldBus/PLC interfaces, since it is reserved for external
309 * RTDE clients.
310 * 浮点数输入寄存器的较低范围[0:23]保留供现场总线/PLC接口使用。
311 * 较高范围[24:47]不能通过现场总线/PLC接口访问,因为它们是为外部RTDE客户端保留的。
312 *
313 * @par Python函数原型
314 * getFloatInput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
315 *
316 * @par Lua函数原型
317 * getFloatInput(address: number) -> number
318 *
319 * @par Lua示例
320 * FloatInput_0 = getFloatInput(0)
321 *
322 * @par JSON-RPC请求示例
323 * {"jsonrpc":"2.0","method":"RegisterControl.getFloatInput","params":[0],"id":1}
324 *
325 * @par JSON-RPC响应示例
326 * {"id":1,"jsonrpc":"2.0","result":0.0}
327 *
328 * \endchinese
329 *
330 * \english
331 * Reads the float from one of the input registers, which can also be
332 * accessed by a Field bus. Note, uses it’s own memory space.
333 *
334 * @param address Address of the register (0:47)
335 * @return The value held by the register (float)
336 *
337 * @note The lower range of the float input registers [0:23] is reserved
338 * for FieldBus/PLC interface usage. The upper range [24:47] cannot be
339 * accessed by FieldBus/PLC interfaces, since it is reserved for external
340 * RTDE clients.
341 *
342 * @par Python interface prototype
343 * getFloatInput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
344 *
345 * @par Lua interface prototype
346 * getFloatInput(address: number) -> number
347 *
348 * @par Lua example
349 * FloatInput_0_0 = getFloatInput(0)
350 *
351 * @par JSON-RPC request example
352 * {"jsonrpc":"2.0","method":"RegisterControl.getFloatInput","params":[0],"id":1}
353 *
354 * @par JSON-RPC response example
355 * {"id":1,"jsonrpc":"2.0","result":0.0}
356 */
357 float getFloatInput(uint32_t address);
358
359 /**
360 * \chinese
361 *
362 * @param address 寄存器的地址(0:47)
363 * @param value 要设置的浮点数值
364 * @return 返回0表示成功,其他为错误码
365 *
366 * @note 只有在实现 RTDE/Modbus Slave/PLC 服务端时使用
367 *
368 * @par Python函数原型
369 * setFloatInput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float)
370 * -> int
371 *
372 * @par Lua函数原型
373 * setFloatInput(address: number, value: number) -> nil
374 *
375 * @par Lua示例
376 * setFloatInput(0, 3.3)
377 *
378 * @par JSON-RPC请求示例
379 * {"jsonrpc":"2.0","method":"RegisterControl.setFloatInput","params":[0,3.3],"id":1}
380 *
381 * @par JSON-RPC响应示例
382 * {"id":1,"jsonrpc":"2.0","result":0}
383 *
384 * \endchinese
385 * \english
386 *
387 * @param address Address of the register (0:47)
388 * @param value Float value to set
389 * @return Returns 0 on success, or an error code
390 *
391 * @note Only used when implementing RTDE/Modbus Slave/PLC server
392 *
393 * @par Python interface prototype
394 * setFloatInput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float)
395 * -> int
396 *
397 * @par Lua interface prototype
398 * setFloatInput(address: number, value: number) -> nil
399 *
400 * @par Lua example
401 * setFloatInput(0, 3.3)
402 *
403 * @par JSON-RPC request example
404 * {"jsonrpc":"2.0","method":"RegisterControl.setFloatInput","params":[0,3.3],"id":1}
405 *
406 * @par JSON-RPC response example
407 * {"id":1,"jsonrpc":"2.0","result":0}
408 *
409 * \endenglish
410 */
411 int setFloatInput(uint32_t address, float value);
412
413 /**
414 * \chinese
415 *
416 * 从一个输入寄存器中读取双精度浮点数,也可以通过现场总线进行访问。
417 * 注意,它使用自己的内存空间。
418 *
419 * @param address 寄存器的地址(0:47)
420 * @return 寄存器中保存的双精度浮点数值
421 *
422 * @par Python函数原型
423 * getDoubleInput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
424 *
425 * @par Lua函数原型
426 * getDoubleInput(address: number) -> number
427 *
428 * @par Lua示例
429 * DoubleInput_0 = getDoubleInput(0)
430 *
431 * @par JSON-RPC请求示例
432 * {"jsonrpc":"2.0","method":"RegisterControl.getDoubleInput","params":[0],"id":1}
433 *
434 * @par JSON-RPC响应示例
435 * {"id":1,"jsonrpc":"2.0","result":0.0}
436 *
437 * \endchinese
438 * \english
439 *
440 * Reads the double value from one of the input registers, which can also be
441 * accessed by a FieldBus. Note, uses its own memory space.
442 *
443 * @param address Address of the register (0:47)
444 * @return The double value held by the register
445 *
446 * @par Python interface prototype
447 * getDoubleInput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
448 *
449 * @par Lua interface prototype
450 * getDoubleInput(address: number) -> number
451 *
452 * @par Lua example
453 * DoubleInput_0 = getDoubleInput(0)
454 *
455 * @par JSON-RPC request example
456 * {"jsonrpc":"2.0","method":"RegisterControl.getDoubleInput","params":[0],"id":1}
457 *
458 * @par JSON-RPC response example
459 * {"id":1,"jsonrpc":"2.0","result":0.0}
460 *
461 * \endenglish
462 */
463 double getDoubleInput(uint32_t address);
464
465 /**
466 * \english
467 * @param address
468 * @param value
469 * @return
470 *
471 * @note Only used when implementing RTDE/Modbus Slave/PLC server
472 *
473 * @par Python interface prototype
474 * setDoubleInput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float)
475 * -> int
476 *
477 * @par Lua interface prototype
478 * setDoubleInput(address: number, value: number) -> nil
479 *
480 * @par Lua example
481 * setDoubleInput(0, 3.3)
482 *
483 * @par JSON-RPC request example
484 * {"jsonrpc":"2.0","method":"RegisterControl.setDoubleInput","params":[0,6.6],"id":1}
485 *
486 * @par JSON-RPC response example
487 * {"id":1,"jsonrpc":"2.0","result":0}
488 * \endenglish
489 *
490 * \chinese
491 * @param address
492 * @param value
493 * @return
494 *
495 * @note 只有在实现 RTDE/Modbus Slave/PLC 服务端时使用
496 *
497 * @par Python函数原型
498 * setDoubleInput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float)
499 * -> int
500 *
501 * @par Lua函数原型
502 * setDoubleInput(address: number, value: number) -> nil
503 *
504 * @par Lua示例
505 * setDoubleInput(0, 3.3)
506 *
507 * @par JSON-RPC请求示例
508 * {"jsonrpc":"2.0","method":"RegisterControl.setDoubleInput","params":[0,6.6],"id":1}
509 *
510 * @par JSON-RPC响应示例
511 * {"id":1,"jsonrpc":"2.0","result":0}
512 * \endchinese
513 */
514 int setDoubleInput(uint32_t address, double value);
515
516 /**
517 * \chinese
518 * 从一个输出寄存器中读取布尔值,也可以通过现场总线进行访问。
519 * 注意,它使用自己的内存空间。
520 *
521 * @param address 寄存器地址(0:127)
522 * @return 寄存器中保存的布尔值(true, false)
523 *
524 * @note 布尔输出寄存器的较低范围[0:63]保留供现场总线/PLC接口使用。
525 * 较高范围[64:127]不能通过现场总线/PLC接口访问,因为它们是为外部RTDE客户端保留的。
526 *
527 * @par Python函数原型
528 * getBoolOutput(self: pyaubo_sdk.RegisterControl, arg0: int) -> bool
529 *
530 * @par Lua函数原型
531 * getBoolOutput(address: number) -> boolean
532 *
533 * @par Lua示例
534 * BoolOutput_0 = getBoolOutput(0)
535 *
536 * @par JSON-RPC请求示例
537 * {"jsonrpc":"2.0","method":"RegisterControl.getBoolOutput","params":[0],"id":1}
538 *
539 * @par JSON-RPC响应示例
540 * {"id":1,"jsonrpc":"2.0","result":false}
541 * \endchinese
542 *
543 * \english
544 * Reads the boolean from one of the output registers, which can also be
545 * accessed by a Field bus.
546 * Note, uses its own memory space.
547 *
548 * @param address Address of the register (0:127)
549 * @return The boolean value held by the register (true, false)
550 *
551 * @note The lower range of the boolean output registers [0:63] is reserved
552 * for FieldBus/PLC interface usage. The upper range [64:127] cannot be
553 * accessed by FieldBus/PLC interfaces, since it is reserved for external
554 * RTDE clients.
555 *
556 * @par Python interface prototype
557 * getBoolOutput(self: pyaubo_sdk.RegisterControl, arg0: int) -> bool
558 *
559 * @par Lua interface prototype
560 * getBoolOutput(address: number) -> boolean
561 *
562 * @par Lua example
563 * BoolOutput_0 = getBoolOutput(0)
564 *
565 * @par JSON-RPC request example
566 * {"jsonrpc":"2.0","method":"RegisterControl.getBoolOutput","params":[0],"id":1}
567 *
568 * @par JSON-RPC response example
569 * {"id":1,"jsonrpc":"2.0","result":false}
570 * \endenglish
571 */
572 bool getBoolOutput(uint32_t address);
573
574 /**
575 * \chinese
576 *
577 * @param address 寄存器地址(0:127)
578 * @param value 要设置的布尔值(true 或 false)
579 * @return 返回0表示成功,其他为错误码
580 *
581 * @par Python函数原型
582 * setBoolOutput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: bool) ->
583 * int
584 *
585 * @par Lua函数原型
586 * setBoolOutput(address: number, value: boolean) -> nil
587 *
588 * @par Lua示例
589 * setBoolOutput(0)
590 *
591 * @par JSON-RPC请求示例
592 * {"jsonrpc":"2.0","method":"RegisterControl.setBoolOutput","params":[0,false],"id":1}
593 *
594 * @par JSON-RPC响应示例
595 * {"id":1,"jsonrpc":"2.0","result":0}
596 *
597 * \endchinese
598 * \english
599 *
600 * @param address Address of the register (0:127)
601 * @param value Boolean value to set (true or false)
602 * @return Returns 0 on success, or an error code
603 *
604 * @par Python interface prototype
605 * setBoolOutput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: bool) ->
606 * int
607 *
608 * @par Lua interface prototype
609 * setBoolOutput(address: number, value: boolean) -> nil
610 *
611 * @par Lua example
612 * setBoolOutput(0)
613 *
614 * @par JSON-RPC request example
615 * {"jsonrpc":"2.0","method":"RegisterControl.setBoolOutput","params":[0,false],"id":1}
616 *
617 * @par JSON-RPC response example
618 * {"id":1,"jsonrpc":"2.0","result":0}
619 *
620 * \endenglish
621 */
622 int setBoolOutput(uint32_t address, bool value);
623
624 /**
625 * \chinese
626 * 从一个输出寄存器中读取整数值,也可以通过现场总线进行访问。
627 * 注意,它使用自己的内存空间。
628 *
629 * @param address 寄存器地址(0:47)
630 * @return 寄存器中保存的整数值(-2,147,483,648 : 2,147,483,647)
631 *
632 * @note 整数输出寄存器的较低范围[0:23]保留供现场总线/PLC接口使用。
633 * 较高范围[24:47]不能通过现场总线/PLC接口访问,因为它们是为外部RTDE客户端保留的。
634 *
635 * @par Python函数原型
636 * getInt32Output(self: pyaubo_sdk.RegisterControl, arg0: int) -> int
637 *
638 * @par Lua函数原型
639 * getInt32Output(address: number) -> number
640 *
641 * @par Lua示例
642 * Int32Output_0 = getInt32Output(0)
643 *
644 * @par JSON-RPC请求示例
645 * {"jsonrpc":"2.0","method":"RegisterControl.getInt32Output","params":[0],"id":1}
646 *
647 * @par JSON-RPC响应示例
648 * {"id":1,"jsonrpc":"2.0","result":0}
649 * \endchinese
650 *
651 * \english
652 * Reads the integer from one of the output registers, which can also be
653 * accessed by a FieldBus. Note, uses its own memory space.
654 *
655 * @param address Address of the register (0:47)
656 * @return The int value held by the register [-2,147,483,648 :
657 * 2,147,483,647]
658 *
659 * @note The lower range of the integer output registers [0:23] is reserved
660 * for FieldBus/PLC interface usage. The upper range [24:47] cannot be
661 * accessed by FieldBus/PLC interfaces, since it is reserved for external
662 * RTDE clients.
663 *
664 * @par Python interface prototype
665 * getInt32Output(self: pyaubo_sdk.RegisterControl, arg0: int) -> int
666 *
667 * @par Lua interface prototype
668 * getInt32Output(address: number) -> number
669 *
670 * @par Lua example
671 * Int32Output_0 = getInt32Output(0)
672 *
673 * @par JSON-RPC request example
674 * {"jsonrpc":"2.0","method":"RegisterControl.getInt32Output","params":[0],"id":1}
675 *
676 * @par JSON-RPC response example
677 * {"id":1,"jsonrpc":"2.0","result":0}
678 * \endenglish
679 */
680 int getInt32Output(uint32_t address);
681
682 /**
683 * \chinese
684 *
685 * @param address 寄存器地址(0:47)
686 * @param value 要设置的整数值
687 * @return 返回0表示成功,其他为错误码
688 *
689 * @par Python函数原型
690 * setInt32Output(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: int) ->
691 * int
692 *
693 * @par Lua函数原型
694 * setInt32Output(address: number, value: number) -> nil
695 *
696 * @par Lua示例
697 * setInt32Output(0, 100)
698 *
699 * @par JSON-RPC请求示例
700 * {"jsonrpc":"2.0","method":"RegisterControl.setInt32Output","params":[0,100],"id":1}
701 *
702 * @par JSON-RPC响应示例
703 * {"id":1,"jsonrpc":"2.0","result":0}
704 *
705 * \endchinese
706 * \english
707 *
708 * @param address Address of the register (0:47)
709 * @param value Integer value to set
710 * @return Returns 0 on success, or an error code
711 *
712 * @par Python interface prototype
713 * setInt32Output(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: int) ->
714 * int
715 *
716 * @par Lua interface prototype
717 * setInt32Output(address: number, value: number) -> nil
718 *
719 * @par Lua example
720 * setInt32Output(0, 100)
721 *
722 * @par JSON-RPC request example
723 * {"jsonrpc":"2.0","method":"RegisterControl.setInt32Output","params":[0,100],"id":1}
724 *
725 * @par JSON-RPC response example
726 * {"id":1,"jsonrpc":"2.0","result":0}
727 *
728 * \endenglish
729 */
730 int setInt32Output(uint32_t address, int value);
731
732 /**
733 * \chinese
734 * 从一个输出寄存器中读取浮点数,也可以通过现场总线进行访问。
735 * 注意,它使用自己的内存空间。
736 *
737 * @param address 寄存器地址(0:47)
738 * @return 寄存器中保存的浮点数值(float)
739 *
740 * @note 浮点数输出寄存器的较低范围[0:23]保留供现场总线/PLC接口使用。
741 * 较高范围[24:47]不能通过现场总线/PLC接口访问,因为它们是为外部RTDE客户端保留的。
742 *
743 * @par Python函数原型
744 * getFloatOutput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
745 *
746 * @par Lua函数原型
747 * getFloatOutput(address: number) -> number
748 *
749 * @par Lua示例
750 * FloatOutput_0 = getFloatOutput(0)
751 *
752 * @par JSON-RPC请求示例
753 * {"jsonrpc":"2.0","method":"RegisterControl.getFloatOutput","params":[0],"id":1}
754 *
755 * @par JSON-RPC响应示例
756 * {"id":1,"jsonrpc":"2.0","result":3.3}
757 * \endchinese
758 *
759 * \english
760 * Reads the float from one of the output registers, which can also be
761 * accessed by a FieldBus. Note, uses its own memory space.
762 *
763 * @param address Address of the register (0:47)
764 * @return The value held by the register (float)
765 *
766 * @note The lower range of the float output registers [0:23] is reserved
767 * for FieldBus/PLC interface usage. The upper range [24:47] cannot be
768 * accessed by FieldBus/PLC interfaces, since it is reserved for external
769 * RTDE clients.
770 *
771 * @par Python interface prototype
772 * getFloatOutput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
773 *
774 * @par Lua interface prototype
775 * getFloatOutput(address: number) -> number
776 *
777 * @par Lua example
778 * FloatOutput_0 = getFloatOutput(0)
779 *
780 * @par JSON-RPC request example
781 * {"jsonrpc":"2.0","method":"RegisterControl.getFloatOutput","params":[0],"id":1}
782 *
783 * @par JSON-RPC response example
784 * {"id":1,"jsonrpc":"2.0","result":3.3}
785 * \endenglish
786 */
787 float getFloatOutput(uint32_t address);
788
789 /**
790 * \chinese
791 *
792 * @param address 寄存器地址(0:47)
793 * @param value 要设置的浮点数值
794 * @return 返回0表示成功,其他为错误码
795 *
796 * @par Python函数原型
797 * setFloatOutput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float)
798 * -> int
799 *
800 * @par Lua函数原型
801 * setFloatOutput(address: number, value: number) -> nil
802 *
803 * @par Lua示例
804 * setFloatOutput(0,5.5)
805 *
806 * @par JSON-RPC请求示例
807 * {"jsonrpc":"2.0","method":"RegisterControl.setFloatOutput","params":[0,5.5],"id":1}
808 *
809 * @par JSON-RPC响应示例
810 * {"id":1,"jsonrpc":"2.0","result":0}
811 *
812 * \endchinese
813 * \english
814 *
815 * @param address Address of the register (0:47)
816 * @param value Float value to set
817 * @return Returns 0 on success, or an error code
818 *
819 * @par Python interface prototype
820 * setFloatOutput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float)
821 * -> int
822 *
823 * @par Lua interface prototype
824 * setFloatOutput(address: number, value: number) -> nil
825 *
826 * @par Lua example
827 * setFloatOutput(0,5.5)
828 *
829 * @par JSON-RPC request example
830 * {"jsonrpc":"2.0","method":"RegisterControl.setFloatOutput","params":[0,5.5],"id":1}
831 *
832 * @par JSON-RPC response example
833 * {"id":1,"jsonrpc":"2.0","result":0}
834 *
835 * \endenglish
836 */
837 int setFloatOutput(uint32_t address, float value);
838
839 /**
840 * \chinese
841 *
842 * 从一个输出寄存器中读取双精度浮点数。
843 *
844 * @param address 寄存器地址
845 * @return 寄存器中保存的双精度浮点数值
846 *
847 * @par Python函数原型
848 * getDoubleOutput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
849 *
850 * @par Lua函数原型
851 * getDoubleOutput(address: number) -> number
852 *
853 * @par Lua示例
854 * DoubleOutput_0 = getDoubleOutput(0)
855 *
856 * @par JSON-RPC请求示例
857 * {"jsonrpc":"2.0","method":"RegisterControl.getDoubleOutput","params":[0],"id":1}
858 *
859 * @par JSON-RPC响应示例
860 * {"id":1,"jsonrpc":"2.0","result":0.0}
861 *
862 * \endchinese
863 * \english
864 *
865 * Reads the double value from one of the output registers.
866 *
867 * @param address Address of the register
868 * @return The double value held by the register
869 *
870 * @par Python interface prototype
871 * getDoubleOutput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
872 *
873 * @par Lua interface prototype
874 * getDoubleOutput(address: number) -> number
875 *
876 * @par Lua example
877 * DoubleOutput_0 = getDoubleOutput(0)
878 *
879 * @par JSON-RPC request example
880 * {"jsonrpc":"2.0","method":"RegisterControl.getDoubleOutput","params":[0],"id":1}
881 *
882 * @par JSON-RPC response example
883 * {"id":1,"jsonrpc":"2.0","result":0.0}
884 *
885 * \endenglish
886 */
887 double getDoubleOutput(uint32_t address);
888
889 /**
890 * \chinese
891 *
892 * @param address 寄存器地址
893 * @param value 要设置的双精度浮点数值
894 * @return 返回0表示成功,其他为错误码
895 *
896 * @par Python函数原型
897 * setDoubleOutput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float)
898 * -> int
899 *
900 * @par Lua函数原型
901 * setDoubleOutput(address: number, value: number) -> nil
902 *
903 * @par Lua示例
904 * setDoubleOutput(0,4.4)
905 *
906 * @par JSON-RPC请求示例
907 * {"jsonrpc":"2.0","method":"RegisterControl.setDoubleOutput","params":[0,4.4],"id":1}
908 *
909 * @par JSON-RPC响应示例
910 * {"id":1,"jsonrpc":"2.0","result":0}
911 *
912 * \endchinese
913 * \english
914 *
915 * @param address Address of the register
916 * @param value Double value to set
917 * @return Returns 0 on success, or an error code
918 *
919 * @par Python interface prototype
920 * setDoubleOutput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float)
921 * -> int
922 *
923 * @par Lua interface prototype
924 * setDoubleOutput(address: number, value: number) -> nil
925 *
926 * @par Lua example
927 * setDoubleOutput(0,4.4)
928 *
929 * @par JSON-RPC request example
930 * {"jsonrpc":"2.0","method":"RegisterControl.setDoubleOutput","params":[0,4.4],"id":1}
931 *
932 * @par JSON-RPC response example
933 * {"id":1,"jsonrpc":"2.0","result":0}
934 *
935 * \endenglish
936 */
937 int setDoubleOutput(uint32_t address, double value);
938
939 /**
940 * \chinese
941 * 用于 Modbus Slave
942 *
943 * @param address
944 * @return
945 *
946 * @par Python函数原型
947 * getInt16Register(self: pyaubo_sdk.RegisterControl, arg0: int) -> int
948 *
949 * @par Lua函数原型
950 * getInt16Register(address: number) -> number
951 *
952 * @par Lua示例
953 * Int16Register_0 = getInt16Register(0)
954 *
955 * @par JSON-RPC请求示例
956 * {"jsonrpc":"2.0","method":"RegisterControl.getInt16Register","params":[0],"id":1}
957 *
958 * @par JSON-RPC响应示例
959 * {"id":1,"jsonrpc":"2.0","result":0}
960 *
961 * \endchinese
962 * \english
963 * Used for Modbus Slave
964 *
965 * @param address
966 * @return
967 *
968 * @par Python interface prototype
969 * getInt16Register(self: pyaubo_sdk.RegisterControl, arg0: int) -> int
970 *
971 * @par Lua interface prototype
972 * getInt16Register(address: number) -> number
973 *
974 * @par Lua example
975 * Int16Register_0 = getInt16Register(0)
976 *
977 * @par JSON-RPC request example
978 * {"jsonrpc":"2.0","method":"RegisterControl.getInt16Register","params":[0],"id":1}
979 *
980 * @par JSON-RPC response example
981 * {"id":1,"jsonrpc":"2.0","result":0}
982 *
983 * \endenglish
984 */
985 int16_t getInt16Register(uint32_t address);
986
987 /**
988 * \chinese
989 *
990 * @param address 寄存器地址
991 * @param value 要设置的值
992 * @return 返回0表示成功,其他为错误码
993 *
994 * @par Python函数原型
995 * setInt16Register(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: int)
996 * -> int
997 *
998 * @par Lua函数原型
999 * setInt16Register(address: number, value: number) -> nil
1000 *
1001 * @par Lua示例
1002 * setInt16Register(0,4.4)
1003 *
1004 * @par JSON-RPC请求示例
1005 * {"jsonrpc":"2.0","method":"RegisterControl.setInt16Register","params":[0,0],"id":1}
1006 *
1007 * @par JSON-RPC响应示例
1008 * {"id":1,"jsonrpc":"2.0","result":0}
1009 *
1010 * \endchinese
1011 * \english
1012 *
1013 * @param address Register address
1014 * @param value Value to set
1015 * @return Returns 0 on success, otherwise error code
1016 *
1017 * @par Python interface prototype
1018 * setInt16Register(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: int)
1019 * -> int
1020 *
1021 * @par Lua interface prototype
1022 * setInt16Register(address: number, value: number) -> nil
1023 *
1024 * @par Lua example
1025 * setInt16Register(0,4.4)
1026 *
1027 * @par JSON-RPC request example
1028 * {"jsonrpc":"2.0","method":"RegisterControl.setInt16Register","params":[0,0],"id":1}
1029 *
1030 * @par JSON-RPC response example
1031 * {"id":1,"jsonrpc":"2.0","result":0}
1032 *
1033 * \endenglish
1034 */
1035 int setInt16Register(uint32_t address, int16_t value);
1036
1037 /**
1038 * \chinese
1039 * 获取 Int16 寄存器的某个bit的状态
1040 *
1041 * @param address: Int16 寄存器地址
1042 * @param bit_offset: 寄存器中的bit偏移,0 ~ 15
1043 * @return 指定bit的状态,true表示1,false表示0或参数无效
1044 *
1045 * @par Python函数原型
1046 * getInt16RegisterBit(self: pyaubo_sdk.RegisterControl, address: int,
1047 * bit_offset: int) -> bool
1048 *
1049 * @par Lua函数原型
1050 * getInt16RegisterBit(address: number, bit_offset: number) -> boolean
1051 *
1052 * @par JSON-RPC请求示例
1053 * {"jsonrpc":"2.0","method":"RegisterControl.getInt16RegisterBit","params":[1,
1054 * 5],"id":1}
1055 *
1056 * @par JSON-RPC响应示例
1057 * {"id":1,"jsonrpc":"2.0","result":true}
1058 *
1059 * \endchinese
1060 * \english
1061 * Get the status of a specific bit in an Int16 register
1062 *
1063 * @param address Int16 register address
1064 * @param bit_offset Bit offset in the register, 0 ~ 15
1065 * @return Status of the specified bit, true for 1, false for 0 or invalid
1066 * parameters
1067 *
1068 * @par Python interface prototype
1069 * getInt16RegisterBit(self: pyaubo_sdk.RegisterControl, address: int,
1070 * bit_offset: int) -> bool
1071 *
1072 * @par Lua interface prototype
1073 * getInt16RegisterBit(address: number, bit_offset: number) -> boolean
1074 *
1075 * @par JSON-RPC request example
1076 * {"jsonrpc":"2.0","method":"RegisterControl.getInt16RegisterBit","params":[1,
1077 * 5],"id":1}
1078 *
1079 * @par JSON-RPC response example
1080 * {"id":1,"jsonrpc":"2.0","result":true}
1081 *
1082 * \endenglish
1083 */
1084 bool getInt16RegisterBit(uint32_t address, uint8_t bit_offset);
1085
1086 /**
1087 * \chinese
1088 * 设置 Int16 寄存器的某个bit的状态
1089 *
1090 * @param address: Int16 寄存器地址
1091 * @param bit_offset: 寄存器中的bit偏移,0 ~ 15
1092 * @param value: 要设置的值,true表示置1,false表示清0
1093 * @return 成功返回0,失败返回错误码
1094 *
1095 * @par Python函数原型
1096 * setInt16RegisterBit(self: pyaubo_sdk.RegisterControl, address: int,
1097 * bit_offset: int, value: bool) -> int
1098 *
1099 * @par Lua函数原型
1100 * setInt16RegisterBit(address: number, bit_offset: number, value: boolean)
1101 * -> number
1102 *
1103 * @par JSON-RPC请求示例
1104 * {"jsonrpc":"2.0","method":"RegisterControl.setInt16RegisterBit","params":[1,
1105 * 5, true],"id":1}
1106 *
1107 * @par JSON-RPC响应示例
1108 * {"id":1,"jsonrpc":"2.0","result":0}
1109 *
1110 * \endchinese
1111 * \english
1112 * Set the status of a specific bit in an Int16 register
1113 *
1114 * @param address Int16 register address
1115 * @param bit_offset Bit offset in the register, 0 ~ 15
1116 * @param value Value to set, true to set to 1, false to clear to 0
1117 * @return Returns 0 on success, error code on failure
1118 *
1119 * @par Python interface prototype
1120 * setInt16RegisterBit(self: pyaubo_sdk.RegisterControl, address: int,
1121 * bit_offset: int, value: bool) -> int
1122 *
1123 * @par Lua interface prototype
1124 * setInt16RegisterBit(address: number, bit_offset: number, value: boolean)
1125 * -> number
1126 *
1127 * @par JSON-RPC request example
1128 * {"jsonrpc":"2.0","method":"RegisterControl.setInt16RegisterBit","params":[1,
1129 * 5, true],"id":1}
1130 *
1131 * @par JSON-RPC response example
1132 * {"id":1,"jsonrpc":"2.0","result":0}
1133 *
1134 * \endenglish
1135 */
1136 int setInt16RegisterBit(uint32_t address, uint8_t bit_offset, bool value);
1137
1138 /**
1139 * \chinese
1140 * 具名变量是否存在
1141 *
1142 * @param key 变量名
1143 * @return
1144 *
1145 * @par Lua函数原型
1146 * hasNamedVariable(key: string) -> boolean
1147 *
1148 * @par Lua示例
1149 * NamedVariable = hasNamedVariable("custom")
1150 *
1151 * @par JSON-RPC请求示例
1152 * {"jsonrpc":"2.0","method":"RegisterControl.hasNamedVariable","params":["custom"],"id":1}
1153 *
1154 * @par JSON-RPC响应示例
1155 * {"id":1,"jsonrpc":"2.0","result":false}
1156 *
1157 * \endchinese
1158 * \english
1159 * Whether the named variable exists
1160 *
1161 * @param key Variable name
1162 * @return
1163 *
1164 * @par Lua interface prototype
1165 * hasNamedVariable(key: string) -> boolean
1166 *
1167 * @par Lua example
1168 * NamedVariable = hasNamedVariable("custom")
1169 *
1170 * @par JSON-RPC request example
1171 * {"jsonrpc":"2.0","method":"RegisterControl.hasNamedVariable","params":["custom"],"id":1}
1172 *
1173 * @par JSON-RPC response example
1174 * {"id":1,"jsonrpc":"2.0","result":false}
1175 *
1176 * \endenglish
1177 */
1178 bool hasNamedVariable(const std::string &key);
1179
1180 /**
1181 * \chinese
1182 * 获取具名变量的类型
1183 *
1184 * @param key
1185 * @return
1186 *
1187 * @par Lua函数原型
1188 * getNamedVariableType(key: string) -> string
1189 *
1190 * @par Lua示例
1191 * NamedVariableType = getNamedVariableType("custom")
1192 *
1193 * @par JSON-RPC请求示例
1194 * {"jsonrpc":"2.0","method":"RegisterControl.getNamedVariableType","params":["custom"],"id":1}
1195 *
1196 * @par JSON-RPC响应示例
1197 * {"id":1,"jsonrpc":"2.0","result":"NONE"}
1198 *
1199 * \endchinese
1200 * \english
1201 * Get the type of a named variable
1202 *
1203 * @param key
1204 * @return
1205 *
1206 * @par Lua interface prototype
1207 * getNamedVariableType(key: string) -> string
1208 *
1209 * @par Lua example
1210 * NamedVariableType = getNamedVariableType("custom")
1211 *
1212 * @par JSON-RPC request example
1213 * {"jsonrpc":"2.0","method":"RegisterControl.getNamedVariableType","params":["custom"],"id":1}
1214 *
1215 * @par JSON-RPC response example
1216 * {"id":1,"jsonrpc":"2.0","result":"NONE"}
1217 *
1218 * \endenglish
1219 */
1220 std::string getNamedVariableType(const std::string &key);
1221
1222 /**
1223 * \chinese
1224 * 具名变量是否更新
1225 *
1226 * @param key
1227 * @param since
1228 * @return
1229 *
1230 * @par Python函数原型
1231 * variableUpdated(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int)
1232 * -> bool
1233 *
1234 * @par Lua函数原型
1235 * variableUpdated(key: string, since: number) -> boolean
1236 *
1237 * @par Lua示例
1238 * Variable_Updated = variableUpdated("custom" , 0)
1239 *
1240 * \endchinese
1241 *
1242 * \english
1243 * Whether the named variable has been updated
1244 *
1245 * @param key
1246 * @param since
1247 * @return
1248 *
1249 * @par Python interface prototype
1250 * variableUpdated(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int)
1251 * -> bool
1252 *
1253 * @par Lua interface prototype
1254 * variableUpdated(key: string, since: number) -> boolean
1255 *
1256 * @par Lua example
1257 * Variable_Updated = variableUpdated("custom" , 0)
1258 *
1259 * \endchinese
1260 */
1261 bool variableUpdated(const std::string &key, uint64_t since);
1262
1263 /**
1264 * \chinese
1265 * 获取变量值
1266 *
1267 * @param key
1268 * @param default_value
1269 * @return
1270 *
1271 * @par Python函数原型
1272 * getBool(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: bool) -> bool
1273 *
1274 * @par Lua函数原型
1275 * getBool(key: string, default_value: boolean) -> boolean
1276 *
1277 * @par Lua示例
1278 * Bool_var = getBool("custom",false)
1279 *
1280 * @par JSON-RPC请求示例
1281 * {"jsonrpc":"2.0","method":"RegisterControl.getBool","params":["custom",false],"id":1}
1282 *
1283 * @par JSON-RPC响应示例
1284 * {"id":1,"jsonrpc":"2.0","result":true}
1285 *
1286 * \endchinese
1287 * \english
1288 * Get variable value
1289 *
1290 * @param key
1291 * @param default_value
1292 * @return
1293 *
1294 * @par Python interface prototype
1295 * getBool(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: bool) -> bool
1296 *
1297 * @par Lua interface prototype
1298 * getBool(key: string, default_value: boolean) -> boolean
1299 *
1300 * @par Lua example
1301 * Bool_var = getBool("custom",false)
1302 *
1303 * @par JSON-RPC request example
1304 * {"jsonrpc":"2.0","method":"RegisterControl.getBool","params":["custom",false],"id":1}
1305 *
1306 * @par JSON-RPC response example
1307 * {"id":1,"jsonrpc":"2.0","result":true}
1308 *
1309 * \endenglish
1310 */
1311 bool getBool(const std::string &key, bool default_value);
1312
1313 /**
1314 * \chinese
1315 * 设置/更新变量值
1316 *
1317 * @param key
1318 * @param value
1319 * @return
1320 *
1321 * @par Python函数原型
1322 * setBool(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: bool) -> int
1323 *
1324 * @par Lua函数原型
1325 * setBool(key: string, value: boolean) -> nil
1326 *
1327 * @par Lua示例
1328 * setBool("custom",true)
1329 *
1330 * @par JSON-RPC请求示例
1331 * {"jsonrpc":"2.0","method":"RegisterControl.setBool","params":["custom",true],"id":1}
1332 *
1333 * @par JSON-RPC响应示例
1334 * {"id":1,"jsonrpc":"2.0","result":0}
1335 *
1336 * \endchinese
1337 * \english
1338 * Set or update the variable value
1339 *
1340 * @param key
1341 * @param value
1342 * @return Returns 0 on success, otherwise error code
1343 *
1344 * @par Python interface prototype
1345 * setBool(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: bool) -> int
1346 *
1347 * @par Lua interface prototype
1348 * setBool(key: string, value: boolean) -> nil
1349 *
1350 * @par Lua example
1351 * setBool("custom",true)
1352 *
1353 * @par JSON-RPC request example
1354 * {"jsonrpc":"2.0","method":"RegisterControl.setBool","params":["custom",true],"id":1}
1355 *
1356 * @par JSON-RPC response example
1357 * {"id":1,"jsonrpc":"2.0","result":0}
1358 *
1359 * \endenglish
1360 */
1361 int setBool(const std::string &key, bool value);
1362
1363 /**
1364 * \chinese
1365 * 获取变量值
1366 *
1367 * @param key
1368 * @param default_value
1369 * @return
1370 *
1371 * @par Python函数原型
1372 * getVecChar(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[str])
1373 * -> List[str]
1374 *
1375 * @par Lua函数原型
1376 * getVecChar(key: string, default_value: table) -> table
1377 *
1378 * @par Lua示例
1379 * VecChar = getVecChar("custom",{})
1380 *
1381 * @par JSON-RPC请求示例
1382 * {"jsonrpc":"2.0","method":"RegisterControl.getVecChar","params":["custom",[]],"id":1}
1383 *
1384 * @par JSON-RPC响应示例
1385 * {"id":1,"jsonrpc":"2.0","result":[0,1,0]}
1386 *
1387 * \endchinese
1388 * \english
1389 * Get variable value
1390 *
1391 * @param key
1392 * @param default_value
1393 * @return
1394 *
1395 * @par Python interface prototype
1396 * getVecChar(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[str])
1397 * -> List[str]
1398 *
1399 * @par Lua interface prototype
1400 * getVecChar(key: string, default_value: table) -> table
1401 *
1402 * @par Lua example
1403 * VecChar = getVecChar("custom",{})
1404 *
1405 * @par JSON-RPC request example
1406 * {"jsonrpc":"2.0","method":"RegisterControl.getVecChar","params":["custom",[]],"id":1}
1407 *
1408 * @par JSON-RPC response example
1409 * {"id":1,"jsonrpc":"2.0","result":[0,1,0]}
1410 *
1411 * \endenglish
1412 */
1413 std::vector<char> getVecChar(const std::string &key,
1414 const std::vector<char> &default_value);
1415
1416 /**
1417 * \chinese
1418 * 设置/更新变量值
1419 *
1420 * @param key
1421 * @param value
1422 * @return
1423 *
1424 * @par Python函数原型
1425 * setVecChar(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[str])
1426 * -> int
1427 *
1428 * @par Lua函数原型
1429 * setVecChar(key: string, value: table) -> nil
1430 *
1431 * @par Lua示例
1432 * setVecChar("custom",{0,1,0})
1433 *
1434 * @par JSON-RPC请求示例
1435 * {"jsonrpc":"2.0","method":"RegisterControl.setVecChar","params":["custom",[0,1,0]],"id":1}
1436 *
1437 * @par JSON-RPC响应示例
1438 * {"id":1,"jsonrpc":"2.0","result":0}
1439 *
1440 * \endchinese
1441 * \english
1442 * Set or update the variable value
1443 *
1444 * @param key
1445 * @param value
1446 * @return Returns 0 on success, otherwise error code
1447 *
1448 * @par Python interface prototype
1449 * setVecChar(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[str])
1450 * -> int
1451 *
1452 * @par Lua interface prototype
1453 * setVecChar(key: string, value: table) -> nil
1454 *
1455 * @par Lua example
1456 * setVecChar("custom",{0,1,0})
1457 *
1458 * @par JSON-RPC request example
1459 * {"jsonrpc":"2.0","method":"RegisterControl.setVecChar","params":["custom",[0,1,0]],"id":1}
1460 *
1461 * @par JSON-RPC response example
1462 * {"id":1,"jsonrpc":"2.0","result":0}
1463 *
1464 * \endenglish
1465 */
1466 int setVecChar(const std::string &key, const std::vector<char> &value);
1467
1468 /**
1469 * \chinese
1470 * 获取变量值
1471 *
1472 * @param key
1473 * @param default_value
1474 * @return
1475 *
1476 * @par Python函数原型
1477 * getInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int) -> int
1478 *
1479 * @par Lua函数原型
1480 * getInt32(key: string, default_value: number) -> number
1481 *
1482 * @par Lua示例
1483 * Int32 = getInt32("custom",0)
1484 *
1485 * @par JSON-RPC请求示例
1486 * {"jsonrpc":"2.0","method":"RegisterControl.getInt32","params":["custom",0],"id":1}
1487 *
1488 * @par JSON-RPC响应示例
1489 * {"id":1,"jsonrpc":"2.0","result":6}
1490 *
1491 * \endchinese
1492 * \english
1493 * Get variable value
1494 *
1495 * @param key
1496 * @param default_value
1497 * @return
1498 *
1499 * @par Python interface prototype
1500 * getInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int) -> int
1501 *
1502 * @par Lua interface prototype
1503 * getInt32(key: string, default_value: number) -> number
1504 *
1505 * @par Lua example
1506 * Int32 = getInt32("custom",0)
1507 *
1508 * @par JSON-RPC request example
1509 * {"jsonrpc":"2.0","method":"RegisterControl.getInt32","params":["custom",0],"id":1}
1510 *
1511 * @par JSON-RPC response example
1512 * {"id":1,"jsonrpc":"2.0","result":6}
1513 *
1514 * \endenglish
1515 */
1516 int getInt32(const std::string &key, int default_value);
1517
1518 /**
1519 * \chinese
1520 * 设置/更新变量值
1521 *
1522 * @param key
1523 * @param value
1524 * @return
1525 *
1526 * @par Python函数原型
1527 * setInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int) -> int
1528 *
1529 * @par Lua函数原型
1530 * setInt32(key: string, value: number) -> nil
1531 *
1532 * @par Lua示例
1533 * setInt32("custom",6)
1534 *
1535 * @par JSON-RPC请求示例
1536 * {"jsonrpc":"2.0","method":"RegisterControl.setInt32","params":["custom",6],"id":1}
1537 *
1538 * @par JSON-RPC响应示例
1539 * {"id":1,"jsonrpc":"2.0","result":0}
1540 *
1541 * \endchinese
1542 * \english
1543 * Set or update the variable value
1544 *
1545 * @param key
1546 * @param value
1547 * @return
1548 *
1549 * @par Python interface prototype
1550 * setInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int) -> int
1551 *
1552 * @par Lua interface prototype
1553 * setInt32(key: string, value: number) -> nil
1554 *
1555 * @par Lua example
1556 * setInt32("custom",6)
1557 *
1558 * @par JSON-RPC request example
1559 * {"jsonrpc":"2.0","method":"RegisterControl.setInt32","params":["custom",6],"id":1}
1560 *
1561 * @par JSON-RPC response example
1562 * {"id":1,"jsonrpc":"2.0","result":0}
1563 *
1564 * \endenglish
1565 */
1566 int setInt32(const std::string &key, int value);
1567
1568 /**
1569 * \chinese
1570 * 获取变量值
1571 *
1572 * @param key
1573 * @param default_value
1574 * @return
1575 *
1576 * @par Python函数原型
1577 * getVecInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[int])
1578 * -> List[int]
1579 *
1580 * @par Lua函数原型
1581 * getVecInt32(key: string, default_value: table) -> table
1582 *
1583 * @par Lua示例
1584 * VecInt32 = getVecInt32("custom",{})
1585 *
1586 * @par JSON-RPC请求示例
1587 * {"jsonrpc":"2.0","method":"RegisterControl.getVecInt32","params":["custom",[]],"id":1}
1588 *
1589 * @par JSON-RPC响应示例
1590 * {"id":1,"jsonrpc":"2.0","result":[1,2,3,4]}
1591 *
1592 * \endchinese
1593 * \english
1594 * Get variable value
1595 *
1596 * @param key
1597 * @param default_value
1598 * @return
1599 *
1600 * @par Python interface prototype
1601 * getVecInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[int])
1602 * -> List[int]
1603 *
1604 * @par Lua interface prototype
1605 * getVecInt32(key: string, default_value: table) -> table
1606 *
1607 * @par Lua example
1608 * VecInt32 = getVecInt32("custom",{})
1609 *
1610 * @par JSON-RPC request example
1611 * {"jsonrpc":"2.0","method":"RegisterControl.getVecInt32","params":["custom",[]],"id":1}
1612 *
1613 * @par JSON-RPC response example
1614 * {"id":1,"jsonrpc":"2.0","result":[1,2,3,4]}
1615 *
1616 * \endenglish
1617 */
1618 std::vector<int32_t> getVecInt32(const std::string &key,
1619 const std::vector<int32_t> &default_value);
1620
1621 /**
1622 * \chinese
1623 * 设置/更新变量值
1624 *
1625 * @param key
1626 * @param value
1627 * @return
1628 *
1629 * @par Python函数原型
1630 * setVecInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[int])
1631 * -> int
1632 *
1633 * @par Lua函数原型
1634 * setVecInt32(key: string, value: table) -> nil
1635 *
1636 * @par Lua示例
1637 * setVecInt32("custom",{1,2,3,4})
1638 *
1639 * @par JSON-RPC请求示例
1640 * {"jsonrpc":"2.0","method":"RegisterControl.setVecInt32","params":["custom",[1,2,3,4]],"id":1}
1641 *
1642 * @par JSON-RPC响应示例
1643 * {"id":1,"jsonrpc":"2.0","result":0}
1644 *
1645 * \endchinese
1646 * \english
1647 * Set or update the variable value
1648 *
1649 * @param key
1650 * @param value
1651 * @return
1652 *
1653 * @par Python interface prototype
1654 * setVecInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[int])
1655 * -> int
1656 *
1657 * @par Lua interface prototype
1658 * setVecInt32(key: string, value: table) -> nil
1659 *
1660 * @par Lua example
1661 * setVecInt32("custom",{1,2,3,4})
1662 *
1663 * @par JSON-RPC request example
1664 * {"jsonrpc":"2.0","method":"RegisterControl.setVecInt32","params":["custom",[1,2,3,4]],"id":1}
1665 *
1666 * @par JSON-RPC response example
1667 * {"id":1,"jsonrpc":"2.0","result":0}
1668 *
1669 * \endenglish
1670 */
1671 int setVecInt32(const std::string &key, const std::vector<int32_t> &value);
1672
1673 /**
1674 * \chinese
1675 * 获取变量值
1676 *
1677 * @param key
1678 * @param default_value
1679 * @return
1680 *
1681 * @par Python函数原型
1682 * getFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) ->
1683 * float
1684 *
1685 * @par Lua函数原型
1686 * getFloat(key: string, default_value: number) -> number
1687 *
1688 * @par Lua示例
1689 * var_Float = getFloat("custom",0.0)
1690 *
1691 * @par JSON-RPC请求示例
1692 * {"jsonrpc":"2.0","method":"RegisterControl.getFloat","params":["custom",0.0],"id":1}
1693 *
1694 * @par JSON-RPC响应示例
1695 * {"id":1,"jsonrpc":"2.0","result":4.400000095367432}
1696 *
1697 * \endchinese
1698 * \english
1699 * Get variable value
1700 *
1701 * @param key
1702 * @param default_value
1703 * @return
1704 *
1705 * @par Python interface prototype
1706 * getFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) ->
1707 * float
1708 *
1709 * @par Lua interface prototype
1710 * getFloat(key: string, default_value: number) -> number
1711 *
1712 * @par Lua example
1713 * var_Float = getFloat("custom",0.0)
1714 *
1715 * @par JSON-RPC request example
1716 * {"jsonrpc":"2.0","method":"RegisterControl.getFloat","params":["custom",0.0],"id":1}
1717 *
1718 * @par JSON-RPC response example
1719 * {"id":1,"jsonrpc":"2.0","result":4.400000095367432}
1720 *
1721 * \endenglish
1722 */
1723 float getFloat(const std::string &key, float default_value);
1724
1725 /**
1726 * \chinese
1727 * 设置/更新变量值
1728 *
1729 * @param key
1730 * @param value
1731 * @return
1732 *
1733 * @par Python函数原型
1734 * setFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) -> int
1735 *
1736 * @par Lua函数原型
1737 * setFloat(key: string, value: number) -> nil
1738 *
1739 * @par Lua示例
1740 * setFloat("custom",4.4)
1741 *
1742 * @par JSON-RPC请求示例
1743 * {"jsonrpc":"2.0","method":"RegisterControl.setFloat","params":["custom",4.4],"id":1}
1744 *
1745 * @par JSON-RPC响应示例
1746 * {"id":1,"jsonrpc":"2.0","result":0}
1747 *
1748 * \endchinese
1749 * \english
1750 * Set or update the variable value
1751 *
1752 * @param key
1753 * @param value
1754 * @return
1755 *
1756 * @par Python interface prototype
1757 * setFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) -> int
1758 *
1759 * @par Lua interface prototype
1760 * setFloat(key: string, value: number) -> nil
1761 *
1762 * @par Lua example
1763 * setFloat("custom",4.4)
1764 *
1765 * @par JSON-RPC request example
1766 * {"jsonrpc":"2.0","method":"RegisterControl.setFloat","params":["custom",4.4],"id":1}
1767 *
1768 * @par JSON-RPC response example
1769 * {"id":1,"jsonrpc":"2.0","result":0}
1770 *
1771 * \endenglish
1772 */
1773 int setFloat(const std::string &key, float value);
1774
1775 /**
1776 * \chinese
1777 * 获取变量值
1778 *
1779 * @param key
1780 * @param default_value
1781 * @return
1782 *
1783 * @par Python函数原型
1784 * getVecFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1:
1785 * List[float]) -> List[float]
1786 *
1787 * @par Lua函数原型
1788 * getVecFloat(key: string, default_value: table) -> table
1789 *
1790 * @par Lua示例
1791 * VecFloat = getVecFloat("custom",{})
1792 *
1793 * @par JSON-RPC请求示例
1794 * {"jsonrpc":"2.0","method":"RegisterControl.getVecFloat","params":["custom",[]],"id":1}
1795 *
1796 * @par JSON-RPC响应示例
1797 * {"id":1,"jsonrpc":"2.0","result":[0.0,0.10000000149011612,3.299999952316284]}
1798 *
1799 * \endchinese
1800 * \english
1801 * Get variable value
1802 *
1803 * @param key
1804 * @param default_value
1805 * @return
1806 *
1807 * @par Python interface prototype
1808 * getVecFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1:
1809 * List[float]) -> List[float]
1810 *
1811 * @par Lua interface prototype
1812 * getVecFloat(key: string, default_value: table) -> table
1813 *
1814 * @par Lua example
1815 * VecFloat = getVecFloat("custom",{})
1816 *
1817 * @par JSON-RPC request example
1818 * {"jsonrpc":"2.0","method":"RegisterControl.getVecFloat","params":["custom",[]],"id":1}
1819 *
1820 * @par JSON-RPC response example
1821 * {"id":1,"jsonrpc":"2.0","result":[0.0,0.10000000149011612,3.299999952316284]}
1822 *
1823 * \endenglish
1824 */
1825 std::vector<float> getVecFloat(const std::string &key,
1826 const std::vector<float> &default_value);
1827
1828 /**
1829 * \chinese
1830 * 设置/更新变量值
1831 *
1832 * @param key
1833 * @param value
1834 * @return
1835 *
1836 * @par Python函数原型
1837 * setVecFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1:
1838 * List[float]) -> int
1839 *
1840 * @par Lua函数原型
1841 * setVecFloat(key: string, value: table) -> nil
1842 *
1843 * @par Lua示例
1844 * setVecFloat("custom", {0.0,0.1,3.3})
1845 *
1846 * @par JSON-RPC请求示例
1847 * {"jsonrpc":"2.0","method":"RegisterControl.setVecFloat","params":["custom",[0.0,0.1,3.3]],"id":1}
1848 *
1849 * @par JSON-RPC响应示例
1850 * {"id":1,"jsonrpc":"2.0","result":0}
1851 *
1852 * \endchinese
1853 * \english
1854 * Set or update the variable value
1855 *
1856 * @param key
1857 * @param value
1858 * @return
1859 *
1860 * @par Python interface prototype
1861 * setVecFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1:
1862 * List[float]) -> int
1863 *
1864 * @par Lua interface prototype
1865 * setVecFloat(key: string, value: table) -> nil
1866 *
1867 * @par Lua example
1868 * setVecFloat("custom", {0.0,0.1,3.3})
1869 *
1870 * @par JSON-RPC request example
1871 * {"jsonrpc":"2.0","method":"RegisterControl.setVecFloat","params":["custom",[0.0,0.1,3.3]],"id":1}
1872 *
1873 * @par JSON-RPC response example
1874 * {"id":1,"jsonrpc":"2.0","result":0}
1875 *
1876 * \endenglish
1877 */
1878 int setVecFloat(const std::string &key, const std::vector<float> &value);
1879
1880 /**
1881 * \chinese
1882 * 获取变量值
1883 *
1884 * @param key
1885 * @param default_value
1886 * @return
1887 *
1888 * @par Python函数原型
1889 * getDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) ->
1890 * float
1891 *
1892 * @par Lua函数原型
1893 * getDouble(key: string, default_value: number) -> number
1894 *
1895 * @par Lua示例
1896 * var_Double = getDouble("custom",0.0)
1897 *
1898 * @par JSON-RPC请求示例
1899 * {"jsonrpc":"2.0","method":"RegisterControl.getDouble","params":["custom",0.0],"id":1}
1900 *
1901 * @par JSON-RPC响应示例
1902 * {"id":1,"jsonrpc":"2.0","result":0.0}
1903 *
1904 * \endchinese
1905 * \english
1906 * Get variable value
1907 *
1908 * @param key
1909 * @param default_value
1910 * @return
1911 *
1912 * @par Python interface prototype
1913 * getDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) ->
1914 * float
1915 *
1916 * @par Lua interface prototype
1917 * getDouble(key: string, default_value: number) -> number
1918 *
1919 * @par Lua example
1920 * var_Double = getDouble("custom",0.0)
1921 *
1922 * @par JSON-RPC request example
1923 * {"jsonrpc":"2.0","method":"RegisterControl.getDouble","params":["custom",0.0],"id":1}
1924 *
1925 * @par JSON-RPC response example
1926 * {"id":1,"jsonrpc":"2.0","result":0.0}
1927 *
1928 * \endenglish
1929 */
1930 double getDouble(const std::string &key, double default_value);
1931
1932 /**
1933 * \chinese
1934 * 设置/更新变量值
1935 *
1936 * @param key
1937 * @param value
1938 * @return
1939 *
1940 * @par Python函数原型
1941 * setDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) ->
1942 * int
1943 *
1944 * @par Lua函数原型
1945 * setDouble(key: string, value: number) -> nil
1946 *
1947 * @par Lua示例
1948 * setDouble("custom",6.6)
1949 *
1950 * @par JSON-RPC请求示例
1951 * {"jsonrpc":"2.0","method":"RegisterControl.setDouble","params":["custom",6.6],"id":1}
1952 *
1953 * @par JSON-RPC响应示例
1954 * {"id":1,"jsonrpc":"2.0","result":0}
1955 *
1956 * \endchinese
1957 * \english
1958 * Set or update the variable value
1959 *
1960 * @param key
1961 * @param value
1962 * @return
1963 *
1964 * @par Python interface prototype
1965 * setDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) ->
1966 * int
1967 *
1968 * @par Lua interface prototype
1969 * setDouble(key: string, value: number) -> nil
1970 *
1971 * @par Lua example
1972 * setDouble("custom",6.6)
1973 *
1974 * @par JSON-RPC request example
1975 * {"jsonrpc":"2.0","method":"RegisterControl.setDouble","params":["custom",6.6],"id":1}
1976 *
1977 * @par JSON-RPC response example
1978 * {"id":1,"jsonrpc":"2.0","result":0}
1979 *
1980 * \endenglish
1981 */
1982 int setDouble(const std::string &key, double value);
1983
1984 /**
1985 * \chinese
1986 * 获取变量值
1987 *
1988 * @param key
1989 * @param default_value
1990 * @return
1991 *
1992 * @par Python函数原型
1993 * getVecDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1:
1994 * List[float]) -> List[float]
1995 *
1996 * @par Lua函数原型
1997 * getVecDouble(key: string, default_value: table) -> table
1998 *
1999 * @par Lua示例
2000 * VecDouble = getVecDouble("custom",{})
2001 *
2002 * @par JSON-RPC请求示例
2003 * {"jsonrpc":"2.0","method":"RegisterControl.getVecDouble","params":["custom",[]],"id":1}
2004 *
2005 * @par JSON-RPC响应示例
2006 * {"id":1,"jsonrpc":"2.0","result":[0.1,0.2,0.3]}
2007 *
2008 * \endchinese
2009 * \english
2010 * Get variable value
2011 *
2012 * @param key
2013 * @param default_value
2014 * @return
2015 *
2016 * @par Python interface prototype
2017 * getVecDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1:
2018 * List[float]) -> List[float]
2019 *
2020 * @par Lua interface prototype
2021 * getVecDouble(key: string, default_value: table) -> table
2022 *
2023 * @par Lua example
2024 * VecDouble = getVecDouble("custom",{})
2025 *
2026 * @par JSON-RPC request example
2027 * {"jsonrpc":"2.0","method":"RegisterControl.getVecDouble","params":["custom",[]],"id":1}
2028 *
2029 * @par JSON-RPC response example
2030 * {"id":1,"jsonrpc":"2.0","result":[0.1,0.2,0.3]}
2031 *
2032 * \endenglish
2033 */
2034 std::vector<double> getVecDouble(const std::string &key,
2035 const std::vector<double> &default_value);
2036
2037 /**
2038 * \chinese
2039 * 设置/更新变量值
2040 *
2041 * @param key
2042 * @param value
2043 * @return
2044 *
2045 * @par Python函数原型
2046 * setVecDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1:
2047 * List[float]) -> int
2048 *
2049 * @par Lua函数原型
2050 * setVecDouble(key: string, value: table) -> nil
2051 *
2052 * @par Lua示例
2053 * setVecDouble("custom",{0.1,0.2,0.3})
2054 *
2055 * @par JSON-RPC请求示例
2056 * {"jsonrpc":"2.0","method":"RegisterControl.setVecDouble","params":["custom",[0.1,0.2,0.3]],"id":1}
2057 *
2058 * @par JSON-RPC响应示例
2059 * {"id":1,"jsonrpc":"2.0","result":0}
2060 *
2061 * \endchinese
2062 * \english
2063 * Set or update the variable value
2064 *
2065 * @param key
2066 * @param value
2067 * @return
2068 *
2069 * @par Python interface prototype
2070 * setVecDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1:
2071 * List[float]) -> int
2072 *
2073 * @par Lua interface prototype
2074 * setVecDouble(key: string, value: table) -> nil
2075 *
2076 * @par Lua example
2077 * setVecDouble("custom",{0.1,0.2,0.3})
2078 *
2079 * @par JSON-RPC request example
2080 * {"jsonrpc":"2.0","method":"RegisterControl.setVecDouble","params":["custom",[0.1,0.2,0.3]],"id":1}
2081 *
2082 * @par JSON-RPC response example
2083 * {"id":1,"jsonrpc":"2.0","result":0}
2084 *
2085 * \endenglish
2086 */
2087 int setVecDouble(const std::string &key, const std::vector<double> &value);
2088
2089 /**
2090 * \chinese
2091 * 获取变量值
2092 *
2093 * @param key
2094 * @param default_value
2095 * @return
2096 *
2097 * @par Python函数原型
2098 * getString(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: str) -> str
2099 *
2100 * @par Lua函数原型
2101 * getString(key: string, default_value: string) -> string
2102 *
2103 * @par Lua示例
2104 * var_String = getString("custom","")
2105 *
2106 * @par JSON-RPC请求示例
2107 * {"jsonrpc":"2.0","method":"RegisterControl.getString","params":["custom",""],"id":1}
2108 *
2109 * @par JSON-RPC响应示例
2110 * {"id":1,"jsonrpc":"2.0","result":"test"}
2111 *
2112 * \endchinese
2113 * \english
2114 * Get variable value
2115 *
2116 * @param key
2117 * @param default_value
2118 * @return
2119 *
2120 * @par Python interface prototype
2121 * getString(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: str) -> str
2122 *
2123 * @par Lua interface prototype
2124 * getString(key: string, default_value: string) -> string
2125 *
2126 * @par Lua example
2127 * var_String = getString("custom","")
2128 *
2129 * @par JSON-RPC request example
2130 * {"jsonrpc":"2.0","method":"RegisterControl.getString","params":["custom",""],"id":1}
2131 *
2132 * @par JSON-RPC response example
2133 * {"id":1,"jsonrpc":"2.0","result":"test"}
2134 *
2135 * \endenglish
2136 */
2137 std::string getString(const std::string &key,
2138 const std::string &default_value);
2139
2140 /**
2141 * \chinese
2142 * 设置/更新变量值
2143 *
2144 * @param key
2145 * @param value
2146 * @return
2147 *
2148 * @par Python函数原型
2149 * setString(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: str) -> int
2150 *
2151 * @par Lua函数原型
2152 * setString(key: string, value: string) -> nil
2153 *
2154 * @par Lua示例
2155 * setString("custom","test")
2156 *
2157 * @par JSON-RPC请求示例
2158 * {"jsonrpc":"2.0","method":"RegisterControl.setString","params":["custom","test"],"id":1}
2159 *
2160 * @par JSON-RPC响应示例
2161 * {"id":1,"jsonrpc":"2.0","result":0}
2162 *
2163 * \endchinese
2164 * \english
2165 * Set or update the variable value
2166 *
2167 * @param key
2168 * @param value
2169 * @return Returns 0 on success, otherwise error code
2170 *
2171 * @par Python interface prototype
2172 * setString(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: str) -> int
2173 *
2174 * @par Lua interface prototype
2175 * setString(key: string, value: string) -> nil
2176 *
2177 * @par Lua example
2178 * setString("custom","test")
2179 *
2180 * @par JSON-RPC request example
2181 * {"jsonrpc":"2.0","method":"RegisterControl.setString","params":["custom","test"],"id":1}
2182 *
2183 * @par JSON-RPC response example
2184 * {"id":1,"jsonrpc":"2.0","result":0}
2185 *
2186 * \endenglish
2187 */
2188 int setString(const std::string &key, const std::string &value);
2189
2190 /**
2191 * \chinese
2192 * 清除变量
2193 *
2194 * @param key
2195 * @return
2196 *
2197 * @par Python函数原型
2198 * clearNamedVariable(self: pyaubo_sdk.RegisterControl, arg0: str) -> int
2199 *
2200 * @par Lua函数原型
2201 * clearNamedVariable(key: string) -> nil
2202 *
2203 * @par Lua示例
2204 * clearNamedVariable("custom")
2205 *
2206 * @par JSON-RPC请求示例
2207 * {"jsonrpc":"2.0","method":"RegisterControl.clearNamedVariable","params":["custom"],"id":1}
2208 *
2209 * @par JSON-RPC响应示例
2210 * {"id":1,"jsonrpc":"2.0","result":1}
2211 *
2212 * \endchinese
2213 * \english
2214 * Clear variable
2215 *
2216 * @param key
2217 * @return
2218 *
2219 * @par Python interface prototype
2220 * clearNamedVariable(self: pyaubo_sdk.RegisterControl, arg0: str) -> int
2221 *
2222 * @par Lua interface prototype
2223 * clearNamedVariable(key: string) -> nil
2224 *
2225 * @par Lua example
2226 * clearNamedVariable("custom")
2227 *
2228 * @par JSON-RPC request example
2229 * {"jsonrpc":"2.0","method":"RegisterControl.clearNamedVariable","params":["custom"],"id":1}
2230 *
2231 * @par JSON-RPC response example
2232 * {"id":1,"jsonrpc":"2.0","result":1}
2233 *
2234 * \endenglish
2235 */
2236 int clearNamedVariable(const std::string &key);
2237
2238 /**
2239 * \chinese
2240 * 设置看门狗
2241 *
2242 * 看门狗被触发之后控制器会执行对应的动作,并自动删除看门狗
2243 *
2244 * @param key
2245 * @param timeout 超时时间,单位秒(s),超时时间最小为 0.1s
2246 * @param action
2247 * NONE (0): 无动作
2248 * PAUSE(1): 暂停运行时
2249 * STOP (2): 停止运行时/停止机器人运动
2250 * PROTECTIVE_STOP (3): 触发防护停止
2251 * @return
2252 * \endchinese
2253 * \english
2254 * Set the watchdog
2255 *
2256 * After the watchdog is triggered, the controller will perform the
2257 * corresponding action and automatically delete the watchdog.
2258 *
2259 * @param key
2260 * @param timeout Timeout in seconds (s), minimum timeout is 0.1s
2261 * @param action
2262 * NONE (0): No action
2263 * PAUSE(1): Pause runtime
2264 * STOP (2): Stop runtime/stop robot motion
2265 * PROTECTIVE_STOP (3): Trigger protective stop
2266 * @return
2267 * \endenglish
2268 */
2269 int setWatchDog(const std::string &key, double timeout, int action);
2270
2271 /**
2272 * \chinese
2273 * 获取看门狗动作
2274 *
2275 * @param key
2276 * @return
2277 * \endchinese
2278 * \english
2279 * Get the watchdog action
2280 *
2281 * @param key
2282 * @return
2283 * \endenglish
2284 */
2285 int getWatchDogAction(const std::string &key);
2286
2287 /**
2288 * \chinese
2289 * 获取看门狗超时时间
2290 *
2291 * @param key
2292 * @return
2293 * \endchinese
2294 * \english
2295 * Get the watchdog timeout value
2296 *
2297 * @param key
2298 * @return
2299 * \endenglish
2300 */
2301 int getWatchDogTimeout(const std::string &key);
2302
2303 /**
2304 * \chinese
2305 * 添加一个新的Modbus信号以供控制器监视。不需要返回响应。
2306 *
2307 * @param device_info 设备信息
2308 * 设备信息是RTU格式,例如:"serial_port,baud,parity,data_bit,stop_bit"
2309 * (1)serial_port参数指定串口的名称,例如,在Linux上为"/dev/ttyS0"或"/dev/ttyUSB0",在Windows上为"\.\COM10"
2310 * (2)baud参数指定通信的波特率,例如9600、19200、57600、115200等
2311 * (3)parity参数指定奇偶校验方式,N表示无校验,E表示偶校验,O表示奇校验
2312 * (4)data_bit参数指定数据位数,允许的值为5、6、7和8
2313 * (5)stop_bit参数指定停止位数,允许的值为1和2
2314 *
2315 * 设备信息是TCP格式,例如:"ip address,port"
2316 * (1)ip address参数指定服务器的IP地址
2317 * (2)port参数指定服务器监听的端口号
2318 * @param slave_number 通常不使用,设置为255即可,但可以在0到255之间自由选择
2319 * @param signal_address
2320 * 指定新信号应该反映的线圈或寄存器的地址。请参考Modbus单元的配置以获取此信息。
2321 * @param signal_type 指定要添加的信号类型。0 = 数字输入,1 = 数字输出,2 =
2322 * 寄存器输入,3 = 寄存器输出。
2323 * @param signal_name
2324 * 唯一标识信号的名词。如果提供的字符串与已添加的信号相等,则新信号将替换旧信号。字符串的长度不能超过20个字符。
2325 * @param sequential_mode
2326 * 设置为True会强制Modbus客户端在发送下一个请求之前等待响应。某些fieldbus单元需要此模式。可选参数。
2327 * @return
2328 *
2329 * @par Python函数原型
2330 * modbusAddSignal(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int,
2331 * arg2: int, arg3: int, arg4: str, arg5: bool) -> int
2332 *
2333 * @par Lua函数原型
2334 * modbusAddSignal(device_info: string, slave_number: number,
2335 * signal_address: number, signal_type: number, signal_name: string,
2336 * sequential_mode: boolean) -> nil
2337 *
2338 * @par Lua示例
2339 * modbusAddSignal("/dev/ttyRobotTool,115200,N,8,1", 1, signal_address:
2340 * number, 264, "Modbus_0", false)
2341 *
2342 * @par JSON-RPC请求示例
2343 * {"jsonrpc":"2.0","method":"RegisterControl.modbusAddSignal","params":["/dev/ttyRobotTool,115200,N,8,1",1,264,3,"Modbus_0",false],"id":1}
2344 *
2345 * @par JSON-RPC响应示例
2346 * {"id":1,"jsonrpc":"2.0","result":0}
2347 * \endchinese
2348 * \english
2349 * Adds a new modbus signal for the controller to supervise. Expects no
2350 * response.
2351 *
2352 * @param device_info is rtu format.
2353 * eg,"serial_port,baud,parity,data_bit,stop_bit"
2354 * (1)The serial_port argument specifies the name of the serial port eg. On
2355 * Linux ,"/dev/ttyS0" or "/dev/ttyUSB0". On Windows, "\.\COM10". (2)The
2356 * baud argument specifies the baud rate of the communication, eg. 9600,
2357 * 19200, 57600, 115200, etc. (3)parity:N for none,E for even,O for odd.
2358 * (4)data_bit:The data_bits argument specifies the number of bits of data,
2359 * the allowed values are 5, 6, 7 and 8. (5)stop_bit:The stop_bits argument
2360 * specifies the bits of stop, the allowed values are 1 and 2.
2361 *
2362 * device_info is tcp format.eg,"ip address,port"
2363 * (1)The ip address parameter specifies the ip address of the server
2364 * (2)The port parameter specifies the port number that the server is
2365 * listening on.
2366 * @param slave_number An integer normally not used and set to 255, but is a
2367 * free choice between 0 and 255.
2368 * @param signal_address An integer specifying the address of the either the
2369 * coil or the register that this new signal should reflect. Consult the
2370 * configuration of the modbus unit for this information.
2371 * @param signal_type An integer specifying the type of signal to add. 0 =
2372 * digital input, 1 = digital output, 2 = register input and 3 = register
2373 * output.
2374 * @param signal_name A string uniquely identifying the signal. If a string
2375 * is supplied which is equal to an already added signal, the new signal
2376 * will replace the old one. The length of the string cannot exceed 20
2377 * characters.
2378 * @param sequential_mode Setting to True forces the modbus client to wait
2379 * for a response before sending the next request. This mode is required by
2380 * some fieldbus units (Optional).
2381 * @return
2382 *
2383 * @par Python interface prototype
2384 * modbusAddSignal(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int,
2385 * arg2: int, arg3: int, arg4: str, arg5: bool) -> int
2386 *
2387 * @par Lua interface prototype
2388 * modbusAddSignal(device_info: string, slave_number: number,
2389 * signal_address: number, signal_type: number, signal_name: string,
2390 * sequential_mode: boolean) -> nil
2391 *
2392 * @par Lua example
2393 * modbusAddSignal("/dev/ttyRobotTool,115200,N,8,1", 1, signal_address:
2394 * number, 264, "Modbus_0", false)
2395 *
2396 * @par JSON-RPC request example
2397 * {"jsonrpc":"2.0","method":"RegisterControl.modbusAddSignal","params":["/dev/ttyRobotTool,115200,N,8,1",1,264,3,"Modbus_0",false],"id":1}
2398 *
2399 * @par JSON-RPC response example
2400 * {"id":1,"jsonrpc":"2.0","result":0}
2401 * \endenglish
2402 */
2403 int modbusAddSignal(const std::string &device_info, int slave_number,
2404 int signal_address, int signal_type,
2405 const std::string &signal_name, bool sequential_mode);
2406
2407 /**
2408 * \chinese
2409 * 删除指定名称的信号。
2410 *
2411 * @param signal_name 要删除的信号的名称
2412 * @return
2413 *
2414 * @par Python函数原型
2415 * modbusDeleteSignal(self: pyaubo_sdk.RegisterControl, arg0: str) -> int
2416 *
2417 * @par Lua函数原型
2418 * modbusDeleteSignal(signal_name: string) -> nil
2419 *
2420 * @par Lua示例
2421 * modbusDeleteSignal("Modbus_1")
2422 *
2423 * @par JSON-RPC请求示例
2424 * {"jsonrpc":"2.0","method":"RegisterControl.modbusDeleteSignal","params":["Modbus_1"],"id":1}
2425 *
2426 * @par JSON-RPC响应示例
2427 * {"id":1,"jsonrpc":"2.0","result":0}
2428 * \endchinese
2429 * \english
2430 * Deletes the signal identified by the supplied signal name.
2431 *
2432 * @param signal_name A string equal to the name of the signal that should
2433 * be deleted.
2434 * @return
2435 *
2436 * @par Python interface prototype
2437 * modbusDeleteSignal(self: pyaubo_sdk.RegisterControl, arg0: str) -> int
2438 *
2439 * @par Lua interface prototype
2440 * modbusDeleteSignal(signal_name: string) -> nil
2441 *
2442 * @par Lua example
2443 * modbusDeleteSignal("Modbus_1")
2444 *
2445 * @par JSON-RPC request example
2446 * {"jsonrpc":"2.0","method":"RegisterControl.modbusDeleteSignal","params":["Modbus_1"],"id":1}
2447 *
2448 * @par JSON-RPC response example
2449 * {"id":1,"jsonrpc":"2.0","result":0}
2450 * \endenglish
2451 */
2452 int modbusDeleteSignal(const std::string &signal_name);
2453
2454 /**
2455 * \chinese
2456 * 删除所有modbus信号
2457 *
2458 * @return
2459 *
2460 * @par JSON-RPC请求示例
2461 * {"jsonrpc":"2.0","method":"RegisterControl.modbusDeleteAllSignals","params":[],"id":1}
2462 *
2463 * @par JSON-RPC响应示例
2464 * {"id":1,"jsonrpc":"2.0","result":0}
2465 *
2466 * \endchinese
2467 * \english
2468 * Delete all modbus signals
2469 *
2470 * @return
2471 *
2472 * @par JSON-RPC request example
2473 * {"jsonrpc":"2.0","method":"RegisterControl.modbusDeleteAllSignals","params":[],"id":1}
2474 *
2475 * @par JSON-RPC response example
2476 * {"id":1,"jsonrpc":"2.0","result":0}
2477 *
2478 * \endenglish
2479 */
2481
2482 /**
2483 * \chinese
2484 * 读取特定信号的当前值。
2485 *
2486 * @param signal_name 要获取值的信号的名称
2487 * @return 对于数字信号:1或0。
2488 * 对于寄存器信号:表示为整数的寄存器值。如果值为-1,则表示该信号不存在。
2489 *
2490 * @par Python函数原型
2491 * modbusGetSignalStatus(self: pyaubo_sdk.RegisterControl, arg0: str) -> int
2492 *
2493 * @par Lua函数原型
2494 * modbusGetSignalStatus(signal_name: string) -> number
2495 *
2496 * @par Lua示例
2497 * var0 = modbusGetSignalStatus("Modbus_0")
2498 *
2499 * @par JSON-RPC请求示例
2500 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalStatus","params":["Modbus_0"],"id":1}
2501 *
2502 * @par JSON-RPC响应示例
2503 * {"id":1,"jsonrpc":"2.0","result":1}
2504 * \endchinese
2505 * \english
2506 * Reads the current value of a specific signal.
2507 *
2508 * @param signal_name A string equal to the name of the signal for which the
2509 * value should be gotten.
2510 * @return An integer or a boolean. For digital signals: 1 or 0. For
2511 * register signals: The register value expressed as an integer. If the
2512 * value is -1, it means the signal does not exist.
2513 *
2514 * @par Python interface prototype
2515 * modbusGetSignalStatus(self: pyaubo_sdk.RegisterControl, arg0: str) -> int
2516 *
2517 * @par Lua interface prototype
2518 * modbusGetSignalStatus(signal_name: string) -> number
2519 *
2520 * @par Lua example
2521 * var0 = modbusGetSignalStatus("Modbus_0")
2522 *
2523 * @par JSON-RPC request example
2524 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalStatus","params":["Modbus_0"],"id":1}
2525 *
2526 * @par JSON-RPC response example
2527 * {"id":1,"jsonrpc":"2.0","result":1}
2528 * \endenglish
2529 */
2530 int modbusGetSignalStatus(const std::string &signal_name);
2531
2532 /**
2533 * \chinese
2534 * 获取所有信号的名字集合
2535 *
2536 * @return 所有信号的名字集合
2537 *
2538 * @par JSON-RPC请求示例
2539 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalNames","params":[],"id":1}
2540 *
2541 * @par JSON-RPC响应示例
2542 * {"id":1,"jsonrpc":"2.0","result":["Modbus_0"]}
2543 *
2544 * \endchinese
2545 * \english
2546 * Get the collection of all signal names
2547 *
2548 * @return Collection of all signal names
2549 *
2550 * @par JSON-RPC request example
2551 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalNames","params":[],"id":1}
2552 *
2553 * @par JSON-RPC response example
2554 * {"id":1,"jsonrpc":"2.0","result":["Modbus_0"]}
2555 *
2556 * \endenglish
2557 */
2558 std::vector<std::string> modbusGetSignalNames();
2559
2560 /**
2561 * \chinese
2562 * 获取所有信号的类型集合
2563 *
2564 * @return 所有信号的类型集合
2565 *
2566 * @par JSON-RPC请求示例
2567 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalTypes","params":[],"id":1}
2568 *
2569 * @par JSON-RPC响应示例
2570 * {"id":1,"jsonrpc":"2.0","result":[1,0,2,3]}
2571 *
2572 * \endchinese
2573 * \english
2574 * Get the collection of all signal types
2575 *
2576 * @return Collection of all signal types
2577 *
2578 * @par JSON-RPC request example
2579 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalTypes","params":[],"id":1}
2580 *
2581 * @par JSON-RPC response example
2582 * {"id":1,"jsonrpc":"2.0","result":[1,0,2,3]}
2583 *
2584 * \endenglish
2585 */
2586 std::vector<int> modbusGetSignalTypes();
2587
2588 /**
2589 * \chinese
2590 * 获取所有信号的数值集合
2591 *
2592 * @return 所有信号的数值集合
2593 *
2594 * @par JSON-RPC请求示例
2595 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalValues","params":[],"id":1}
2596 *
2597 * @par JSON-RPC响应示例
2598 * {"id":1,"jsonrpc":"2.0","result":[1,1,88,33]}
2599 *
2600 * \endchinese
2601 * \english
2602 * Get the collection of all signal values
2603 *
2604 * @return Collection of all signal values
2605 *
2606 * @par JSON-RPC request example
2607 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalValues","params":[],"id":1}
2608 *
2609 * @par JSON-RPC response example
2610 * {"id":1,"jsonrpc":"2.0","result":[1,1,88,33]}
2611 *
2612 * \endenglish
2613 */
2614 std::vector<int> modbusGetSignalValues();
2615
2616 /**
2617 * \chinese
2618 * 获取所有信号的请求是否有错误(0:无错误,其他:有错误)集合
2619 *
2620 * @return ModbusErrorNum
2621 *
2622 * @par JSON-RPC请求示例
2623 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalErrors","params":[],"id":1}
2624 *
2625 * @par JSON-RPC响应示例
2626 * {"id":1,"jsonrpc":"2.0","result":[6,6,6,6]}
2627 *
2628 * \endchinese
2629 * \english
2630 * Get the error status of all signal requests (0: no error, others: error)
2631 * as a collection
2632 *
2633 * @return ModbusErrorNum
2634 *
2635 * @par JSON-RPC request example
2636 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalErrors","params":[],"id":1}
2637 *
2638 * @par JSON-RPC response example
2639 * {"id":1,"jsonrpc":"2.0","result":[6,6,6,6]}
2640 *
2641 * \endenglish
2642 */
2643 std::vector<int> modbusGetSignalErrors();
2644
2645 /**
2646 * \chinese
2647 * 将用户指定的命令发送到指定IP地址上的Modbus单元。
2648 * 由于不会接收到响应,因此不能用于请求数据。
2649 * 用户负责提供对所提供的功能码有意义的数据。
2650 * 内置函数负责构建Modbus帧,因此用户不需要关心命令的长度。
2651 *
2652 * @param device_info 设备信息
2653 * 设备信息是RTU格式,例如:"serial_port,baud,parity,data_bit,stop_bit"
2654 * (1)serial_port参数指定串口的名称,例如,在Linux上为"/dev/ttyS0"或"/dev/ttyUSB0",在Windows上为"\.\COM10"
2655 * (2)baud参数指定通信的波特率,例如9600、19200、57600、115200等
2656 * (3)parity参数指定奇偶校验方式,N表示无校验,E表示偶校验,O表示奇校验
2657 * (4)data_bit参数指定数据位数,允许的值为5、6、7和8
2658 * (5)stop_bit参数指定停止位数,允许的值为1和2
2659 *
2660 * 设备信息是TCP格式,例如:"ip address,port"
2661 * (1)ip address参数指定服务器的IP地址
2662 * (2)port参数指定服务器监听的端口号
2663 * @param slave_number 指定用于自定义命令的从站号
2664 * @param function_code 指定自定义命令的功能码
2665 *
2666 * Modbus功能码
2667 * MODBUS_FC_READ_COILS 0x01
2668 * MODBUS_FC_READ_DISCRETE_INPUTS 0x02
2669 * MODBUS_FC_READ_HOLDING_REGISTERS 0x03
2670 * MODBUS_FC_READ_INPUT_REGISTERS 0x04
2671 * MODBUS_FC_WRITE_SINGLE_COIL 0x05
2672 * MODBUS_FC_WRITE_SINGLE_REGISTER 0x06
2673 * MODBUS_FC_READ_EXCEPTION_STATUS 0x07
2674 * MODBUS_FC_WRITE_MULTIPLE_COILS 0x0F
2675 * MODBUS_FC_WRITE_MULTIPLE_REGISTERS 0x10
2676 * MODBUS_FC_REPORT_SLAVE_ID 0x11
2677 * MODBUS_FC_MASK_WRITE_REGISTER 0x16
2678 * MODBUS_FC_WRITE_AND_READ_REGISTERS 0x17
2679 *
2680 * @param data 必须是有效的字节值(0-255)
2681 * @return
2682 *
2683 * @par Python函数原型
2684 * modbusSendCustomCommand(self: pyaubo_sdk.RegisterControl, arg0: str,
2685 * arg1: int, arg2: int, arg3: List[int]) -> int
2686 *
2687 * @par Lua函数原型
2688 * modbusSendCustomCommand(device_info: string, slave_number: number,
2689 * function_code: number, data: table) -> nil
2690 *
2691 * @par Lua示例
2692 * modbusSendCustomCommand("/dev/ttyRobotTool,115200,N,8,1", 1, 10,
2693 * {1,2,0,2,4,0,0,0,0}) -> nil
2694 *
2695 * @par JSON-RPC请求示例
2696 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSendCustomCommand","params":["/dev/ttyRobotTool,115200,N,8,1",1,10,[1,2,0,2,4,0,0,0,0]],"id":1}
2697 *
2698 * @par JSON-RPC响应示例
2699 * {"id":1,"jsonrpc":"2.0","result":0}
2700 * \endchinese
2701 * \english
2702 * Sends a command specified by the user to the modbus unit located on the
2703 * specified IP address. Cannot be used to request data, since the response
2704 * will not be received. The user is responsible for supplying data which
2705 * is meaningful to the supplied function code. The builtin function takes
2706 * care of constructing the modbus frame, so the user should not be
2707 * concerned with the length of the command.
2708 *
2709 * @param device_info is rtu format.
2710 * eg,"serial_port,baud,parity,data_bit,stop_bit"
2711 * (1)The serial_port argument specifies the name of the serial port eg. On
2712 * Linux ,"/dev/ttyS0" or "/dev/ttyUSB0". On Windows, "\.\COM10".
2713 * (2)The baud argument specifies the baud rate of the communication, eg.
2714 * 9600, 19200, 57600, 115200, etc.
2715 * (3)parity:N for none,E for even,O for odd.
2716 * (4)data_bit:The data_bits argument specifies the number of bits of data,
2717 * the allowed values are 5, 6, 7 and 8.
2718 * (5)stop_bit:The stop_bits argument
2719 * specifies the bits of stop, the allowed values are 1 and 2.
2720 *
2721 * device_info is tcp format.eg,"ip address,port"
2722 * (1)The ip address parameter specifies the ip address of the server
2723 * (2)The port parameter specifies the port number that the server is
2724 * listening on.
2725 * @param slave_number An integer specifying the slave number to use for
2726 * the custom command.
2727 * @param function_code An integer specifying the function code for the
2728 * custom command.
2729 *
2730 * Modbus function codes
2731 * MODBUS_FC_READ_COILS 0x01
2732 * MODBUS_FC_READ_DISCRETE_INPUTS 0x02
2733 * MODBUS_FC_READ_HOLDING_REGISTERS 0x03
2734 * MODBUS_FC_READ_INPUT_REGISTERS 0x04
2735 * MODBUS_FC_WRITE_SINGLE_COIL 0x05
2736 * MODBUS_FC_WRITE_SINGLE_REGISTER 0x06
2737 * MODBUS_FC_READ_EXCEPTION_STATUS 0x07
2738 * MODBUS_FC_WRITE_MULTIPLE_COILS 0x0F
2739 * MODBUS_FC_WRITE_MULTIPLE_REGISTERS 0x10
2740 * MODBUS_FC_REPORT_SLAVE_ID 0x11
2741 * MODBUS_FC_MASK_WRITE_REGISTER 0x16
2742 * MODBUS_FC_WRITE_AND_READ_REGISTERS 0x17
2743 *
2744 * @param data An array of integers in which each entry must be a valid
2745 * byte (0-255) value.
2746 * @return
2747 *
2748 * @par Python interface prototype
2749 * modbusSendCustomCommand(self: pyaubo_sdk.RegisterControl, arg0: str,
2750 * arg1: int, arg2: int, arg3: List[int]) -> int
2751 *
2752 * @par Lua interface prototype
2753 * modbusSendCustomCommand(device_info: string, slave_number: number,
2754 * function_code: number, data: table) -> nil
2755 *
2756 * @par Lua example
2757 * modbusSendCustomCommand("/dev/ttyRobotTool,115200,N,8,1", 1, 10,
2758 * {1,2,0,2,4,0,0,0,0}) -> nil
2759 *
2760 * @par JSON-RPC request example
2761 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSendCustomCommand","params":["/dev/ttyRobotTool,115200,N,8,1",1,10,[1,2,0,2,4,0,0,0,0]],"id":1}
2762 *
2763 * @par JSON-RPC response example
2764 * {"id":1,"jsonrpc":"2.0","result":0}
2765 * \endenglish
2766 */
2767 int modbusSendCustomCommand(const std::string &device_info,
2768 int slave_number, int function_code,
2769 const std::vector<uint8_t> &data);
2770
2771 /**
2772 * \chinese
2773 * 将选择的数字输入信号设置为“default”或“freedrive”
2774 *
2775 * @param robot_name 连接的机器人名称
2776 * @param signal_name 先前被添加的数字输入信号
2777 * @param action 操作类型。操作可以是“default”或“freedrive”
2778 * @return
2779 *
2780 * @par Python函数原型
2781 * modbusSetDigitalInputAction(self: pyaubo_sdk.RegisterControl, arg0: str,
2782 * arg1: str, arg2: int)
2783 *
2784 * @par Lua函数原型
2785 * modbusSetDigitalInputAction(robot_name: string, signal_name: string,
2786 * action: number) -> nil
2787 *
2788 * @par Lua示例
2789 * modbusSetDigitalInputAction("rob1", "Modbus_0","Handguide")
2790 *
2791 * @par JSON-RPC请求示例
2792 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetDigitalInputAction","params":["rob1","Modbus_0","Handguide"],"id":1}
2793 *
2794 * @par JSON-RPC响应示例
2795 * {"id":1,"jsonrpc":"2.0","result":0}
2796 * \endchinese
2797 * \english
2798 * Sets the selected digital input signal to either a "default" or
2799 * "freedrive" action.
2800 *
2801 * @param robot_name A string identifying a robot name that connected robot
2802 * @param signal_name A string identifying a digital input signal that was
2803 * previously added.
2804 * @param action The type of action. The action can either be "default" or
2805 * "freedrive". (string)
2806 * @return
2807 *
2808 * @par Python interface prototype
2809 * modbusSetDigitalInputAction(self: pyaubo_sdk.RegisterControl, arg0: str,
2810 * arg1: str, arg2: int)
2811 *
2812 * @par Lua interface prototype
2813 * modbusSetDigitalInputAction(robot_name: string, signal_name: string,
2814 * action: number) -> nil
2815 *
2816 * @par Lua example
2817 * modbusSetDigitalInputAction("rob1", "Modbus_0","Handguide")
2818 *
2819 * @par JSON-RPC request example
2820 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetDigitalInputAction","params":["rob1","Modbus_0","Handguide"],"id":1}
2821 *
2822 * @par JSON-RPC response example
2823 * {"id":1,"jsonrpc":"2.0","result":0}
2824 * \endenglish
2825 */
2826 int modbusSetDigitalInputAction(const std::string &robot_name,
2827 const std::string &signal_name,
2828 StandardInputAction action);
2829
2830 /**
2831 * \chinese
2832 * 设置 Modbus 信号输出动作
2833 *
2834 * @param robot_name
2835 * @param signal_name
2836 * @param runstate
2837 * @return
2838 *
2839 * @par JSON-RPC请求示例
2840 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputRunstate","params":["rob1","Modbus_0","None"],"id":1}
2841 *
2842 * @par JSON-RPC响应示例
2843 * {"id":1,"jsonrpc":"2.0","result":0}
2844 *
2845 * \endchinese
2846 * \english
2847 * Set Modbus signal output action
2848 *
2849 * @param robot_name
2850 * @param signal_name
2851 * @param runstate
2852 * @return
2853 *
2854 * @par JSON-RPC request example
2855 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputRunstate","params":["rob1","Modbus_0","None"],"id":1}
2856 *
2857 * @par JSON-RPC response example
2858 * {"id":1,"jsonrpc":"2.0","result":0}
2859 *
2860 * \endenglish
2861 */
2862 int modbusSetOutputRunstate(const std::string &robot_name,
2863 const std::string &signal_name,
2864 StandardOutputRunState runstate);
2865
2866 /**
2867 * \chinese
2868 * 将指定名称的输出寄存器信号设置为给定的值
2869 *
2870 * @param signal_name 提前被添加的输出寄存器信号
2871 * @param value 必须是有效的整数,范围是 0-65535
2872 * @return
2873 *
2874 * @par Python函数原型
2875 * modbusSetOutputSignal(self: pyaubo_sdk.RegisterControl, arg0: str, arg1:
2876 * int) -> int
2877 *
2878 * @par Lua函数原型
2879 * modbusSetOutputSignal(signal_name: string, value: number) -> nil
2880 *
2881 * @par Lua示例
2882 * modbusSetOutputSignal("Modbus_0",0)
2883 *
2884 * @par JSON-RPC请求示例
2885 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputSignal","params":["Modbus_0",0],"id":1}
2886 *
2887 * @par JSON-RPC响应示例
2888 * {"id":1,"jsonrpc":"2.0","result":0}
2889 * \endchinese
2890 * \english
2891 * Sets the output register signal identified by the given name to the given
2892 * value.
2893 *
2894 * @param signal_name A string identifying an output register signal that in
2895 * advance has been added.
2896 * @param value An integer which must be a valid word (0-65535)
2897 * @return
2898 *
2899 * @par Python interface prototype
2900 * modbusSetOutputSignal(self: pyaubo_sdk.RegisterControl, arg0: str, arg1:
2901 * int) -> int
2902 *
2903 * @par Lua interface prototype
2904 * modbusSetOutputSignal(signal_name: string, value: number) -> nil
2905 *
2906 * @par Lua example
2907 * modbusSetOutputSignal("Modbus_0",0)
2908 *
2909 * @par JSON-RPC request example
2910 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputSignal","params":["Modbus_0",0],"id":1}
2911 *
2912 * @par JSON-RPC response example
2913 * {"id":1,"jsonrpc":"2.0","result":0}
2914 * \endenglish
2915 */
2916 int modbusSetOutputSignal(const std::string &signal_name, uint16_t value);
2917
2918 /**
2919 * \chinese
2920 * 将指定名称的输出寄存器信号设置为给定的值,并且带超时判断
2921 *
2922 * @param signal_name 提前被添加的输出寄存器信号
2923 * @param value 必须是有效的整数,范围是 0-65535
2924 * @param timeout 超时时间,单位秒
2925 * @return
2926 *
2927 * @par Python函数原型
2928 * modbusSetOutputSignalWithTimeout(self: pyaubo_sdk.RegisterControl, arg0:
2929 * str, arg1: int, arg2: double) -> int
2930 *
2931 * @par Lua函数原型
2932 * modbusSetOutputSignalWithTimeout(signal_name: string, value: number,
2933 * timeout: number) -> nil
2934 *
2935 * @par Lua示例
2936 * modbusSetOutputSignalWithTimeout("Modbus_0",0,0.5)
2937 *
2938 * @par JSON-RPC请求示例
2939 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputSignalWithTimeout","params":["Modbus_0",0,0.5],"id":1}
2940 *
2941 * @par JSON-RPC响应示例
2942 * {"id":1,"jsonrpc":"2.0","result":0}
2943 * \endchinese
2944 * \english
2945 * Sets the output register signal identified by the given name to the
2946 * given, with timeout value.
2947 *
2948 * @param signal_name A string identifying an output register signal that in
2949 * advance has been added.
2950 * @param value An integer which must be a valid word (0-65535)
2951 * @param timeout seconds
2952 * @return
2953 *
2954 * @par Python interface prototype
2955 * modbusSetOutputSignalWithTimeout(self: pyaubo_sdk.RegisterControl, arg0:
2956 * str, arg1: int, arg2: timeout) -> int
2957 *
2958 * @par Lua interface prototype
2959 * modbusSetOutputSignalWithTimeout(signal_name: string, value: number,
2960 * timeout: number) -> nil
2961 *
2962 * @par Lua example
2963 * modbusSetOutputSignalWithTimeout("Modbus_0",0,0.5)
2964 *
2965 * @par JSON-RPC request example
2966 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputSignalWithTimeout","params":["Modbus_0",0,0.5],"id":1}
2967 *
2968 * @par JSON-RPC response example
2969 * {"id":1,"jsonrpc":"2.0","result":0}
2970 * \endenglish
2971 */
2972 int modbusSetOutputSignalWithTimeout(const std::string &signal_name,
2973 uint16_t value, double timeout);
2974
2975 /**
2976 * \chinese
2977 * 设置modbus信号输出脉冲(仅支持线圈输出类型)
2978 *
2979 * @param signal_name: 提前被添加的输出寄存器信号
2980 * @param value: 必须是有效的整数,范围是 0-65535
2981 * @param duration: 信号持续时间,单位为秒
2982 * @return
2983 *
2984 * @par Python函数原型
2985 * modbusSetOutputSignalPulse(self: pyaubo_sdk.RegisterControl, arg0: str,
2986 * arg1: int, arg2 double) -> int
2987 *
2988 * @par Lua函数原型
2989 * modbusSetOutputSignalPulse(signal_name: string, value: number, duration:
2990 * number) -> nil
2991 *
2992 * @par Lua示例
2993 * modbusSetOutputSignalPulse("Modbus_0",1,0.5)
2994 *
2995 * @par JSON-RPC请求示例
2996 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputSignalPulse","params":["Modbus_0",1,0.5],"id":1}
2997 *
2998 * @par JSON-RPC响应示例
2999 * {"id":1,"jsonrpc":"2.0","result":0}
3000 *
3001 * \endchinese
3002 * \english
3003 * Set modbus signal output pulse (only supports coil output type)
3004 *
3005 * @param signal_name: A string identifying an output register signal that
3006 * has been added in advance.
3007 * @param value: An integer which must be a valid word (0-65535)
3008 * @param duration: Duration of the signal, in seconds
3009 * @return
3010 *
3011 * @par Python interface prototype
3012 * modbusSetOutputSignalPulse(self: pyaubo_sdk.RegisterControl, arg0: str,
3013 * arg1: int, arg2: double) -> int
3014 *
3015 * @par Lua interface prototype
3016 * modbusSetOutputSignalPulse(signal_name: string, value: number, duration:
3017 * number) -> nil
3018 *
3019 * @par Lua example
3020 * modbusSetOutputSignalPulse("Modbus_0",1,0.5)
3021 *
3022 * @par JSON-RPC request example
3023 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputSignalPulse","params":["Modbus_0",1,0.5],"id":1}
3024 *
3025 * @par JSON-RPC response example
3026 * {"id":1,"jsonrpc":"2.0","result":0}
3027 *
3028 * \endenglish
3029 */
3030 int modbusSetOutputSignalPulse(const std::string &signal_name,
3031 uint16_t value, double duration);
3032
3033 /**
3034 * \chinese
3035 * 设置机器人向Modbus控制器发送请求的频率,用于读取或写入信号值
3036 *
3037 * @param signal_name 提前被添加的输出数字信号
3038 * @param update_frequency 更新频率(以赫兹为单位),范围是0-125
3039 * @return
3040 *
3041 * @par Python函数原型
3042 * modbusSetSignalUpdateFrequency(self: pyaubo_sdk.RegisterControl, arg0:
3043 * str, arg1: int) -> int
3044 *
3045 * @par Lua函数原型
3046 * modbusSetSignalUpdateFrequency(signal_name: string, update_frequency:
3047 * number) -> nil
3048 *
3049 * @par Lua示例
3050 * modbusSetSignalUpdateFrequency("Modbus_0",1)
3051 *
3052 * @par JSON-RPC请求示例
3053 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetSignalUpdateFrequency","params":["Modbus_0",1],"id":1}
3054 *
3055 * @par JSON-RPC响应示例
3056 * {"id":1,"jsonrpc":"2.0","result":0}
3057 * \endchinese
3058 * \english
3059 * Sets the frequency with which the robot will send requests to the Modbus
3060 * controller to either read or write the signal value.
3061 *
3062 * @param signal_name A string identifying an output digital signal that
3063 * in advance has been added.
3064 * @param update_frequency An integer in the range 0-125 specifying the
3065 * update frequency in Hz.
3066 * @return
3067 *
3068 * @par Python interface prototype
3069 * modbusSetSignalUpdateFrequency(self: pyaubo_sdk.RegisterControl, arg0:
3070 * str, arg1: int) -> int
3071 *
3072 * @par Lua interface prototype
3073 * modbusSetSignalUpdateFrequency(signal_name: string, update_frequency:
3074 * number) -> nil
3075 *
3076 * @par Lua example
3077 * modbusSetSignalUpdateFrequency("Modbus_0",1)
3078 *
3079 * @par JSON-RPC request example
3080 * {"jsonrpc":"2.0","method":"RegisterControl.modbusSetSignalUpdateFrequency","params":["Modbus_0",1],"id":1}
3081 *
3082 * @par JSON-RPC response example
3083 * {"id":1,"jsonrpc":"2.0","result":0}
3084 * \endenglish
3085 */
3086 int modbusSetSignalUpdateFrequency(const std::string &signal_name,
3087 int update_frequency);
3088
3089 /**
3090 * \chinese
3091 * 获取指定 modbus 信号索引,从0开始,不能存在则返回-1
3092 *
3093 * @param signal_name
3094 * @return
3095 *
3096 * @par JSON-RPC请求示例
3097 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalIndex","params":["Modbus_0"],"id":1}
3098 *
3099 * @par JSON-RPC响应示例
3100 * {"id":1,"jsonrpc":"2.0","result":0}
3101 *
3102 * \endchinese
3103 * \english
3104 * Get the index of the specified modbus signal, starting from 0. Returns -1
3105 * if it does not exist.
3106 *
3107 * @param signal_name
3108 * @return
3109 *
3110 * @par JSON-RPC request example
3111 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalIndex","params":["Modbus_0"],"id":1}
3112 *
3113 * @par JSON-RPC response example
3114 * {"id":1,"jsonrpc":"2.0","result":0}
3115 *
3116 * \endenglish
3117 */
3118 int modbusGetSignalIndex(const std::string &signal_name);
3119
3120 /**
3121 * \chinese
3122 * 获取指定 modbus 信号的错误状态
3123 *
3124 * @param signal_name
3125 * @return 返回错误代码 ModbusErrorNum
3126 *
3127 * @par JSON-RPC请求示例
3128 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalError","params":["Modbus_0"],"id":1}
3129 *
3130 * @par JSON-RPC响应示例
3131 * {"id":1,"jsonrpc":"2.0","result":6}
3132 * \endchinese
3133 * \english
3134 * Get the error status of the specified modbus signal
3135 *
3136 * @param signal_name
3137 * @return Returns error code ModbusErrorNum
3138 *
3139 * @par JSON-RPC request example
3140 * {"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalError","params":["Modbus_0"],"id":1}
3141 *
3142 * @par JSON-RPC response example
3143 * {"id":1,"jsonrpc":"2.0","result":6}
3144 * \endenglish
3145 */
3146 int modbusGetSignalError(const std::string &signal_name);
3147
3148 /**
3149 * \chinese
3150 * 获取指定 modbus 设备的连接状态
3151 *
3152 * @param device_name
3153 * 设备名是TCP格式,"ip:port", 例如:"127.0.0.1:502" \n
3154 * 设备名是RTU格式,"serial_port", 例如:"/dev/ttyUSB0" \n
3155 *
3156 * @return
3157 * 0: 表示设备处于连接状态
3158 * -1: 表示设备不存在
3159 * -2: 表示设备处于断开状态
3160 *
3161 * @par JSON-RPC请求示例
3162 * {"jsonrpc":"2.0","method":"RegisterControl.getModbusDeviceStatus","params":["172.16.26.248:502"],"id":1}
3163 *
3164 * @par JSON-RPC响应示例
3165 * {"id":1,"jsonrpc":"2.0","result":0}
3166 *
3167 * \endchinese
3168 * \english
3169 * Get the connection status of the specified modbus device
3170 *
3171 * @param device_name
3172 * Device name in TCP format: "ip:port", e.g. "127.0.0.1:502" \n
3173 * Device name in RTU format: "serial_port", e.g. "/dev/ttyUSB0" \n
3174 *
3175 * @return
3176 * 0: Device is connected
3177 * -1: Device does not exist
3178 * -2: Device is disconnected
3179 *
3180 * @par JSON-RPC request example
3181 * {"jsonrpc":"2.0","method":"RegisterControl.getModbusDeviceStatus","params":["172.16.26.248:502"],"id":1}
3182 *
3183 * @par JSON-RPC response example
3184 * {"id":1,"jsonrpc":"2.0","result":0}
3185 *
3186 * \endenglish
3187 */
3188 int getModbusDeviceStatus(const std::string &device_name);
3189
3190 /**
3191 * \chinese
3192 * 将某个 modbus 寄存器信号作为编码器
3193 *
3194 * @param encoder_id 不能为0
3195 * @param signal_name modbus 信号名字,必须为寄存器类型
3196 * @return
3197 * \endchinese
3198 * \english
3199 * Use a modbus register signal as an encoder
3200 *
3201 * @param encoder_id Must not be 0
3202 * @param signal_name Name of the modbus signal, must be of register type
3203 * @return
3204 * \endenglish
3205 */
3206 int addModbusEncoder(int encoder_id, int range_id,
3207 const std::string &signal_name);
3208
3209 /**
3210 * \chinese
3211 * 添加Int32寄存器的虚拟编码器
3212 *
3213 * @param encoder_id 编码器ID
3214 * @param range_id 范围ID
3215 * @param key 变量名
3216 * @return
3217 * \endchinese
3218 * \english
3219 * Add a virtual encoder for an Int32 register
3220 *
3221 * @param encoder_id Encoder ID
3222 * @param range_id Range ID
3223 * @param key Variable name
3224 * @return
3225 * \endenglish
3226 */
3227 int addInt32RegEncoder(int encoder_id, int range_id,
3228 const std::string &key);
3229
3230 /**
3231 * \chinese
3232 * 删除虚拟编码器
3233 *
3234 * @param encoder_id
3235 * @return
3236 * \endchinese
3237 * \english
3238 * Delete virtual encoder
3239 *
3240 * @param encoder_id
3241 * @return
3242 * \endenglish
3243 */
3244 int deleteVirtualEncoder(int encoder_id);
3245
3246protected:
3247 void *d_;
3248};
3249using RegisterControlPtr = std::shared_ptr<RegisterControl>;
3250
3251} // namespace common_interface
3252} // namespace arcs
3253
3254#endif // AUBO_SDK_REGISTER_CONTROL_INTERFACE_H
float getFloatOutput(uint32_t address)
Reads the float from one of the output registers, which can also be accessed by a FieldBus.
int setVecChar(const std::string &key, const std::vector< char > &value)
Set or update the variable value
int getInt32Output(uint32_t address)
Reads the integer from one of the output registers, which can also be accessed by a FieldBus.
int setBool(const std::string &key, bool value)
Set or update the variable value
int deleteVirtualEncoder(int encoder_id)
Delete virtual encoder
int setVecFloat(const std::string &key, const std::vector< float > &value)
Set or update the variable value
int setVecInt32(const std::string &key, const std::vector< int32_t > &value)
Set or update the variable value
int getModbusDeviceStatus(const std::string &device_name)
Get the connection status of the specified modbus device
bool getBoolInput(uint32_t address)
Reads the boolean from one of the input registers, which can also be accessed by a Field bus.
bool getBool(const std::string &key, bool default_value)
Get variable value
std::vector< double > getVecDouble(const std::string &key, const std::vector< double > &default_value)
Get variable value
int modbusDeleteAllSignals()
Delete all modbus signals
std::vector< int > modbusGetSignalErrors()
Get the error status of all signal requests (0: no error, others: error) as a collection
double getDoubleOutput(uint32_t address)
Reads the double value from one of the output registers.
std::vector< int32_t > getVecInt32(const std::string &key, const std::vector< int32_t > &default_value)
Get variable value
int modbusGetSignalIndex(const std::string &signal_name)
Get the index of the specified modbus signal, starting from 0.
bool getInt16RegisterBit(uint32_t address, uint8_t bit_offset)
Get the status of a specific bit in an Int16 register
int setInt32(const std::string &key, int value)
Set or update the variable value
std::vector< std::string > modbusGetSignalNames()
Get the collection of all signal names
int modbusAddSignal(const std::string &device_info, int slave_number, int signal_address, int signal_type, const std::string &signal_name, bool sequential_mode)
Adds a new modbus signal for the controller to supervise.
int getWatchDogTimeout(const std::string &key)
Get the watchdog timeout value
int getInt32Input(uint32_t address)
Reads the integer from one of the input registers, which can also be accessed by a FieldBus.
int setVecDouble(const std::string &key, const std::vector< double > &value)
Set or update the variable value
int setInt16Register(uint32_t address, int16_t value)
float getFloatInput(uint32_t address)
Reads the float from one of the input registers, which can also be accessed by a Field bus.
bool hasNamedVariable(const std::string &key)
Whether the named variable exists
int getWatchDogAction(const std::string &key)
Get the watchdog action
std::string getNamedVariableType(const std::string &key)
Get the type of a named variable
std::vector< int > modbusGetSignalTypes()
Get the collection of all signal types
int16_t getInt16Register(uint32_t address)
Used for Modbus Slave
int setInt32Input(uint32_t address, int value)
int getInt32(const std::string &key, int default_value)
Get variable value
int modbusSetOutputSignal(const std::string &signal_name, uint16_t value)
Sets the output register signal identified by the given name to the given value.
int setString(const std::string &key, const std::string &value)
Set or update the variable value
int modbusGetSignalError(const std::string &signal_name)
Get the error status of the specified modbus signal
int setFloat(const std::string &key, float value)
Set or update the variable value
int setDouble(const std::string &key, double value)
Set or update the variable value
int setWatchDog(const std::string &key, double timeout, int action)
Set the watchdog
int modbusSetOutputRunstate(const std::string &robot_name, const std::string &signal_name, StandardOutputRunState runstate)
Set Modbus signal output action
int modbusSetOutputSignalPulse(const std::string &signal_name, uint16_t value, double duration)
Set modbus signal output pulse (only supports coil output type)
double getDouble(const std::string &key, double default_value)
Get variable value
int setInt16RegisterBit(uint32_t address, uint8_t bit_offset, bool value)
Set the status of a specific bit in an Int16 register
bool getBoolOutput(uint32_t address)
Reads the boolean from one of the output registers, which can also be accessed by a Field bus.
int setDoubleOutput(uint32_t address, double value)
int modbusSendCustomCommand(const std::string &device_info, int slave_number, int function_code, const std::vector< uint8_t > &data)
Sends a command specified by the user to the modbus unit located on the specified IP address.
bool variableUpdated(const std::string &key, uint64_t since)
Whether the named variable has been updated
std::vector< float > getVecFloat(const std::string &key, const std::vector< float > &default_value)
Get variable value
std::vector< int > modbusGetSignalValues()
Get the collection of all signal values
int addInt32RegEncoder(int encoder_id, int range_id, const std::string &key)
Add a virtual encoder for an Int32 register
std::string getString(const std::string &key, const std::string &default_value)
Get variable value
int modbusGetSignalStatus(const std::string &signal_name)
Reads the current value of a specific signal.
int addModbusEncoder(int encoder_id, int range_id, const std::string &signal_name)
Use a modbus register signal as an encoder
double getDoubleInput(uint32_t address)
Reads the double value from one of the input registers, which can also be accessed by a FieldBus.
int clearNamedVariable(const std::string &key)
Clear variable
int modbusSetSignalUpdateFrequency(const std::string &signal_name, int update_frequency)
Sets the frequency with which the robot will send requests to the Modbus controller to either read or...
int setBoolInput(uint32_t address, bool value)
int setInt32Output(uint32_t address, int value)
int modbusSetOutputSignalWithTimeout(const std::string &signal_name, uint16_t value, double timeout)
Sets the output register signal identified by the given name to the given, with timeout value.
int setFloatInput(uint32_t address, float value)
int setBoolOutput(uint32_t address, bool value)
int modbusDeleteSignal(const std::string &signal_name)
Deletes the signal identified by the supplied signal name.
int setDoubleInput(uint32_t address, double value)
int setFloatOutput(uint32_t address, float value)
int modbusSetDigitalInputAction(const std::string &robot_name, const std::string &signal_name, StandardInputAction action)
Sets the selected digital input signal to either a "default" or "freedrive" action.
std::vector< char > getVecChar(const std::string &key, const std::vector< char > &default_value)
Get variable value
float getFloat(const std::string &key, float default_value)
Get variable value
StandardInputAction
The StandardInputAction enum.
Definition type_def.h:605
StandardOutputRunState
Standard Output Run State.
Definition type_def.h:597
std::shared_ptr< RegisterControl > RegisterControlPtr
ModbusErrorNum
@ MB_ERR_NOT_INIT
MODBUS unit not initiallized.
@ MB_ERR_SLAVE_DEVICE_BUSY
Specialized use in conjunction with programming commands sent to the remote MODBUS unit,...
@ MB_ERR_ILLEGAL_FUNCTION
The function code received in the query is not an allowable action for the server (or slave).
@ MB_ERR_ILLEGAL_DATA_ADDRESS
The function code received in the query is not an allowable action for the server (or slave),...
@ MB_ERR_DISCONNECTED
MODBUS unit disconnected.
@ MB_ERR_SLAVE_DEVICE_FAILURE
An unrecoverable error occurred while the server (or slave) was attempting to perform the requested a...
@ MB_ERR_ILLEGAL_DATA_VALUE
A value contained in the query data field is not an allowable value for server (or slave),...
@ MB_ERR_ACKNOWLEDGE
Specialized use in conjunction with programming commands sent to the remote MODBUS unit.
enum type definitions