VRS
A file format for sensor data.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vrs::NewChunkHandler Class Referenceabstract

Listener to be notified when a new file chunk is finalized. More...

#include <NewChunkHandler.h>

Public Member Functions

virtual void newChunk (const string &path, size_t index, bool isLastChunk)=0
 

Detailed Description

Listener to be notified when a new file chunk is finalized.

Definition of a class of objects that can be attached to a RecordFileWriter, to monitor the creation of file chunks, to process them in some way (maybe to upload them in the cloud?).

Member Function Documentation

◆ newChunk()

virtual void vrs::NewChunkHandler::newChunk ( const string &  path,
size_t  index,
bool  isLastChunk 
)
pure virtual

Callback function to be notified when new file chunks are created.

Parameters
indexthe index of the chunk in the file, 0 being the first chunk.
pathlocal file path to the chunk.
isLastChunkflag telling if the chunk is the file's last (last notification). Note that chunk notifications may come out of sequence, so do not rely on any ordering. However, when you get this notification, the chunk is complete and will never change, and you may even delete the chunk (maybe when upload streaming with limited disk space?). When isLastChunk set to true, the file is complete, and a notification for every of the file's chunks has been sent. These callbacks can happen from any thread context.

The documentation for this class was generated from the following file: