def __init__(self, cid=None, sid=None): """An Annex-H BACnet Tunneling Router node.""" if _debug: BTR._debug("__init__ cid=%r sid=%r", cid, sid) Client.__init__(self, cid) Server.__init__(self, sid) # initialize a dicitonary of peers self.peers = {}
def __init__(self, sapID=None, cid=None, sid=None): """A BIP node.""" if _debug: BIPSimple._debug("__init__ sapID=%r cid=%r sid=%r", sapID, cid, sid) BIPSAP.__init__(self, sapID) Client.__init__(self, cid) Server.__init__(self, sid)
def __init__(self, mux, addr=None, userinfo=None, cid=None): if _debug: ProxyClientService._debug("__init__ %r %r userinfo=%r cid=%r", mux, addr, userinfo, cid) ServiceAdapter.__init__(self, mux) Client.__init__(self, cid) # save the address of the server and the userinfo self.address = addr self.userinfo = userinfo
def __init__(self, sap, net, cid=None): if _debug: NetworkAdapter._debug("__init__ %r (net=%r) cid=%r", sap, net, cid) Client.__init__(self, cid) self.adapterSAP = sap self.adapterNet = net # add this to the list of adapters for the network sap.adapters.append(self)
def __init__(self, fn, cid=None, sid=None): if _debug: StreamToPacket._debug("__init__ %r cid=%r, sid=%r", fn, cid, sid) Client.__init__(self, cid) Server.__init__(self, sid) # save the packet function self.packetFn = fn # start with an empty set of buffers self.upstreamBuffer = {} self.downstreamBuffer = {}
def __init__(self, addr, sapID=None, cid=None, sid=None): """A BBMD node.""" if _debug: BIPBBMD._debug("__init__ %r sapID=%r cid=%r sid=%r", addr, sapID, cid, sid) BIPSAP.__init__(self, sapID) Client.__init__(self, cid) Server.__init__(self, sid) RecurringTask.__init__(self, 1000.0) self.bbmdAddress = addr self.bbmdBDT = [] self.bbmdFDT = [] # install so process_task runs self.install_task()
def __init__(self): if _debug: TCPClientMultiplexer._debug("__init__") Client.__init__(self) # create and bind self.director = TCPClientDirector() bind(self, _StreamToPacket(), self.director) # create an application service element and bind self.ase = TCPMultiplexerASE(self) bind(self.ase, self.director) # keep a dictionary of connections self.connections = {} # no services available until they are created, they are # instances of ServiceAdapter self.deviceToDeviceService = None self.routerToRouterService = None self.proxyService = None self.laneService = None
def __init__(self, addr=None): if _debug: TCPServerMultiplexer._debug("__init__ %r", addr) Client.__init__(self) # check for some options if addr is None: self.address = Address() self.addrTuple = ('', 47808) else: # allow the address to be cast if isinstance(addr, Address): self.address = addr else: self.address = Address(addr) # extract the tuple for binding self.addrTuple = self.address.addrTuple if _debug: TCPServerMultiplexer._debug(" - address: %r", self.address) TCPServerMultiplexer._debug(" - addrTuple: %r", self.addrTuple) # create and bind self.director = TCPServerDirector(self.addrTuple) bind(self, _StreamToPacket(), self.director) # create an application service element and bind self.ase = TCPMultiplexerASE(self) bind(self.ase, self.director) # keep a dictionary of connections self.connections = {} # no services available until they are created, they are # instances of ServiceAdapter self.deviceToDeviceService = None self.routerToRouterService = None self.proxyService = None self.laneService = None
def __init__(self, addr=None, ttl=None, sapID=None, cid=None, sid=None): """A BIP node.""" if _debug: BIPForeign._debug("__init__ addr=%r ttl=%r sapID=%r cid=%r sid=%r", addr, ttl, sapID, cid, sid) BIPSAP.__init__(self, sapID) Client.__init__(self, cid) Server.__init__(self, sid) OneShotTask.__init__(self) # -2=unregistered, -1=not attempted or no ack, 0=OK, >0 error self.registrationStatus = -1 # clear the BBMD address and time-to-live self.bbmdAddress = None self.bbmdTimeToLive = None # registration provided if addr: # a little error checking if ttl is None: raise RuntimeError, "BBMD address and time-to-live must both be specified" self.register(addr, ttl)
def __init__(self, mux): Client.__init__(self) self.multiplexer = mux
def __init__(self, cid=None, sid=None): if _debug: AnnexJCodec._debug("__init__ cid=%r sid=%r", cid, sid) Client.__init__(self, cid) Server.__init__(self, sid)
def __init__(self, cid=None): ConsoleClient._debug("__init__ cid=%r", cid) asyncore.file_dispatcher.__init__(self, sys.stdin) Client.__init__(self, cid)