mirror of
https://github.com/JoelBender/bacpypes
synced 2025-10-27 00:57:47 +08:00
a little more debugging, starting on the next layer
This commit is contained in:
@@ -681,6 +681,10 @@ class APCISequence(APCI, Sequence):
|
||||
# pass the taglist to the Sequence for additional decoding
|
||||
Sequence.decode(self, self._tag_list)
|
||||
|
||||
# trailing unmatched tags
|
||||
if self._tag_list:
|
||||
if _debug: APCISequence._debug(" - trailing unmatched tags")
|
||||
|
||||
def apdu_contents(self, use_dict=None, as_class=dict):
|
||||
"""Return the contents of an object as a dict."""
|
||||
if _debug: APCISequence._debug("apdu_contents use_dict=%r as_class=%r", use_dict, as_class)
|
||||
|
||||
@@ -28,6 +28,17 @@ class Element:
|
||||
self.context = context
|
||||
self.optional = optional
|
||||
|
||||
def __repr__(self):
|
||||
desc = "%s(%s" % (self.__class__.__name__, self.name)
|
||||
desc += " " + self.klass.__name__
|
||||
if self.context is not None:
|
||||
desc += ", context=%r" % (self.context,)
|
||||
if self.optional:
|
||||
desc += ", optional"
|
||||
desc += ")"
|
||||
|
||||
return '<' + desc + ' instance at 0x%08x' % (id(self),) + '>'
|
||||
|
||||
#
|
||||
# Sequence
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user