Message Reader

A class for reading message data from a DataFile.

class bosdyn.bddf.message_reader.MessageReader(data_reader, require_protobuf=False)[source]

Bases: object

A class for reading message 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.

property channel_name_to_series_decriptor

Return a mapping of {chanel name -> series descriptor} for message series.

series_index(channel_name, message_type=None)[source]

Return series index (int) to access SeriesDescriptors and messages.

Parameters
  • channel_name – name of the channel of messages.

  • message_type – specify message type, if channel may have multiple kinds of messages (optional)

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_blob(series_index, index_in_series)[source]

Return binary data from message stored in the file.

Parameters
  • series_index – index (int) from the series_index() call

  • index_in_series – the index of the message within the series

Returns: DataTypeDescriptor for channel, timestamp_nsec (int), binary data