1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-09-28 22:15:23 +08:00
This commit is contained in:
Joel Bender 2017-12-22 10:04:16 -05:00
commit 26569eb2c6
5 changed files with 15 additions and 6 deletions

View File

@ -5,7 +5,6 @@ objectIdentifier: 599
maxApduLengthAccepted: 1024
segmentationSupported: segmentedBoth
vendorIdentifier: 15
foreignPort: 0
foreignBBMD: 128.253.109.254
foreignTTL: 30

View File

@ -542,7 +542,7 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents):
self.bbmdTimeToLive = ttl
# install this task to run when it gets a chance
self.install_task(delta=0)
self.install_task(when=0)
def unregister(self):
"""Drop the registration with a BBMD."""

View File

@ -538,7 +538,7 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents):
self.bbmdTimeToLive = ttl
# install this task to run when it gets a chance
self.install_task(delta=0)
self.install_task(when=0)
def unregister(self):
"""Drop the registration with a BBMD."""

View File

@ -537,7 +537,7 @@ class BIPForeign(BIPSAP, Client, Server, OneShotTask, DebugContents):
self.bbmdTimeToLive = ttl
# install this task to run when it gets a chance
self.install_task(delta=0)
self.install_task(when=0)
def unregister(self):
"""Drop the registration with a BBMD."""

View File

@ -4,6 +4,16 @@
This application presents a 'console' prompt to the user asking for Who-Is and I-Am
commands which create the related APDUs, then lines up the coorresponding I-Am
for incoming traffic and prints out the contents.
In addition to the usual INI parameters that are common to BACpypes applications,
this application references two additional parameters:
foreignBBMD: the BACpypes IP Address of the BBMD to register
foreignTTL: the time-to-live to keep the registration alive
The BBMDForeign class will send the BVLL registration request after the core
starts up and maintain it. If the device does not get an 'ack' then it will
not send requests, even to devices that it would be able to talk otherwise.
"""
import sys
@ -115,7 +125,7 @@ class WhoIsIAmConsoleCmd(ConsoleCmd):
# make an IOCB
iocb = IOCB(request)
if _debug: WriteSomethingConsoleCmd._debug(" - iocb: %r", iocb)
if _debug: WhoIsIAmConsoleCmd._debug(" - iocb: %r", iocb)
# give it to the application
this_application.request_io(iocb)
@ -142,7 +152,7 @@ class WhoIsIAmConsoleCmd(ConsoleCmd):
# make an IOCB
iocb = IOCB(request)
if _debug: WriteSomethingConsoleCmd._debug(" - iocb: %r", iocb)
if _debug: WhoIsIAmConsoleCmd._debug(" - iocb: %r", iocb)
# give it to the application
this_application.request_io(iocb)