예제 #1
0
 def __init__(self,
              context,
              framer=None,
              identity=None,
              address=None,
              handler=None,
              **kwargs):
     self.allow_reuse_address = True
     ModbusTcpServer.__init__(self, context, framer, identity, address,
                              handler, **kwargs)
예제 #2
0
    def __init__(self, *args, **kwds):
        if kwds.get('ignore_missing_slaves'):
            assert list( map( int, pymodbus_version.split( '.' ))) >= [1,3,0], \
                "The pymodbus version %s installed lacks ignore_missing_slaves keyword; requires 1.3.0 or better" % (
                    pymodbus_version )
        if kwds.get('handler'):
            assert list( map( int, pymodbus_version.split( '.' ))) >= [1,3,0], \
                "The pymodbus version %s installed lacks request handler keyword; requires 1.3.0 or better" % (
                    pymodbus_version )

        # NOT a new-style class (due to SocketServer.ThreadingTCPServer); no super(...)
        ModbusTcpServer.__init__(self, *args, **kwds)
예제 #3
0
 def __init__( self, *args, **kwds ):
     if kwds.get( 'ignore_missing_slaves' ):
         assert list( map( int, pymodbus_version.split( '.' ))) >= [1,3,0], \
             "The pymodbus version %s installed lacks ignore_missing_slaves keyword; requires 1.3.0 or better" % (
                 pymodbus_version )
     if kwds.get( 'handler' ):
         assert list( map( int, pymodbus_version.split( '.' ))) >= [1,3,0], \
             "The pymodbus version %s installed lacks request handler keyword; requires 1.3.0 or better" % (
                 pymodbus_version )
         
     # NOT a new-style class (due to SocketServer.ThreadingTCPServer); no super(...)
     ModbusTcpServer.__init__( self, *args, **kwds )