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

#include <BdsDataFileCd.h>

Inheritance diagram for Bds::DataFileCd:
Bds::DataFile

Public Member Functions

 DataFileCd ()
 
int getFeatures ()
 Get bitmask of supported features. More...
 
DataOrder getDataOrder ()
 Get the expected order of writing data, by sample or by channel. 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...
 
- Public Member Functions inherited from Bds::DataFile
 DataFile ()
 
virtual ~DataFile ()
 
virtual void init ()
 Initialise. More...
 
virtual BError open (BString fileName, BString mode)
 Open the file for read or write. More...
 
virtual BError close ()
 Close the file. More...
 
virtual BError setFormat (BString format)
 Set the sub-format. More...
 
virtual BString getFileName ()
 Return the file name. More...
 
virtual BError setInfo (const DataInfo &dataInfo, const ChannelInfos &channelInfos, WriteOptionsList options=WriteOptionNone)
 Set information on data for write. More...
 
virtual BError start (BUInt channel, BUInt segment)
 Start next segment of data. More...
 
virtual BError writeData (const DataBlock &data)
 Write a block of data. More...
 
virtual BError end ()
 End segment. 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 readPacket_1v0 (int validateNext)
 
BError readPacket_1v0_Scan (BUInt64 &pos)
 
BError readBlock_1v0 (BUInt32 channel, BUInt64 pos, DataBlock &data, int addInfo, int validateNext)
 
BError readPacket_1v1 (int validateNext)
 
BError readPacket_1v1_Scan (BUInt64 &pos)
 
BError readBlock_1v1 (BUInt32 channel, BUInt64 pos, DataBlock &data, int addInfo, int validateNext)
 
DataError getBlockReorderInfo ()
 Returns information on any block re-ordering performed. More...
 

Private Attributes

DataFileOptions ooptions
 The current read options. More...
 
bool ohasYear2000Blocks
 Flag to indicate year 2000 blocks. More...
 
DataInfo odataInfo
 The DataInfo. More...
 
BBufferStore opacket
 Current data packet. More...
 
BBufferStore opacketNext
 Next data packet. More...
 
BArray< BArray< DataBlockPos > > oblockPositions
 Block positions for each channel. More...
 
int odataFormat
 CD1.0 current DataFormat in use. More...
 
BArray< CdDataFormatFrame_1v0odataFormats
 CD1.0 data formats. More...
 
BArray< CdFlagochannelFlags
 Flags per channel;. More...
 

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

◆ DataFileCd()

Bds::DataFileCd::DataFileCd ( )

Member Function Documentation

◆ getBlockReorderInfo()

DataError Bds::DataFileCd::getBlockReorderInfo ( )
private

Returns information on any block re-ordering performed.

◆ getDataOrder()

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

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

Reimplemented from Bds::DataFile.

◆ getFeatures()

int Bds::DataFileCd::getFeatures ( )
virtual

Get bitmask of supported features.

Reimplemented from Bds::DataFile.

◆ getFormats()

DataFormat Bds::DataFileCd::getFormats ( )
static

◆ getInfo()

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

Get info on data.

Reimplemented from Bds::DataFile.

◆ readBlock_1v0()

BError Bds::DataFileCd::readBlock_1v0 ( BUInt32  channel,
BUInt64  pos,
DataBlock data,
int  addInfo,
int  validateNext 
)
private

◆ readBlock_1v1()

BError Bds::DataFileCd::readBlock_1v1 ( BUInt32  channel,
BUInt64  pos,
DataBlock data,
int  addInfo,
int  validateNext 
)
private

◆ readData()

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

Read a block.

Reimplemented from Bds::DataFile.

◆ readPacket_1v0()

BError Bds::DataFileCd::readPacket_1v0 ( int  validateNext)
private

◆ readPacket_1v0_Scan()

BError Bds::DataFileCd::readPacket_1v0_Scan ( BUInt64 &  pos)
private

◆ readPacket_1v1()

BError Bds::DataFileCd::readPacket_1v1 ( int  validateNext)
private

◆ readPacket_1v1_Scan()

BError Bds::DataFileCd::readPacket_1v1_Scan ( BUInt64 &  pos)
private

Member Data Documentation

◆ oblockPositions

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

Block positions for each channel.

◆ ochannelFlags

BArray<CdFlag> Bds::DataFileCd::ochannelFlags
private

Flags per channel;.

◆ odataFormat

int Bds::DataFileCd::odataFormat
private

CD1.0 current DataFormat in use.

◆ odataFormats

BArray<CdDataFormatFrame_1v0> Bds::DataFileCd::odataFormats
private

CD1.0 data formats.

◆ odataInfo

DataInfo Bds::DataFileCd::odataInfo
private

The DataInfo.

◆ ohasYear2000Blocks

bool Bds::DataFileCd::ohasYear2000Blocks
private

Flag to indicate year 2000 blocks.

◆ ooptions

DataFileOptions Bds::DataFileCd::ooptions
private

The current read options.

◆ opacket

BBufferStore Bds::DataFileCd::opacket
private

Current data packet.

◆ opacketNext

BBufferStore Bds::DataFileCd::opacketNext
private

Next data packet.


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