Generator¶
-
class
bertlv.generator.
GeneratorBase
[source]¶ Bases:
abc.ABC
Base class for BER-TLV generators.
-
abstract
write
(node: bertlv.tree.TlvNode) → None[source]¶ Write the TLV node using the generator.
-
abstract
-
class
bertlv.generator.
BinaryGenerator
[source]¶ Bases:
bertlv.generator.GeneratorBase
Base class for BER-TLV generators.
-
write
(node: bertlv.tree.TlvNode) → None[source]¶ Write the TLV node using the generator.
-
-
class
bertlv.generator.
XmlGenerator
[source]¶ Bases:
bertlv.generator.GeneratorBase
-
write
(node: bertlv.tree.TlvNode) → None[source]¶ Write the TLV node using the generator.
-
-
bertlv.generator.
generate
(fp: BinaryIO, tree: bertlv.tree.Tree, generator: bertlv.generator.GeneratorBase) → None[source]¶ Generate the tree and write it to the file-like object fp.
-
bertlv.generator.
generate_bytes
(tree: bertlv.tree.Tree, generator: bertlv.generator.GeneratorBase) → bytes[source]¶ Generate the tree and return the data.