VRS
A file format for sensor data.
Loading...
Searching...
No Matches
Classes | Functions
vrs::FileDetailsCache Namespace Reference

Helper methods to read & write file details in a cache file. More...

Classes

struct  DiskRecordInfo
 Helper class to store record information on disk. More...
 
struct  DiskStreamId
 Helper class to store stream id on disk. More...
 

Functions

int write (const string &cacheFile, const set< StreamId > &streamIds, const map< string, string > &fileTags, const map< StreamId, StreamTags > &streamTags, const vector< IndexRecord::RecordInfo > &recordIndex, bool fileHasIndex)
 
int read (const string &cacheFile, set< StreamId > &outStreamIds, map< string, string > &outFileTags, map< StreamId, StreamTags > &outStreamTags, vector< IndexRecord::RecordInfo > &outRecordIndex, bool &outFileHasIndex)
 

Detailed Description

Helper methods to read & write file details in a cache file.

Function Documentation

◆ read()

int vrs::FileDetailsCache::read ( const string &  cacheFile,
set< StreamId > &  outStreamIds,
map< string, string > &  outFileTags,
map< StreamId, StreamTags > &  outStreamTags,
vector< IndexRecord::RecordInfo > &  outRecordIndex,
bool &  outFileHasIndex 
)

Read a VRS details file cache from a disk location.

Parameters
cacheFilepath to the cache file to read.
outStreamIdsstream Ids read.
outFileTagsfile tags read.
outStreamTagsstream tags read.
outRecordIndexVRS file index read.
outFileHasIndexdoes the original VRS file have a proper index.
Returns
A status code, 0 for success.

◆ write()

int vrs::FileDetailsCache::write ( const string &  cacheFile,
const set< StreamId > &  streamIds,
const map< string, string > &  fileTags,
const map< StreamId, StreamTags > &  streamTags,
const vector< IndexRecord::RecordInfo > &  recordIndex,
bool  fileHasIndex 
)

Create a VRS details file cache at a disk location, in one synchronous operation.

Parameters
cacheFilepath to the cache file to write.
streamIdsstream IDs to save.
fileTagsfile tags to save.
streamTagsstream tags to save.
recordIndexVRS file index to save.
fileHasIndexdoes the original VRS file have a proper index.
Returns
A status code, 0 for success.