mirror of
https://github.com/JoelBender/bacpypes
synced 2025-10-27 00:57:47 +08:00
make it easier to create foreign device network applications
This commit is contained in:
@@ -598,7 +598,7 @@ bacpypes_debugging(BIPForeignApplication)
|
||||
|
||||
class BIPNetworkApplication(NetworkServiceElement):
|
||||
|
||||
def __init__(self, localAddress, eID=None):
|
||||
def __init__(self, localAddress, bbmdAddress=None, bbmdTTL=None, eID=None):
|
||||
if _debug: BIPNetworkApplication._debug("__init__ %r eID=%r", localAddress, eID)
|
||||
NetworkServiceElement.__init__(self, eID)
|
||||
|
||||
@@ -616,7 +616,10 @@ class BIPNetworkApplication(NetworkServiceElement):
|
||||
|
||||
# create a generic BIP stack, bound to the Annex J server
|
||||
# on the UDP multiplexer
|
||||
self.bip = BIPSimple()
|
||||
if (not bbmdAddress) and (not bbmdTTL):
|
||||
self.bip = BIPSimple()
|
||||
else:
|
||||
self.bip = BIPForeign(bbmdAddress, bbmdTTL)
|
||||
self.annexj = AnnexJCodec()
|
||||
self.mux = UDPMultiplexer(self.localAddress)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user