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):