Public Member Functions | Public Attributes | Private Member Functions
modbus.modbus_wrapper_server.ModbusWrapperServer Class Reference

List of all members.

Public Member Functions

def __init__
def setDigitalInput
def startServer
def stopServer
def waitForCoilOutput

Public Attributes

 context
 identity
 post
 server
 store

Private Member Functions

def __startServer

Detailed Description

Definition at line 115 of file modbus_wrapper_server.py.


Constructor & Destructor Documentation

def modbus.modbus_wrapper_server.ModbusWrapperServer.__init__ (   self,
  port = 1234,
  sub_topic = "modbus_server/write_to_registers",
  pub_topic = "modbus_server/read_from_registers" 
)
    Creates a Modbus TCP Server object
    .. note:: The default port for modbus is 502. This modbus server uses port 1234 by default, otherwise superuser rights are required.
    
    .. note:: Use "startServer" to start the listener.
    
    :param port: Port for the modbus TCP server
    :type port: int
    :param sub_topic: ROS topic name for the subscriber that updates the modbus registers
    :type sub_topic: string
    :param pub_topic: ROS topic name for the publisher that publishes a message, once there is something written to the writeable modbus registers
    :type pub_topic: string
    

Definition at line 116 of file modbus_wrapper_server.py.


Member Function Documentation

Definition at line 159 of file modbus_wrapper_server.py.

def modbus.modbus_wrapper_server.ModbusWrapperServer.setDigitalInput (   self,
  address,
  values 
)
    Writes to the digital input of the modbus server
    :param address: Starting address of the values to write
    :type: int
    :param values: List of values to write
    :type list/boolean/int

Definition at line 188 of file modbus_wrapper_server.py.

    Non blocking call to start the server

Definition at line 152 of file modbus_wrapper_server.py.

    Closes the server

Definition at line 162 of file modbus_wrapper_server.py.

def modbus.modbus_wrapper_server.ModbusWrapperServer.waitForCoilOutput (   self,
  address,
  timeout = 2 
)
    Blocks for the timeout in seconds (or forever) until the specified address becomes true. Adapt this to your needs
    :param address: Address of the register that wanted to be read.
    :type address: int
    :param timeout: The time in seconds until the function should return latest.
    :type: float/int

Definition at line 169 of file modbus_wrapper_server.py.


Member Data Documentation

Definition at line 129 of file modbus_wrapper_server.py.

Definition at line 129 of file modbus_wrapper_server.py.

Definition at line 129 of file modbus_wrapper_server.py.

Definition at line 129 of file modbus_wrapper_server.py.

Definition at line 129 of file modbus_wrapper_server.py.


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


modbus
Author(s): Sven Bock
autogenerated on Thu Jun 6 2019 17:39:35