def __init__(self): if _debug: MiddleMan._debug("__init__") Client.__init__(self) Server.__init__(self) # not connected self.connected = False
def __init__(self): if _debug: TrappedClient._debug("__init__") Client.__init__(self) # clear out some references self.request_sent = None self.confirmation_received = None
def __init__(self, host='', port=502, **kwargs): if _debug: ModbusServer._debug("__init__ host=%r port=%r %r", host, port, kwargs) Client.__init__(self) Server.__init__(self) # create and bind self.serverDirector = TCPServerDirector((host, port), **kwargs) bind(self, StreamToPacket(stream_to_packet), self.serverDirector)
def __init__(self, sapID=None, cid=None, sid=None): """A MSTP node.""" if _debug: MSTPSimple._debug("__init__ sapID=%r cid=%r sid=%r", sapID, cid, sid) MSTPSAP.__init__(self, sapID) Client.__init__(self, cid) Server.__init__(self, sid)
def request(self, pdu): if _debug: TrappedClient._debug("request %r", pdu) # a reference for checking self.request_sent = pdu # continue with regular processing Client.request(self, pdu)
def __init__(self, **kwargs): """Initialize a MODBUS client.""" if _debug: ModbusClient._debug("__init__ %r", kwargs) Client.__init__(self) Server.__init__(self) # create and bind the client side self.director = TCPClientDirector(**kwargs) bind(self, StreamToPacket(stream_to_packet), self.director)
def __init__(self, **terminals): if _debug: Switch._debug("__init__ %r", terminals) Client.__init__(self) Server.__init__(self) # wrap the terminals self.terminals = {k:Switch.TerminalWrapper(self, v) for k, v in terminals.items()} self.current_terminal = None
def __init__(self, **kwargs): """Initialize a MODBUS client.""" if _debug: ModbusClient._debug("__init__ %r", kwargs) Client.__init__(self) Server.__init__(self) # create and bind the client side self.clientDirector = TCPClientDirector(**kwargs) bind(self, StreamToPacket(stream_to_packet), self.clientDirector)
def __init__(self, unitNumber=1): if _debug: SimpleServer._debug("__init__") Client.__init__(self) # save the unit number self.unitNumber = unitNumber # create some coils and registers self.coils = [False] * 10 self.registers = [0] * 10
def __init__(self, port=502, sapID=None): if _debug: ModbusServiceAccessPoint._debug("__init__ port=%r sapID=%r", port, sapID) Client.__init__(self) Server.__init__(self) ServiceAccessPoint.__init__(self, sapID) # create and bind the client side self.clientDirector = TCPClientDirector() bind(self, StreamToPacket(stream_to_packet), self.clientDirector) # create and bind the server side self.serverDirector = TCPServerDirector(port) bind(self.serverDirector, StreamToPacket(stream_to_packet), self)
def __init__(self, addr, network, cid=None, sid=None): if _debug: FauxMux._debug("__init__") Client.__init__(self, cid) Server.__init__(self, sid) # get the unicast and broadcast tuples self.unicast_tuple = addr.addrTuple self.broadcast_tuple = addr.addrBroadcastTuple # make an internal node and bind to it, this takes the place of # both the direct port and broadcast port of the real UDPMultiplexer self.node = IPNode(addr, network) bind(self, self.node)
def __init__(self, vlan): if _debug: SnifferNode._debug("__init__ %r", vlan) # save the name and give it a blank address self.name = "sniffer" self.address = Address() # continue with initialization Client.__init__(self) # create a promiscuous node, added to the network self.node = Node(self.address, vlan, promiscuous=True) if _debug: SnifferNode._debug(" - node: %r", self.node) # bind this to the node bind(self, self.node)
def __init__(self, name=''): if _debug: ClientStateMachine._debug("__init__") Client.__init__(self) StateMachine.__init__(self, name=name)
def __init__(self): Client.__init__(self) Server.__init__(self) ConsoleCmd.__init__(self)
def __init__(self): if _debug: NPDUCodec._debug("__init__") Client.__init__(self) Server.__init__(self)
def __init__(self): if _debug: ClientStateMachine._debug("__init__") Client.__init__(self) StateMachine.__init__(self)
def __init__(self, cid=None): if _debug: NullClient._debug("__init__ cid=%r", cid) Client.__init__(self, cid=cid)
def __init__(self, cid=None): Client.__init__(self, cid=cid)