BdsApi  2.0.11
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
Bds::DataFileLog Class Reference

#include <BdsDataFileLog.h>

Inheritance diagram for Bds::DataFileLog:
Bds::DataFile

Public Member Functions

 DataFileLog ()
 
BError open (BString fileName, BString mode)
 Open the file for read or write. More...
 
DataOrder getDataOrder ()
 Get the expected order of writing data, by sample or by channel. More...
 
int getFeatures ()
 Get bitmask of supported features. More...
 
BError getInfo (DataInfo &dataInfo, DataFileOptions options, BList< DataError > &errors)
 Get info on data. More...
 
BError readData (BUInt32 channel, BUInt segment, BUInt32 blockNumber, DataBlock &data)
 Read a block. More...
 
BError setFormat (BString format)
 Set the sub-format. More...
 
BError setInfo (const DataInfo &dataInfo, const ChannelInfos &channelInfos, WriteOptionsList options=WriteOptionSensorData)
 Set information on data for write. More...
 
BError start (BUInt channel, BUInt segment)
 Start next segment of data. More...
 
BError writeData (const DataBlock &data)
 Write a block of data. More...
 
BError end ()
 End segment. More...
 
- Public Member Functions inherited from Bds::DataFile
 DataFile ()
 
virtual ~DataFile ()
 
virtual void init ()
 Initialise. More...
 
virtual BError close ()
 Close the file. More...
 
virtual BString getFileName ()
 Return the file name. More...
 
virtual BError flush ()
 Flush data to disk. More...
 
virtual BError fileNameProcess ()
 Parse the file name for a date/time. More...
 
virtual BError getFormat (BString &format)
 Get sub-format. More...
 
virtual BError seekBlock (BUInt32 channel, BUInt segment, BTimeStamp time, BUInt32 &blockNumber, BUInt64 &sampleNumber, DataBlock &data)
 Find requested block on given channel given a time. More...
 
virtual BError getMetaData (ChannelInfos &channelInfos)
 Return all known MetaData in the file. More...
 
void dataErrorFixup (DataInfo &dataInfo, BList< DataError > &errors)
 Fixup data errors, mainly start/end times to be within data. More...
 
BInt64 timeCompare (BTimeStamp t1, BTimeStamp t2, BUInt diff)
 Compare timestamps with a margin. More...
 
int duplicateCheck (DataBlock &data1, DataBlock &data2, BUInt channel=0)
 Check if blocks are duplicates. More...
 
BUInt64 getFilePosition ()
 

Static Public Member Functions

static DataFormat getFormats ()
 
- Static Public Member Functions inherited from Bds::DataFile
static DataFormat getFormats ()
 Get list of supported formats. More...
 

Private Member Functions

BError readBlock (BUInt32 channel, BUInt64 pos, DataBlock &data, BUInt64 &posNext)
 

Private Attributes

DataInfo odataInfo
 
ChannelInfos ochannelInfos
 
BString oformat
 
BArray< DataBlockPosoblockPositions
 

Additional Inherited Members

- Public Types inherited from Bds::DataFile
enum  DataOrder { DataOrderUnknown, DataOrderAll, DataOrderSample, DataOrderChannel }
 
enum  Features { FeatureNone = 0x00, FeatureCanWrite = 0x01, FeatureCanRead = 0x02 }
 
enum  WriteOptionsList { WriteOptionNone = 0x00, WriteOptionSensorData = 0x01, WriteOptionNoMetadata = 0x02 }
 
enum  ReadOptionsList {
  ReadOptionNone = 0x00, ReadOptionValidate = 0x01, ReadOptionFileNameProcess = 0x02, ReadOptionValidateCorruptions = 0x04,
  ReadOptionReorder = 0x08, ReadOptionDeleteDuplicates = 0x10, ReadOptionInfoExtra = 0x20, ReadOptionIgnoreSamplerate = 0x40,
  ReadOptionPrintBlocks = 0x80
}
 
- Protected Attributes inherited from Bds::DataFile
BString ofileName
 
BString omode
 
BTimeStamp ofileNameTime
 
BFile ofile
 
BString oformat
 

Constructor & Destructor Documentation

◆ DataFileLog()

Bds::DataFileLog::DataFileLog ( )

Member Function Documentation

◆ end()

BError Bds::DataFileLog::end ( )
virtual

End segment.

Reimplemented from Bds::DataFile.

◆ getDataOrder()

DataFile::DataOrder Bds::DataFileLog::getDataOrder ( )
virtual

Get the expected order of writing data, by sample or by channel.

Reimplemented from Bds::DataFile.

◆ getFeatures()

int Bds::DataFileLog::getFeatures ( )
virtual

Get bitmask of supported features.

Reimplemented from Bds::DataFile.

◆ getFormats()

DataFormat Bds::DataFileLog::getFormats ( )
static

◆ getInfo()

BError Bds::DataFileLog::getInfo ( DataInfo dataInfo,
DataFileOptions  options,
BList< DataError > &  errors 
)
virtual

Get info on data.

Reimplemented from Bds::DataFile.

◆ open()

BError Bds::DataFileLog::open ( BString  fileName,
BString  mode 
)
virtual

Open the file for read or write.

Reimplemented from Bds::DataFile.

◆ readBlock()

BError Bds::DataFileLog::readBlock ( BUInt32  channel,
BUInt64  pos,
DataBlock data,
BUInt64 &  posNext 
)
private

◆ readData()

BError Bds::DataFileLog::readData ( BUInt32  channel,
BUInt  segment,
BUInt32  blockNumber,
DataBlock dataBlock 
)
virtual

Read a block.

Reimplemented from Bds::DataFile.

◆ setFormat()

BError Bds::DataFileLog::setFormat ( BString  format)
virtual

Set the sub-format.

Reimplemented from Bds::DataFile.

◆ setInfo()

BError Bds::DataFileLog::setInfo ( const DataInfo dataInfo,
const ChannelInfos channelInfos,
WriteOptionsList  options = WriteOptionSensorData 
)
virtual

Set information on data for write.

Reimplemented from Bds::DataFile.

◆ start()

BError Bds::DataFileLog::start ( BUInt  channel,
BUInt  segment 
)
virtual

Start next segment of data.

Reimplemented from Bds::DataFile.

◆ writeData()

BError Bds::DataFileLog::writeData ( const DataBlock data)
virtual

Write a block of data.

Reimplemented from Bds::DataFile.

Member Data Documentation

◆ oblockPositions

BArray<DataBlockPos> Bds::DataFileLog::oblockPositions
private

◆ ochannelInfos

ChannelInfos Bds::DataFileLog::ochannelInfos
private

◆ odataInfo

DataInfo Bds::DataFileLog::odataInfo
private

◆ oformat

BString Bds::DataFileLog::oformat
private

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