ostinato.protocols.hexdump_pb2 module
To add and configure Hexdump in a stream, add a protocol to the stream, set the protocol id to ost_pb.Protocol.kHexdumpFieldNumber
and access the Hexdump object from the Protocol object's Extensions
dictionary using the key hexdump_pb2.hexDump
from ostinato.protocols import hexdump_pb2
...
# stream is an object of type ost_pb.Stream
proto = stream.protocol.add()
proto.protocol_id.id = ost_pb.Protocol.kHexdumpFieldNumber
my_hexDump = proto.Extensions[hexdump_pb2.hexDump]
You can then set Hexdump attributes using my_hexDump.<attribute>
HexDump class
Class attributes
content
HexDump.content : str
Optional. If not set, defaults to "".
pad_until_end
HexDump.pad_until_end : boolean
Optional. If not set, defaults to true.