AUBO SDK  0.26.0
arcs::common_interface::RegisterControl Class Reference

#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 getInt16RegisterBit (uint32_t address, uint8_t bit_offset)
 Get the status of a specific bit in an Int16 register
int setInt16RegisterBit (uint32_t address, uint8_t bit_offset, bool value)
 Set the status of a specific bit in an Int16 register
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 modbusSetOutputSignal1 (const std::string &signal_name, const std::vector< uint16_t > &values)
 Sets multiple consecutive output register signals starting from the given name to the given values.
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

Definition at line 64 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

◆ 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}

Member Data Documentation

◆ d_

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

Definition at line 3369 of file register_control.h.


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