|
| Bag () |
|
| Bag (std::string const &filename, uint32_t mode=bagmode::Read) |
| Open a bag file. More...
|
|
void | close () |
| Close the bag file. More...
|
|
uint32_t | getChunkThreshold () const |
| Get the threshold for creating new chunks. More...
|
|
CompressionType | getCompression () const |
| Get the compression method to use for writing chunks. More...
|
|
std::tuple< std::string, uint64_t, uint64_t > | getCompressionInfo () const |
|
std::string | getFileName () const |
| Get the filename of the bag. More...
|
|
uint32_t | getMajorVersion () const |
| Get the major-version of the open bag file. More...
|
|
uint32_t | getMinorVersion () const |
| Get the minor-version of the open bag file. More...
|
|
BagMode | getMode () const |
| Get the mode the bag is in. More...
|
|
uint64_t | getSize () const |
| Get the current size of the bag file (a lower bound) More...
|
|
void | open (std::string const &filename, uint32_t mode=bagmode::Read) |
| Open a bag file. More...
|
|
void | setChunkThreshold (uint32_t chunk_threshold) |
| Set the threshold for creating new chunks. More...
|
|
void | setCompression (CompressionType compression) |
| Set the compression method to use for writing chunks. More...
|
|
template<class T > |
void | write (std::string const &topic, rs2rosinternal::MessageEvent< T > const &event) |
| Write a message into the bag file. More...
|
|
template<class T > |
void | write (std::string const &topic, rs2rosinternal::Time const &time, T const &msg, std::shared_ptr< rs2rosinternal::M_string > connection_header=std::shared_ptr< rs2rosinternal::M_string >()) |
| Write a message into the bag file. More...
|
|
template<class T > |
void | write (std::string const &topic, rs2rosinternal::Time const &time, std::shared_ptr< T const > const &msg, std::shared_ptr< rs2rosinternal::M_string > connection_header=std::shared_ptr< rs2rosinternal::M_string >()) |
| Write a message into the bag file. More...
|
|
template<class T > |
void | write (std::string const &topic, rs2rosinternal::Time const &time, std::shared_ptr< T > const &msg, std::shared_ptr< rs2rosinternal::M_string > connection_header=std::shared_ptr< rs2rosinternal::M_string >()) |
| Write a message into the bag file. More...
|
|
| ~Bag () |
|
|
void | appendConnectionRecordToBuffer (Buffer &buf, ConnectionInfo const *connection_info) |
|
void | appendDataLengthToBuffer (Buffer &buf, uint32_t data_len) |
|
void | appendHeaderToBuffer (Buffer &buf, rs2rosinternal::M_string const &fields) |
|
rs2rosinternal::M_string::const_iterator | checkField (rs2rosinternal::M_string const &fields, std::string const &field, unsigned int min_len, unsigned int max_len, bool required) const |
|
void | closeWrite () |
|
void | decompressBz2Chunk (ChunkHeader const &chunk_header) const |
|
void | decompressChunk (uint64_t chunk_pos) const |
|
void | decompressLz4Chunk (ChunkHeader const &chunk_header) const |
|
void | decompressRawChunk (ChunkHeader const &chunk_header) const |
|
template<class T > |
void | doWrite (std::string const &topic, rs2rosinternal::Time const &time, T const &msg, std::shared_ptr< rs2rosinternal::M_string > const &connection_header) |
|
uint32_t | getChunkOffset () const |
|
template<class T > |
std::shared_ptr< T > | instantiateBuffer (IndexEntry const &index_entry) const |
| deserializes the message held in record_buffer_ More...
|
|
bool | isOp (rs2rosinternal::M_string &fields, uint8_t reqOp) const |
|
void | openAppend (std::string const &filename) |
|
void | openRead (std::string const &filename) |
|
void | openWrite (std::string const &filename) |
|
void | read (char *b, std::streamsize n) const |
|
void | readChunkHeader (ChunkHeader &chunk_header) const |
|
void | readChunkInfoRecord () |
|
void | readConnectionIndexRecord200 () |
|
void | readConnectionRecord () |
|
bool | readDataLength (uint32_t &data_size) const |
|
template<typename T > |
bool | readField (rs2rosinternal::M_string const &fields, std::string const &field_name, bool required, T *data) const |
|
bool | readField (rs2rosinternal::M_string const &fields, std::string const &field_name, unsigned int min_len, unsigned int max_len, bool required, std::string &data) const |
|
bool | readField (rs2rosinternal::M_string const &fields, std::string const &field_name, bool required, std::string &data) const |
|
bool | readField (rs2rosinternal::M_string const &fields, std::string const &field_name, bool required, rs2rosinternal::Time &data) const |
|
void | readFileHeaderRecord () |
|
bool | readHeader (rs2rosinternal::Header &header) const |
|
void | readHeaderFromBuffer (Buffer &buffer, uint32_t offset, rs2rosinternal::Header &header, uint32_t &data_size, uint32_t &bytes_read) const |
|
rs2rosinternal::Header | readMessageDataHeader (IndexEntry const &index_entry) |
|
void | readMessageDataHeaderFromBuffer (Buffer &buffer, uint32_t offset, rs2rosinternal::Header &header, uint32_t &data_size, uint32_t &bytes_read) const |
|
template<typename Stream > |
void | readMessageDataIntoStream (IndexEntry const &index_entry, Stream &stream) const |
|
void | readMessageDataRecord102 (uint64_t offset, rs2rosinternal::Header &header) const |
|
uint32_t | readMessageDataSize (IndexEntry const &index_entry) const |
|
void | readMessageDefinitionRecord102 () |
|
void | readTopicIndexRecord102 () |
|
void | readVersion () |
|
void | seek (uint64_t pos, int origin=std::ios_base::beg) const |
|
void | startReadingVersion102 () |
|
void | startReadingVersion200 () |
|
void | startWriting () |
|
void | startWritingChunk (rs2rosinternal::Time time) |
|
void | stopWriting () |
|
void | stopWritingChunk () |
|
template<typename T > |
std::string | toHeaderString (T const *field) const |
|
std::string | toHeaderString (rs2rosinternal::Time const *field) const |
|
void | write (char const *s, std::streamsize n) |
|
void | write (std::string const &s) |
|
void | writeChunkHeader (CompressionType compression, uint32_t compressed_size, uint32_t uncompressed_size) |
|
void | writeChunkInfoRecords () |
|
void | writeConnectionRecord (ConnectionInfo const *connection_info) |
|
void | writeConnectionRecords () |
|
void | writeDataLength (uint32_t data_len) |
|
void | writeFileHeaderRecord () |
|
void | writeHeader (rs2rosinternal::M_string const &fields) |
|
void | writeIndexRecords () |
|
template<class T > |
void | writeMessageDataRecord (uint32_t conn_id, rs2rosinternal::Time const &time, T const &msg) |
|
void | writeVersion () |
|
Definition at line 84 of file bag.h.