AUBO SDK  0.26.0
Loading...
Searching...
No Matches
arcs::common_interface::RegisterControl Class Reference

General Registers. More...

#include <register_control.h>

Public Member Functions

 RegisterControl ()
 
virtual ~RegisterControl ()
 
bool getBoolInput (uint32_t address)
 Reads the boolean from one of the input registers, which can also be accessed by a Field bus.
 
int setBoolInput (uint32_t address, bool value)
 
int getInt32Input (uint32_t address)
 Reads the integer from one of the input registers, which can also be accessed by a FieldBus.
 
int setInt32Input (uint32_t address, int value)
 
float getFloatInput (uint32_t address)
 Reads the float from one of the input registers, which can also be accessed by a Field bus.
 
int setFloatInput (uint32_t address, float value)
 
double getDoubleInput (uint32_t address)
 Reads the double value from one of the input registers, which can also be accessed by a FieldBus.
 
int setDoubleInput (uint32_t address, double value)
 
bool getBoolOutput (uint32_t address)
 Reads the boolean from one of the output registers, which can also be accessed by a Field bus.
 
int setBoolOutput (uint32_t address, bool value)
 
int getInt32Output (uint32_t address)
 Reads the integer from one of the output registers, which can also be accessed by a FieldBus.
 
int setInt32Output (uint32_t address, int value)
 
float getFloatOutput (uint32_t address)
 Reads the float from one of the output registers, which can also be accessed by a FieldBus.
 
int setFloatOutput (uint32_t address, float value)
 
double getDoubleOutput (uint32_t address)
 Reads the double value from one of the output registers.
 
int setDoubleOutput (uint32_t address, double value)
 
int16_t getInt16Register (uint32_t address)
 Used for Modbus Slave
 
int setInt16Register (uint32_t address, int16_t value)
 
bool hasNamedVariable (const std::string &key)
 Whether the named variable exists
 
std::string getNamedVariableType (const std::string &key)
 Get the type of a named variable
 
bool variableUpdated (const std::string &key, uint64_t since)
 Whether the named variable has been updated
 
bool getBool (const std::string &key, bool default_value)
 Get variable value
 
int setBool (const std::string &key, bool value)
 Set or update the variable value
 
std::vector< char > getVecChar (const std::string &key, const std::vector< char > &default_value)
 Get variable value
 
int setVecChar (const std::string &key, const std::vector< char > &value)
 Set or update the variable value
 
int getInt32 (const std::string &key, int default_value)
 Get variable value
 
int setInt32 (const std::string &key, int value)
 Set or update the variable value
 
std::vector< int32_t > getVecInt32 (const std::string &key, const std::vector< int32_t > &default_value)
 Get variable value
 
int setVecInt32 (const std::string &key, const std::vector< int32_t > &value)
 Set or update the variable value
 
float getFloat (const std::string &key, float default_value)
 Get variable value
 
int setFloat (const std::string &key, float value)
 Set or update the variable value
 
std::vector< float > getVecFloat (const std::string &key, const std::vector< float > &default_value)
 Get variable value
 
int setVecFloat (const std::string &key, const std::vector< float > &value)
 Set or update the variable value
 
double getDouble (const std::string &key, double default_value)
 Get variable value
 
int setDouble (const std::string &key, double value)
 Set or update the variable value
 
std::vector< double > getVecDouble (const std::string &key, const std::vector< double > &default_value)
 Get variable value
 
int setVecDouble (const std::string &key, const std::vector< double > &value)
 Set or update the variable value
 
std::string getString (const std::string &key, const std::string &default_value)
 Get variable value
 
int setString (const std::string &key, const std::string &value)
 Set or update the variable value
 
int clearNamedVariable (const std::string &key)
 Clear variable
 
int setWatchDog (const std::string &key, double timeout, int action)
 Set the watchdog
 
int getWatchDogAction (const std::string &key)
 Get the watchdog action
 
int getWatchDogTimeout (const std::string &key)
 Get the watchdog timeout value
 
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 modbusDeleteSignal (const std::string &signal_name)
 Deletes the signal identified by the supplied signal name.
 
int modbusDeleteAllSignals ()
 Delete all modbus signals
 
int modbusGetSignalStatus (const std::string &signal_name)
 Reads the current value of a specific signal.
 
std::vector< std::string > modbusGetSignalNames ()
 Get the collection of all signal names
 
std::vector< int > modbusGetSignalTypes ()
 Get the collection of all signal types
 
std::vector< int > modbusGetSignalValues ()
 Get the collection of all signal values
 
std::vector< int > modbusGetSignalErrors ()
 Get the error status of all signal requests (0: no error, others: error) as a collection
 
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.
 
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.
 
int modbusSetOutputRunstate (const std::string &robot_name, const std::string &signal_name, StandardOutputRunState runstate)
 Set Modbus signal output action
 
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 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 modbusSetOutputSignalPulse (const std::string &signal_name, uint16_t value, double duration)
 Set modbus signal output pulse (only supports coil output type)
 
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 write the signal value.
 
int modbusGetSignalIndex (const std::string &signal_name)
 Get the index of the specified modbus signal, starting from 0.
 
int modbusGetSignalError (const std::string &signal_name)
 Get the error status of the specified modbus signal
 
int getModbusDeviceStatus (const std::string &device_name)
 Get the connection status of the specified modbus device
 
int addModbusEncoder (int encoder_id, int range_id, const std::string &signal_name)
 Use a modbus register signal as an encoder
 
int addInt32RegEncoder (int encoder_id, int range_id, const std::string &key)
 Add a virtual encoder for an Int32 register
 
int deleteVirtualEncoder (int encoder_id)
 Delete virtual encoder
 

Protected Attributes

void * d_
 

Detailed Description

General Registers.

Definition at line 63 of file register_control.h.

Constructor & Destructor Documentation

◆ RegisterControl()

arcs::common_interface::RegisterControl::RegisterControl ( )

◆ ~RegisterControl()

virtual arcs::common_interface::RegisterControl::~RegisterControl ( )
virtual

Member Function Documentation

◆ addInt32RegEncoder()

int arcs::common_interface::RegisterControl::addInt32RegEncoder ( int  encoder_id,
int  range_id,
const std::string &  key 
)

Add a virtual encoder for an Int32 register

Parameters
encoder_idEncoder ID
range_idRange ID
keyVariable name
Returns

◆ addModbusEncoder()

int arcs::common_interface::RegisterControl::addModbusEncoder ( int  encoder_id,
int  range_id,
const std::string &  signal_name 
)

Use a modbus register signal as an encoder

Parameters
encoder_idMust not be 0
signal_nameName of the modbus signal, must be of register type
Returns

◆ clearNamedVariable()

int arcs::common_interface::RegisterControl::clearNamedVariable ( const std::string &  key)

Clear variable

Parameters
key
Returns
Python interface prototype
clearNamedVariable(self: pyaubo_sdk.RegisterControl, arg0: str) -> int
Lua interface prototype
clearNamedVariable(key: string) -> nil
Lua example
clearNamedVariable("custom")
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.clearNamedVariable","params":["custom"],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":1}

◆ deleteVirtualEncoder()

int arcs::common_interface::RegisterControl::deleteVirtualEncoder ( int  encoder_id)

Delete virtual encoder

Parameters
encoder_id
Returns

◆ getBool()

bool arcs::common_interface::RegisterControl::getBool ( const std::string &  key,
bool  default_value 
)

Get variable value

Parameters
key
default_value
Returns
Python interface prototype
getBool(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: bool) -> bool
Lua interface prototype
getBool(key: string, default_value: boolean) -> boolean
Lua example
Bool_var = getBool("custom",false)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getBool","params":["custom",false],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":true}

◆ getBoolInput()

bool arcs::common_interface::RegisterControl::getBoolInput ( uint32_t  address)

Reads the boolean from one of the input registers, which can also be accessed by a Field bus.

Note, uses its own memory space.

Parameters
addressAddress of the register (0:127)
Returns
Boolean value held by the register (true, false)
Note
The lower range of the boolean input registers [0:63] is reserved for FieldBus/PLC interface usage. The upper range [64:127] cannot be accessed by FieldBus/PLC interfaces, since it is reserved for external RTDE clients.
Python interface prototype
getBoolInput(self: pyaubo_sdk.RegisterControl, arg0: int) -> bool
Lua interface prototype
getBoolInput(address: number) -> boolean
Lua example
BoolInput_0 = getBoolInput(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getBoolInput","params":[0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":false}

◆ getBoolOutput()

bool arcs::common_interface::RegisterControl::getBoolOutput ( uint32_t  address)

Reads the boolean from one of the output registers, which can also be accessed by a Field bus.

Note, uses its own memory space.

Parameters
addressAddress of the register (0:127)
Returns
The boolean value held by the register (true, false)
Note
The lower range of the boolean output registers [0:63] is reserved for FieldBus/PLC interface usage. The upper range [64:127] cannot be accessed by FieldBus/PLC interfaces, since it is reserved for external RTDE clients.
Python interface prototype
getBoolOutput(self: pyaubo_sdk.RegisterControl, arg0: int) -> bool
Lua interface prototype
getBoolOutput(address: number) -> boolean
Lua example
BoolOutput_0 = getBoolOutput(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getBoolOutput","params":[0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":false}

◆ getDouble()

double arcs::common_interface::RegisterControl::getDouble ( const std::string &  key,
double  default_value 
)

Get variable value

Parameters
key
default_value
Returns
Python interface prototype
getDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) -> float
Lua interface prototype
getDouble(key: string, default_value: number) -> number
Lua example
var_Double = getDouble("custom",0.0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getDouble","params":["custom",0.0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0.0}

◆ getDoubleInput()

double arcs::common_interface::RegisterControl::getDoubleInput ( uint32_t  address)

Reads the double value from one of the input registers, which can also be accessed by a FieldBus.

Note, uses its own memory space.

Parameters
addressAddress of the register (0:47)
Returns
The double value held by the register
Python interface prototype
getDoubleInput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
Lua interface prototype
getDoubleInput(address: number) -> number
Lua example
DoubleInput_0 = getDoubleInput(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getDoubleInput","params":[0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0.0}

◆ getDoubleOutput()

double arcs::common_interface::RegisterControl::getDoubleOutput ( uint32_t  address)

Reads the double value from one of the output registers.

Parameters
addressAddress of the register
Returns
The double value held by the register
Python interface prototype
getDoubleOutput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
Lua interface prototype
getDoubleOutput(address: number) -> number
Lua example
DoubleOutput_0 = getDoubleOutput(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getDoubleOutput","params":[0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0.0}

◆ getFloat()

float arcs::common_interface::RegisterControl::getFloat ( const std::string &  key,
float  default_value 
)

Get variable value

Parameters
key
default_value
Returns
Python interface prototype
getFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) -> float
Lua interface prototype
getFloat(key: string, default_value: number) -> number
Lua example
var_Float = getFloat("custom",0.0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getFloat","params":["custom",0.0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":4.400000095367432}

◆ getFloatInput()

float arcs::common_interface::RegisterControl::getFloatInput ( uint32_t  address)

Reads the float from one of the input registers, which can also be accessed by a Field bus.

Note, uses it’s own memory space.

Parameters
addressAddress of the register (0:47)
Returns
The value held by the register (float)
Note
The lower range of the float input registers [0:23] is reserved for FieldBus/PLC interface usage. The upper range [24:47] cannot be accessed by FieldBus/PLC interfaces, since it is reserved for external RTDE clients.
Python interface prototype
getFloatInput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
Lua interface prototype
getFloatInput(address: number) -> number
Lua example
FloatInput_0_0 = getFloatInput(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getFloatInput","params":[0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0.0}

◆ getFloatOutput()

float arcs::common_interface::RegisterControl::getFloatOutput ( uint32_t  address)

Reads the float from one of the output registers, which can also be accessed by a FieldBus.

Note, uses its own memory space.

Parameters
addressAddress of the register (0:47)
Returns
The value held by the register (float)
Note
The lower range of the float output registers [0:23] is reserved for FieldBus/PLC interface usage. The upper range [24:47] cannot be accessed by FieldBus/PLC interfaces, since it is reserved for external RTDE clients.
Python interface prototype
getFloatOutput(self: pyaubo_sdk.RegisterControl, arg0: int) -> float
Lua interface prototype
getFloatOutput(address: number) -> number
Lua example
FloatOutput_0 = getFloatOutput(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getFloatOutput","params":[0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":3.3}

◆ getInt16Register()

int16_t arcs::common_interface::RegisterControl::getInt16Register ( uint32_t  address)

Used for Modbus Slave

Parameters
address
Returns
Python interface prototype
getInt16Register(self: pyaubo_sdk.RegisterControl, arg0: int) -> int
Lua interface prototype
getInt16Register(address: number) -> number
Lua example
Int16Register_0 = getInt16Register(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getInt16Register","params":[0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ getInt32()

int arcs::common_interface::RegisterControl::getInt32 ( const std::string &  key,
int  default_value 
)

Get variable value

Parameters
key
default_value
Returns
Python interface prototype
getInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int) -> int
Lua interface prototype
getInt32(key: string, default_value: number) -> number
Lua example
Int32 = getInt32("custom",0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getInt32","params":["custom",0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":6}

◆ getInt32Input()

int arcs::common_interface::RegisterControl::getInt32Input ( uint32_t  address)

Reads the integer from one of the input registers, which can also be accessed by a FieldBus.

Note, uses it’s own memory space.

Parameters
addressAddress of the register (0:47)
Returns
The value held by the register [-2,147,483,648 : 2,147,483,647]
Note
The lower range of the integer input registers [0:23] is reserved for FieldBus/PLC interface usage. The upper range [24:47] cannot be accessed by FieldBus/PLC interfaces, since it is reserved for external RTDE clients.
Python interface prototype
getInt32Input(self: pyaubo_sdk.RegisterControl, arg0: int) -> int
Lua interface prototype
getInt32Input(address: number) -> number
Lua example
Int32Input_0 = getInt32Input(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getInt32Input","params":[0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ getInt32Output()

int arcs::common_interface::RegisterControl::getInt32Output ( uint32_t  address)

Reads the integer from one of the output registers, which can also be accessed by a FieldBus.

Note, uses its own memory space.

Parameters
addressAddress of the register (0:47)
Returns
The int value held by the register [-2,147,483,648 : 2,147,483,647]
Note
The lower range of the integer output registers [0:23] is reserved for FieldBus/PLC interface usage. The upper range [24:47] cannot be accessed by FieldBus/PLC interfaces, since it is reserved for external RTDE clients.
Python interface prototype
getInt32Output(self: pyaubo_sdk.RegisterControl, arg0: int) -> int
Lua interface prototype
getInt32Output(address: number) -> number
Lua example
Int32Output_0 = getInt32Output(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getInt32Output","params":[0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ getModbusDeviceStatus()

int arcs::common_interface::RegisterControl::getModbusDeviceStatus ( const std::string &  device_name)

Get the connection status of the specified modbus device

Parameters
device_nameDevice name in TCP format: "ip:port", e.g. "127.0.0.1:502"
Device name in RTU format: "serial_port", e.g. "/dev/ttyUSB0"
Returns
0: Device is connected -1: Device does not exist -2: Device is disconnected
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getModbusDeviceStatus","params":["172.16.26.248:502"],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ getNamedVariableType()

std::string arcs::common_interface::RegisterControl::getNamedVariableType ( const std::string &  key)

Get the type of a named variable

Parameters
key
Returns
Lua interface prototype
getNamedVariableType(key: string) -> string
Lua example
NamedVariableType = getNamedVariableType("custom")
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getNamedVariableType","params":["custom"],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":"NONE"}

◆ getString()

std::string arcs::common_interface::RegisterControl::getString ( const std::string &  key,
const std::string &  default_value 
)

Get variable value

Parameters
key
default_value
Returns
Python interface prototype
getString(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: str) -> str
Lua interface prototype
getString(key: string, default_value: string) -> string
Lua example
var_String = getString("custom","")
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getString","params":["custom",""],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":"test"}

◆ getVecChar()

std::vector< char > arcs::common_interface::RegisterControl::getVecChar ( const std::string &  key,
const std::vector< char > &  default_value 
)

Get variable value

Parameters
key
default_value
Returns
Python interface prototype
getVecChar(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[str]) -> List[str]
Lua interface prototype
getVecChar(key: string, default_value: table) -> table
Lua example
VecChar = getVecChar("custom",{})
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getVecChar","params":["custom",[]],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":[0,1,0]}

◆ getVecDouble()

std::vector< double > arcs::common_interface::RegisterControl::getVecDouble ( const std::string &  key,
const std::vector< double > &  default_value 
)

Get variable value

Parameters
key
default_value
Returns
Python interface prototype
getVecDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[float]) -> List[float]
Lua interface prototype
getVecDouble(key: string, default_value: table) -> table
Lua example
VecDouble = getVecDouble("custom",{})
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getVecDouble","params":["custom",[]],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":[0.1,0.2,0.3]}

◆ getVecFloat()

std::vector< float > arcs::common_interface::RegisterControl::getVecFloat ( const std::string &  key,
const std::vector< float > &  default_value 
)

Get variable value

Parameters
key
default_value
Returns
Python interface prototype
getVecFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[float]) -> List[float]
Lua interface prototype
getVecFloat(key: string, default_value: table) -> table
Lua example
VecFloat = getVecFloat("custom",{})
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getVecFloat","params":["custom",[]],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":[0.0,0.10000000149011612,3.299999952316284]}

◆ getVecInt32()

std::vector< int32_t > arcs::common_interface::RegisterControl::getVecInt32 ( const std::string &  key,
const std::vector< int32_t > &  default_value 
)

Get variable value

Parameters
key
default_value
Returns
Python interface prototype
getVecInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[int]) -> List[int]
Lua interface prototype
getVecInt32(key: string, default_value: table) -> table
Lua example
VecInt32 = getVecInt32("custom",{})
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.getVecInt32","params":["custom",[]],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":[1,2,3,4]}

◆ getWatchDogAction()

int arcs::common_interface::RegisterControl::getWatchDogAction ( const std::string &  key)

Get the watchdog action

Parameters
key
Returns

◆ getWatchDogTimeout()

int arcs::common_interface::RegisterControl::getWatchDogTimeout ( const std::string &  key)

Get the watchdog timeout value

Parameters
key
Returns

◆ hasNamedVariable()

bool arcs::common_interface::RegisterControl::hasNamedVariable ( const std::string &  key)

Whether the named variable exists

Parameters
keyVariable name
Returns
Lua interface prototype
hasNamedVariable(key: string) -> boolean
Lua example
NamedVariable = hasNamedVariable("custom")
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.hasNamedVariable","params":["custom"],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":false}

◆ modbusAddSignal()

int arcs::common_interface::RegisterControl::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.

Expects no response.

Parameters
device_infois rtu format. eg,"serial_port,baud,parity,data_bit,stop_bit" (1)The serial_port argument specifies the name of the serial port eg. On Linux ,"/dev/ttyS0" or "/dev/ttyUSB0". On Windows, "\.\COM10". (2)The baud argument specifies the baud rate of the communication, eg. 9600, 19200, 57600, 115200, etc. (3)parity:N for none,E for even,O for odd. (4)data_bit:The data_bits argument specifies the number of bits of data, the allowed values are 5, 6, 7 and 8. (5)stop_bit:The stop_bits argument specifies the bits of stop, the allowed values are 1 and 2.

device_info is tcp format.eg,"ip address,port" (1)The ip address parameter specifies the ip address of the server (2)The port parameter specifies the port number that the server is listening on.

Parameters
slave_numberAn integer normally not used and set to 255, but is a free choice between 0 and 255.
signal_addressAn integer specifying the address of the either the coil or the register that this new signal should reflect. Consult the configuration of the modbus unit for this information.
signal_typeAn integer specifying the type of signal to add. 0 = digital input, 1 = digital output, 2 = register input and 3 = register output.
signal_nameA string uniquely identifying the signal. If a string is supplied which is equal to an already added signal, the new signal will replace the old one. The length of the string cannot exceed 20 characters.
sequential_modeSetting to True forces the modbus client to wait for a response before sending the next request. This mode is required by some fieldbus units (Optional).
Returns
Python interface prototype
modbusAddSignal(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int, arg2: int, arg3: int, arg4: str, arg5: bool) -> int
Lua interface prototype
modbusAddSignal(device_info: string, slave_number: number, signal_address: number, signal_type: number, signal_name: string, sequential_mode: boolean) -> nil
Lua example
modbusAddSignal("/dev/ttyRobotTool,115200,N,8,1", 1, signal_address: number, 264, "Modbus_0", false)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusAddSignal","params":["/dev/ttyRobotTool,115200,N,8,1",1,264,3,"Modbus_0",false],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ modbusDeleteAllSignals()

int arcs::common_interface::RegisterControl::modbusDeleteAllSignals ( )

Delete all modbus signals

Returns
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusDeleteAllSignals","params":[],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ modbusDeleteSignal()

int arcs::common_interface::RegisterControl::modbusDeleteSignal ( const std::string &  signal_name)

Deletes the signal identified by the supplied signal name.

Parameters
signal_nameA string equal to the name of the signal that should be deleted.
Returns
Python interface prototype
modbusDeleteSignal(self: pyaubo_sdk.RegisterControl, arg0: str) -> int
Lua interface prototype
modbusDeleteSignal(signal_name: string) -> nil
Lua example
modbusDeleteSignal("Modbus_1")
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusDeleteSignal","params":["Modbus_1"],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ modbusGetSignalError()

int arcs::common_interface::RegisterControl::modbusGetSignalError ( const std::string &  signal_name)

Get the error status of the specified modbus signal

Parameters
signal_name
Returns
Returns error code ModbusErrorNum
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalError","params":["Modbus_0"],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":6}

◆ modbusGetSignalErrors()

std::vector< int > arcs::common_interface::RegisterControl::modbusGetSignalErrors ( )

Get the error status of all signal requests (0: no error, others: error) as a collection

Returns
ModbusErrorNum
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalErrors","params":[],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":[6,6,6,6]}

◆ modbusGetSignalIndex()

int arcs::common_interface::RegisterControl::modbusGetSignalIndex ( const std::string &  signal_name)

Get the index of the specified modbus signal, starting from 0.

Returns -1 if it does not exist.

Parameters
signal_name
Returns
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalIndex","params":["Modbus_0"],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ modbusGetSignalNames()

std::vector< std::string > arcs::common_interface::RegisterControl::modbusGetSignalNames ( )

Get the collection of all signal names

Returns
Collection of all signal names
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalNames","params":[],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":["Modbus_0"]}

◆ modbusGetSignalStatus()

int arcs::common_interface::RegisterControl::modbusGetSignalStatus ( const std::string &  signal_name)

Reads the current value of a specific signal.

Parameters
signal_nameA string equal to the name of the signal for which the value should be gotten.
Returns
An integer or a boolean. For digital signals: 1 or 0. For register signals: The register value expressed as an integer. If the value is -1, it means the signal does not exist.
Python interface prototype
modbusGetSignalStatus(self: pyaubo_sdk.RegisterControl, arg0: str) -> int
Lua interface prototype
modbusGetSignalStatus(signal_name: string) -> number
Lua example
var0 = modbusGetSignalStatus("Modbus_0")
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalStatus","params":["Modbus_0"],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":1}

◆ modbusGetSignalTypes()

std::vector< int > arcs::common_interface::RegisterControl::modbusGetSignalTypes ( )

Get the collection of all signal types

Returns
Collection of all signal types
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalTypes","params":[],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":[1,0,2,3]}

◆ modbusGetSignalValues()

std::vector< int > arcs::common_interface::RegisterControl::modbusGetSignalValues ( )

Get the collection of all signal values

Returns
Collection of all signal values
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusGetSignalValues","params":[],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":[1,1,88,33]}

◆ modbusSendCustomCommand()

int arcs::common_interface::RegisterControl::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.

Cannot be used to request data, since the response will not be received. The user is responsible for supplying data which is meaningful to the supplied function code. The builtin function takes care of constructing the modbus frame, so the user should not be concerned with the length of the command.

Parameters
device_infois rtu format. eg,"serial_port,baud,parity,data_bit,stop_bit" (1)The serial_port argument specifies the name of the serial port eg. On Linux ,"/dev/ttyS0" or "/dev/ttyUSB0". On Windows, "\.\COM10". (2)The baud argument specifies the baud rate of the communication, eg. 9600, 19200, 57600, 115200, etc. (3)parity:N for none,E for even,O for odd. (4)data_bit:The data_bits argument specifies the number of bits of data, the allowed values are 5, 6, 7 and 8. (5)stop_bit:The stop_bits argument specifies the bits of stop, the allowed values are 1 and 2.

device_info is tcp format.eg,"ip address,port" (1)The ip address parameter specifies the ip address of the server (2)The port parameter specifies the port number that the server is listening on.

Parameters
slave_numberAn integer specifying the slave number to use for the custom command.
function_codeAn integer specifying the function code for the custom command.

Modbus function codes MODBUS_FC_READ_COILS 0x01 MODBUS_FC_READ_DISCRETE_INPUTS 0x02 MODBUS_FC_READ_HOLDING_REGISTERS 0x03 MODBUS_FC_READ_INPUT_REGISTERS 0x04 MODBUS_FC_WRITE_SINGLE_COIL 0x05 MODBUS_FC_WRITE_SINGLE_REGISTER 0x06 MODBUS_FC_READ_EXCEPTION_STATUS 0x07 MODBUS_FC_WRITE_MULTIPLE_COILS 0x0F MODBUS_FC_WRITE_MULTIPLE_REGISTERS 0x10 MODBUS_FC_REPORT_SLAVE_ID 0x11 MODBUS_FC_MASK_WRITE_REGISTER 0x16 MODBUS_FC_WRITE_AND_READ_REGISTERS 0x17

Parameters
dataAn array of integers in which each entry must be a valid byte (0-255) value.
Returns
Python interface prototype
modbusSendCustomCommand(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int, arg2: int, arg3: List[int]) -> int
Lua interface prototype
modbusSendCustomCommand(device_info: string, slave_number: number, function_code: number, data: table) -> nil
Lua example
modbusSendCustomCommand("/dev/ttyRobotTool,115200,N,8,1", 1, 10, {1,2,0,2,4,0,0,0,0}) -> nil
JSON-RPC request example
{"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}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ modbusSetDigitalInputAction()

int arcs::common_interface::RegisterControl::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.

Parameters
robot_nameA string identifying a robot name that connected robot
signal_nameA string identifying a digital input signal that was previously added.
actionThe type of action. The action can either be "default" or "freedrive". (string)
Returns
Python interface prototype
modbusSetDigitalInputAction(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: str, arg2: int)
Lua interface prototype
modbusSetDigitalInputAction(robot_name: string, signal_name: string, action: number) -> nil
Lua example
modbusSetDigitalInputAction("rob1", "Modbus_0","Handguide")
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusSetDigitalInputAction","params":["rob1","Modbus_0","Handguide"],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ modbusSetOutputRunstate()

int arcs::common_interface::RegisterControl::modbusSetOutputRunstate ( const std::string &  robot_name,
const std::string &  signal_name,
StandardOutputRunState  runstate 
)

Set Modbus signal output action

Parameters
robot_name
signal_name
runstate
Returns
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputRunstate","params":["rob1","Modbus_0","None"],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ modbusSetOutputSignal()

int arcs::common_interface::RegisterControl::modbusSetOutputSignal ( const std::string &  signal_name,
uint16_t  value 
)

Sets the output register signal identified by the given name to the given value.

Parameters
signal_nameA string identifying an output register signal that in advance has been added.
valueAn integer which must be a valid word (0-65535)
Returns
Python interface prototype
modbusSetOutputSignal(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int) -> int
Lua interface prototype
modbusSetOutputSignal(signal_name: string, value: number) -> nil
Lua example
modbusSetOutputSignal("Modbus_0",0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputSignal","params":["Modbus_0",0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ modbusSetOutputSignalPulse()

int arcs::common_interface::RegisterControl::modbusSetOutputSignalPulse ( const std::string &  signal_name,
uint16_t  value,
double  duration 
)

Set modbus signal output pulse (only supports coil output type)

Parameters
signal_nameA string identifying an output register signal that has been added in advance.
valueAn integer which must be a valid word (0-65535)
durationDuration of the signal, in seconds
Returns
Python interface prototype
modbusSetOutputSignalPulse(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int, arg2: double) -> int
Lua interface prototype
modbusSetOutputSignalPulse(signal_name: string, value: number, duration: number) -> nil
Lua example
modbusSetOutputSignalPulse("Modbus_0",1,0.5)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputSignalPulse","params":["Modbus_0",1,0.5],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ modbusSetOutputSignalWithTimeout()

int arcs::common_interface::RegisterControl::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.

Parameters
signal_nameA string identifying an output register signal that in advance has been added.
valueAn integer which must be a valid word (0-65535)
timeoutseconds
Returns
Python interface prototype
modbusSetOutputSignalWithTimeout(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int, arg2: timeout) -> int
Lua interface prototype
modbusSetOutputSignalWithTimeout(signal_name: string, value: number, timeout: number) -> nil
Lua example
modbusSetOutputSignalWithTimeout("Modbus_0",0,0.5)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusSetOutputSignalWithTimeout","params":["Modbus_0",0,0.5],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ modbusSetSignalUpdateFrequency()

int arcs::common_interface::RegisterControl::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 write the signal value.

Parameters
signal_nameA string identifying an output digital signal that in advance has been added.
update_frequencyAn integer in the range 0-125 specifying the update frequency in Hz.
Returns
Python interface prototype
modbusSetSignalUpdateFrequency(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int) -> int
Lua interface prototype
modbusSetSignalUpdateFrequency(signal_name: string, update_frequency: number) -> nil
Lua example
modbusSetSignalUpdateFrequency("Modbus_0",1)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.modbusSetSignalUpdateFrequency","params":["Modbus_0",1],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setBool()

int arcs::common_interface::RegisterControl::setBool ( const std::string &  key,
bool  value 
)

Set or update the variable value

Parameters
key
value
Returns
Returns 0 on success, otherwise error code
Python interface prototype
setBool(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: bool) -> int
Lua interface prototype
setBool(key: string, value: boolean) -> nil
Lua example
setBool("custom",true)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setBool","params":["custom",true],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setBoolInput()

int arcs::common_interface::RegisterControl::setBoolInput ( uint32_t  address,
bool  value 
)

Parameters
addressAddress of the register (0:127)
valueBoolean value to set (true or false)
Returns
Returns 0 on success, or an error code
Note
Only used when implementing RTDE/Modbus Slave/PLC server
Python interface prototype
setBoolInput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: bool) -> int
Lua interface prototype
setBoolInput(address: number, value: boolean) -> nil
Lua example
setBoolInput(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setBoolInput","params":[0,true],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setBoolOutput()

int arcs::common_interface::RegisterControl::setBoolOutput ( uint32_t  address,
bool  value 
)

Parameters
addressAddress of the register (0:127)
valueBoolean value to set (true or false)
Returns
Returns 0 on success, or an error code
Python interface prototype
setBoolOutput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: bool) -> int
Lua interface prototype
setBoolOutput(address: number, value: boolean) -> nil
Lua example
setBoolOutput(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setBoolOutput","params":[0,false],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setDouble()

int arcs::common_interface::RegisterControl::setDouble ( const std::string &  key,
double  value 
)

Set or update the variable value

Parameters
key
value
Returns
Python interface prototype
setDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) -> int
Lua interface prototype
setDouble(key: string, value: number) -> nil
Lua example
setDouble("custom",6.6)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setDouble","params":["custom",6.6],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setDoubleInput()

int arcs::common_interface::RegisterControl::setDoubleInput ( uint32_t  address,
double  value 
)

Parameters
address
value
Returns
Note
Only used when implementing RTDE/Modbus Slave/PLC server
Python interface prototype
setDoubleInput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float) -> int
Lua interface prototype
setDoubleInput(address: number, value: number) -> nil
Lua example
setDoubleInput(0, 3.3)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setDoubleInput","params":[0,6.6],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setDoubleOutput()

int arcs::common_interface::RegisterControl::setDoubleOutput ( uint32_t  address,
double  value 
)

Parameters
addressAddress of the register
valueDouble value to set
Returns
Returns 0 on success, or an error code
Python interface prototype
setDoubleOutput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float) -> int
Lua interface prototype
setDoubleOutput(address: number, value: number) -> nil
Lua example
setDoubleOutput(0,4.4)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setDoubleOutput","params":[0,4.4],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setFloat()

int arcs::common_interface::RegisterControl::setFloat ( const std::string &  key,
float  value 
)

Set or update the variable value

Parameters
key
value
Returns
Python interface prototype
setFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: float) -> int
Lua interface prototype
setFloat(key: string, value: number) -> nil
Lua example
setFloat("custom",4.4)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setFloat","params":["custom",4.4],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setFloatInput()

int arcs::common_interface::RegisterControl::setFloatInput ( uint32_t  address,
float  value 
)

Parameters
addressAddress of the register (0:47)
valueFloat value to set
Returns
Returns 0 on success, or an error code
Note
Only used when implementing RTDE/Modbus Slave/PLC server
Python interface prototype
setFloatInput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float) -> int
Lua interface prototype
setFloatInput(address: number, value: number) -> nil
Lua example
setFloatInput(0, 3.3)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setFloatInput","params":[0,3.3],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setFloatOutput()

int arcs::common_interface::RegisterControl::setFloatOutput ( uint32_t  address,
float  value 
)

Parameters
addressAddress of the register (0:47)
valueFloat value to set
Returns
Returns 0 on success, or an error code
Python interface prototype
setFloatOutput(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: float) -> int
Lua interface prototype
setFloatOutput(address: number, value: number) -> nil
Lua example
setFloatOutput(0,5.5)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setFloatOutput","params":[0,5.5],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setInt16Register()

int arcs::common_interface::RegisterControl::setInt16Register ( uint32_t  address,
int16_t  value 
)

Parameters
addressRegister address
valueValue to set
Returns
Returns 0 on success, otherwise error code
Python interface prototype
setInt16Register(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: int) -> int
Lua interface prototype
setInt16Register(address: number, value: number) -> nil
Lua example
setInt16Register(0,4.4)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setInt16Register","params":[0,0],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setInt32()

int arcs::common_interface::RegisterControl::setInt32 ( const std::string &  key,
int  value 
)

Set or update the variable value

Parameters
key
value
Returns
Python interface prototype
setInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int) -> int
Lua interface prototype
setInt32(key: string, value: number) -> nil
Lua example
setInt32("custom",6)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setInt32","params":["custom",6],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setInt32Input()

int arcs::common_interface::RegisterControl::setInt32Input ( uint32_t  address,
int  value 
)

Parameters
addressAddress of the register (0:47)
valueInteger value to set
Returns
Returns 0 on success, or an error code
Note
Only used when implementing RTDE/Modbus Slave/PLC server
Python interface prototype
setInt32Input(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: int) -> int
Lua interface prototype
setInt32Input(address: number, value: number) -> nil
Lua example
setInt32Input(0)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setInt32Input","params":[0,33],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setInt32Output()

int arcs::common_interface::RegisterControl::setInt32Output ( uint32_t  address,
int  value 
)

Parameters
addressAddress of the register (0:47)
valueInteger value to set
Returns
Returns 0 on success, or an error code
Python interface prototype
setInt32Output(self: pyaubo_sdk.RegisterControl, arg0: int, arg1: int) -> int
Lua interface prototype
setInt32Output(address: number, value: number) -> nil
Lua example
setInt32Output(0, 100)
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setInt32Output","params":[0,100],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setString()

int arcs::common_interface::RegisterControl::setString ( const std::string &  key,
const std::string &  value 
)

Set or update the variable value

Parameters
key
value
Returns
Returns 0 on success, otherwise error code
Python interface prototype
setString(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: str) -> int
Lua interface prototype
setString(key: string, value: string) -> nil
Lua example
setString("custom","test")
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setString","params":["custom","test"],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setVecChar()

int arcs::common_interface::RegisterControl::setVecChar ( const std::string &  key,
const std::vector< char > &  value 
)

Set or update the variable value

Parameters
key
value
Returns
Returns 0 on success, otherwise error code
Python interface prototype
setVecChar(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[str]) -> int
Lua interface prototype
setVecChar(key: string, value: table) -> nil
Lua example
setVecChar("custom",{0,1,0})
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setVecChar","params":["custom",[0,1,0]],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setVecDouble()

int arcs::common_interface::RegisterControl::setVecDouble ( const std::string &  key,
const std::vector< double > &  value 
)

Set or update the variable value

Parameters
key
value
Returns
Python interface prototype
setVecDouble(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[float]) -> int
Lua interface prototype
setVecDouble(key: string, value: table) -> nil
Lua example
setVecDouble("custom",{0.1,0.2,0.3})
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setVecDouble","params":["custom",[0.1,0.2,0.3]],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setVecFloat()

int arcs::common_interface::RegisterControl::setVecFloat ( const std::string &  key,
const std::vector< float > &  value 
)

Set or update the variable value

Parameters
key
value
Returns
Python interface prototype
setVecFloat(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[float]) -> int
Lua interface prototype
setVecFloat(key: string, value: table) -> nil
Lua example
setVecFloat("custom", {0.0,0.1,3.3})
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setVecFloat","params":["custom",[0.0,0.1,3.3]],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setVecInt32()

int arcs::common_interface::RegisterControl::setVecInt32 ( const std::string &  key,
const std::vector< int32_t > &  value 
)

Set or update the variable value

Parameters
key
value
Returns
Python interface prototype
setVecInt32(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: List[int]) -> int
Lua interface prototype
setVecInt32(key: string, value: table) -> nil
Lua example
setVecInt32("custom",{1,2,3,4})
JSON-RPC request example
{"jsonrpc":"2.0","method":"RegisterControl.setVecInt32","params":["custom",[1,2,3,4]],"id":1}
JSON-RPC response example
{"id":1,"jsonrpc":"2.0","result":0}

◆ setWatchDog()

int arcs::common_interface::RegisterControl::setWatchDog ( const std::string &  key,
double  timeout,
int  action 
)

Set the watchdog

After the watchdog is triggered, the controller will perform the corresponding action and automatically delete the watchdog.

Parameters
key
timeoutTimeout in seconds (s), minimum timeout is 0.1s
actionNONE (0): No action PAUSE(1): Pause runtime STOP (2): Stop runtime/stop robot motion PROTECTIVE_STOP (3): Trigger protective stop
Returns

◆ variableUpdated()

bool arcs::common_interface::RegisterControl::variableUpdated ( const std::string &  key,
uint64_t  since 
)

Whether the named variable has been updated

Parameters
key
since
Returns
Python interface prototype
variableUpdated(self: pyaubo_sdk.RegisterControl, arg0: str, arg1: int) -> bool
Lua interface prototype
variableUpdated(key: string, since: number) -> boolean
Lua example
Variable_Updated = variableUpdated("custom" , 0)

Member Data Documentation

◆ d_

void* arcs::common_interface::RegisterControl::d_
protected

Definition at line 3146 of file register_control.h.


The documentation for this class was generated from the following file: