Tree¶
-
class
bertlv.tree.
TlvNode
(tag: bertlv.tag.Tag, value: Optional[bytes] = None, parent: Optional[bertlv.tree.TlvNode] = None, children: Optional[Iterable[bertlv.tree.TlvNode]] = None)[source]¶ Bases:
anytree.node.node.Node
-
property
value
¶
-
property
length
¶
-
resolve
(path: str) → bertlv.tree.TlvNode[source]¶ Return the node at path.
-
property
-
class
bertlv.tree.
Tree
(children: Optional[Iterable[bertlv.tree.TlvNode]] = None)[source]¶ Bases:
bertlv.tree.TlvNode
-
class
bertlv.tree.
BuilderBase
[source]¶ Bases:
abc.ABC
-
abstract
close
() → bertlv.tree.Tree[source]¶ Flush the builder buffers, and return the tree.
-
abstract
end
(tag: bertlv.tag.Tag) → Any[source]¶ Close the current TLV node.
-
abstract
start
(tag: bertlv.tag.Tag) → Any[source]¶ Open a new TLV node with the given tag.
-
abstract
-
class
bertlv.tree.
TreeBuilder
(node_factory: Optional[Callable] = None)[source]¶ Bases:
bertlv.tree.BuilderBase
-
close
() → bertlv.tree.Tree[source]¶ Flush the builder buffers, and return the tree.
-
end
(tag: bertlv.tag.Tag) → bertlv.tree.TlvNode[source]¶ Close the current TLV node. Return the closed node.
-
start
(tag: bertlv.tag.Tag) → bertlv.tree.TlvNode[source]¶ Open a new TLV node with the given tag. Return the opened node.
-