Protobuf Reader¶
A class for reading Protobuf data from a DataFile.
-
class
bosdyn.bddf.protobuf_reader.
ProtobufReader
(data_reader)[source]¶ Bases:
object
A class for reading Protobuf data from a DataFile.
Methods raise ParseError if there is a problem with the format of the file.
-
property
data_reader
¶ Return underlying DataReader this object is using.
-
series_index
(channel_name)[source]¶ Return the series index (int) by which SeriesDescriptors and messages can be accessed.
- Parameters
channel_name – name of the channel of messages.
-
series_index_to_descriptor
(series_index)[source]¶ Given a series index, return the associated SeriesDescriptor
- Parameters
series_index – index (int) from the series_index() call
-
get_message
(series_index, protobuf_type, index_in_series)[source]¶ Return a deserialized protobuf from bytes stored in the file.
- Parameters
series_index – index (int) from the series_index() call
protobuf_type – class of the protobuf we want to deserialize
index_in_series – the index of the message within the series
Returns: DataTypeDescriptor for channel, timestamp_nsec (int), deserialized protobuf object
-
property