From a3c9f1eb4685272dad2ac4d08fedc39e871cac7a Mon Sep 17 00:00:00 2001 From: Joel Bender Date: Wed, 13 Jun 2018 09:06:09 -0400 Subject: [PATCH] print out the incoming routing message content --- samples/WhoIsRouter.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/WhoIsRouter.py b/samples/WhoIsRouter.py index 66f8a472..9bd482d4 100755 --- a/samples/WhoIsRouter.py +++ b/samples/WhoIsRouter.py @@ -12,7 +12,7 @@ from bacpypes.core import run, enable_sleeping from bacpypes.pdu import Address -from bacpypes.npdu import InitializeRoutingTable, WhoIsRouterToNetwork +from bacpypes.npdu import InitializeRoutingTable, WhoIsRouterToNetwork, IAmRouterToNetwork from bacpypes.app import BIPNetworkApplication @@ -41,6 +41,10 @@ def request(self, adapter, npdu): def indication(self, adapter, npdu): if _debug: WhoIsRouterApplication._debug("indication %r %r", adapter, npdu) + + if isinstance(npdu, IAmRouterToNetwork): + print("{} -> {}, {}".format(npdu.pduSource, npdu.pduDestination, npdu.iartnNetworkList)) + BIPNetworkApplication.indication(self, adapter, npdu) def response(self, adapter, npdu):