Skip to content

Commit 880ab5e

Browse files
committed
zdo: add some debug information
Signed-off-by: Tatiana Leon <Tatiana.Leon@digi.com>
1 parent 701b52d commit 880ab5e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

digi/xbee/models/zdo.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,8 @@ def _parse_data(self, data):
846846
route = self.__parse_route(
847847
data[byte_index:byte_index + self.ROUTE_BYTES_LEN])
848848
if route:
849+
self._logger.debug("Route of %s: %s - %s -> %s", self._xbee,
850+
route.destination, route.next_hop, route.status)
849851
self.__routes.append(route)
850852
if self.__cb:
851853
self.__cb(self._xbee, route)
@@ -1236,6 +1238,9 @@ def _parse_data(self, data):
12361238
# Do not add the node with Zigbee coordinator address "0000000000000000"
12371239
# The coordinator is already received with its real 64-bit address
12381240
if neighbor and neighbor.node.get_64bit_addr() != XBee64BitAddress.COORDINATOR_ADDRESS:
1241+
self._logger.debug("Neighbor of '%s': %s (relation: %s, depth: %s, lqi: %s)",
1242+
self._xbee, neighbor.node, neighbor.relationship.name,
1243+
neighbor.depth, neighbor.lq)
12391244
self.__neighbors.append(neighbor)
12401245
if self.__cb:
12411246
self.__cb(self._xbee, neighbor)
@@ -1723,6 +1728,8 @@ def __parse_data(self, data):
17231728

17241729
neighbor = Neighbor(n_xb, NeighborRelationship.SIBLING, -1, rssi)
17251730
self.__neighbors.append(neighbor)
1731+
self._logger.debug("Neighbor of '%s': %s (relation: %s, rssi: -%s)", self._xbee,
1732+
neighbor.node, neighbor.relationship.name, neighbor.lq)
17261733

17271734
if self.__cb:
17281735
self.__cb(self.__xbee, neighbor)

0 commit comments

Comments
 (0)