meta_streaming_info.h
ChunkInfo
-
struct ChunkInfo
Class for keeping track of OSF chunks.
Flat Buffer Reference: fb/streaming/streaming_info.fbs :: ChunkInfo
Public Members
-
uint64_t offset
The offset in the flatbuffer where the chunk is located.
Flat Buffer Reference: fb/streaming/streaming_info.fbs :: ChunkInfo :: offset
-
uint64_t offset
StreamStats
-
struct StreamStats
Class for keeping track of OSF stream stats.
Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats
Public Functions
-
StreamStats() = default
Default constructor, sets everthing to 0.
-
StreamStats(uint32_t s_id, ts_t receive_ts, ts_t sensor_ts, uint32_t msg_size)
Construct a StreamStats with the specified values
- Parameters:
s_id – [in] Specify the stream_id to use.
receive_ts – [in] Set the start and end timestamps to the specified value and add it to the receive timestamps.
sensor_ts – [in] Add to the sensor timestamps.
msg_size – [in] Set the average message size to the specified value.
-
void update(ts_t receive_ts, ts_t sensor_ts, uint32_t msg_size)
Update values within the StreamStats
- Parameters:
receive_ts – [in] Add another receive timestamp and calculate the start and end values.
sensor_ts – [in] Add another sensor timestamp
msg_size – [in] Add another message size and calculate the average.
Public Members
-
uint32_t stream_id
The specific stream the chunk is associated with.
Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: stream_id
-
ts_t start_ts
The first timestamp in the stream.
Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: start_ts
-
ts_t end_ts
The last timestamp in the stream.
Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: end_ts
-
uint64_t message_count
The number of messages in the stream.
Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: message_count
-
uint32_t message_avg_size
The average size of the messages in the stream.
Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: message_avg_size
-
std::vector<uint64_t> receive_timestamps
The receive timestamps of each message in the stream.
Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: receive_timestamps
-
std::vector<uint64_t> sensor_timestamps
The sensor timestamps of each message in the stream.
Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamStats :: sensor_timestamps
-
StreamStats() = default
-
std::string ouster::osf::to_string(const StreamStats &stream_stats)
Get the string representation for a StreamStats object.
- Parameters:
stream_stats – [in] StreamStats object to be converted to string.
- Returns:
The string representation for a StreamStats object.
Streaming Info
-
class StreamingInfo : public ouster::osf::MetadataEntryHelper<StreamingInfo>
Metadata entry to store StreamingInfo, to support StreamingLayout (RFC 0018)
OSF type: ouster/v1/streaming/StreamingInfo
Flat Buffer Reference: fb/streaming/streaming_info.fbs :: StreamingInfo
Public Functions
-
StreamingInfo(const std::vector<std::pair<uint64_t, ChunkInfo>> &chunks_info, const std::vector<std::pair<uint32_t, StreamStats>> &stream_stats)
- Parameters:
chunks_info – [in] Vector containing pairs of stream_id/ChunkInfo to be used to generate a stream_id/ChunkInfo map.
stream_stats – [in] Vector containing pairs of stream_id/StreamStats to be used to generate a stream_id/StreamStats map.
-
StreamingInfo(const std::map<uint64_t, ChunkInfo> &chunks_info, const std::map<uint32_t, StreamStats> &stream_stats)
- Parameters:
chunks_info – [in] ///< Map containing stream_id/ChunkInfo data.
stream_stats – [in] ///< Map containing stream_id/StreamStats data.
-
std::map<uint64_t, ChunkInfo> &chunks_info()
Return the chunk_info map. stream_id/ChunkInfo data.
- Returns:
The chunk_info map. stream_id/ChunkInfo data.
-
std::map<uint32_t, StreamStats> &stream_stats()
Return the stream stat map. stream_id/StreamStats data.
- Returns:
The stream stat map. stream_id/StreamStats data.
-
virtual std::vector<uint8_t> buffer() const final override
Byte represantation of the internal derived metadata type, used as serialization function when saving to OSF file.
- Returns:
The byte vector representation of the metadata.
-
static std::unique_ptr<MetadataEntry> from_buffer(const std::vector<uint8_t> &buf)
Create a StreamingInfo object from a byte array.
- Todo:
Figure out why this wasnt just done as a constructor overload.
- Parameters:
buf – [in] The raw flatbuffer byte vector to initialize from.
- Returns:
The new StreamingInfo cast as a MetadataEntry
-
virtual std::string repr() const override
Get the string representation for the LidarSensor object.
- Returns:
The string representation for the LidarSensor object.
-
StreamingInfo(const std::vector<std::pair<uint64_t, ChunkInfo>> &chunks_info, const std::vector<std::pair<uint32_t, StreamStats>> &stream_stats)
-
template<>
struct MetadataTraits<StreamingInfo> - #include <meta_streaming_info.h>
Templated struct for returning the OSF type string.
Public Static Functions
-
static inline const std::string type()
Return the OSF type string.
- Returns:
The OSF type string “ouster/v1/streaming/StreamingInfo”.
-
static inline const std::string type()