#include <BdsDataFile.h>
Inheritance diagram for Bds::DataFile:

Public Types | |
| typedef int | ReadOptions |
| DataOrderUnknown | |
| DataOrderAll | |
| DataOrderSample | |
| DataOrderChannel | |
| FeatureNone = 0x00 | |
| FeatureCanWrite = 0x01 | |
| FeatureCanRead = 0x02 | |
| WriteOptionNone = 0x00 | |
| WriteOptionSensorData = 0x01 | |
| WriteOptionMetaDataAll = 0x02 | |
| ReadOptionNone = 0x00 | |
| ReadOptionValidate = 0x01 | |
| ReadOptionFileNameProcess = 0x02 | |
| ReadOptionValidateCorruptions = 0x04 | |
| ReadOptionReorder = 0x08 | |
| ReadOptionDeleteDuplicates = 0x10 | |
| ReadOptionInfoExtra = 0x20 | |
| enum | DataOrder { DataOrderUnknown, DataOrderAll, DataOrderSample, DataOrderChannel } |
| enum | Features { FeatureNone = 0x00, FeatureCanWrite = 0x01, FeatureCanRead = 0x02 } |
| enum | WriteOptionsList { WriteOptionNone = 0x00, WriteOptionSensorData = 0x01, WriteOptionMetaDataAll = 0x02 } |
| enum | ReadOptionsList { ReadOptionNone = 0x00, ReadOptionValidate = 0x01, ReadOptionFileNameProcess = 0x02, ReadOptionValidateCorruptions = 0x04, ReadOptionReorder = 0x08, ReadOptionDeleteDuplicates = 0x10, ReadOptionInfoExtra = 0x20 } |
Public Member Functions | |
| DataFile () | |
| virtual | ~DataFile () |
| virtual void | init () |
| Initialise. | |
| virtual BError | open (BString fileName, BString mode) |
| Open the file for read or write. | |
| virtual BError | close () |
| Close the file. | |
| virtual BError | setFormat (BString format) |
| Set the sub-format. | |
| virtual BString | getFileName () |
| Return the file name. | |
| virtual DataOrder | getDataOrder () |
| Get the expected order of writing data, by sample or by channel. | |
| virtual int | getFeatures () |
| Get bitmask of supported features. | |
| virtual BError | setInfo (DataInfo &dataInfo, ChannelInfos &channelInfos, WriteOptionsList options=WriteOptionNone) |
| Set information on data for write. | |
| virtual BError | start (BUInt channel, BUInt segment) |
| Start next segment of data. | |
| virtual BError | writeData (DataBlock &data) |
| Write a block of data. | |
| virtual BError | end () |
| End segment. | |
| virtual BError | fileNameProcess () |
| Parse the file name for a date/time. | |
| virtual BError | getFormat (BString &format) |
| Get sub-format. | |
| virtual BError | getInfo (DataInfo &dataInfo, ReadOptions options, BList< DataError > &errors) |
| Get info on data. | |
| virtual BError | seekBlock (BUInt32 channel, BUInt segment, BTimeStamp time, BUInt32 &blockNumber, BUInt64 &sampleNumber, DataBlock &data) |
| Find requested block on given channel given a time. | |
| virtual BError | readData (BUInt32 channel, BUInt segment, BUInt32 blockNumber, DataBlock &dataBlock) |
| Read a block. | |
| void | dataErrorFixup (DataInfo &dataInfo, BList< DataError > &errors) |
| Fixup data errors, mainly start/end times to be within data. | |
Static Public Member Functions | |
| static DataFormat | getFormats () |
| Get list of supported formats. | |
Protected Attributes | |
| BString | ofileName |
| BString | omode |
| BTimeStamp | ofileNameTime |
| BFile | ofile |
| BString | oformat |
| typedef int Bds::DataFile::ReadOptions |
| Bds::DataFile::DataFile | ( | ) |
| Bds::DataFile::~DataFile | ( | ) | [virtual] |
| BError Bds::DataFile::close | ( | ) | [virtual] |
Fixup data errors, mainly start/end times to be within data.
| BError Bds::DataFile::end | ( | ) | [virtual] |
| BError Bds::DataFile::fileNameProcess | ( | ) | [virtual] |
Parse the file name for a date/time.
| DataFile::DataOrder Bds::DataFile::getDataOrder | ( | ) | [virtual] |
Get the expected order of writing data, by sample or by channel.
Reimplemented in Bds::DataFileAscii, Bds::DataFileBdrs, Bds::DataFileBds, Bds::DataFileIms, Bds::DataFileWra, and Bds::DataFileWraAgso.
| int Bds::DataFile::getFeatures | ( | ) | [virtual] |
Get bitmask of supported features.
Reimplemented in Bds::DataFileAscii, Bds::DataFileBdrs, Bds::DataFileGcf, Bds::DataFileIms, Bds::DataFileSac, Bds::DataFileWra, and Bds::DataFileWraAgso.
| BString Bds::DataFile::getFileName | ( | ) | [virtual] |
Return the file name.
| BError Bds::DataFile::getFormat | ( | BString & | format | ) | [virtual] |
Get sub-format.
| DataFormat Bds::DataFile::getFormats | ( | ) | [static] |
Get list of supported formats.
Reimplemented in Bds::DataFileAscii, Bds::DataFileBdrs, Bds::DataFileBds, Bds::DataFileBknas, Bds::DataFileGcf, Bds::DataFileIms, Bds::DataFileSac, Bds::DataFileTapeDigitiser, Bds::DataFileWra, and Bds::DataFileWraAgso.
| BError Bds::DataFile::getInfo | ( | DataInfo & | dataInfo, | |
| ReadOptions | options, | |||
| BList< DataError > & | errors | |||
| ) | [virtual] |
Get info on data.
| void Bds::DataFile::init | ( | ) | [virtual] |
Initialise.
| BError Bds::DataFile::open | ( | BString | fileName, | |
| BString | mode | |||
| ) | [virtual] |
Open the file for read or write.
Reimplemented in Bds::DataFileAscii, Bds::DataFileBds, Bds::DataFileBknas, Bds::DataFileIms, and Bds::DataFileTapeDigitiser.
| BError Bds::DataFile::readData | ( | BUInt32 | channel, | |
| BUInt | segment, | |||
| BUInt32 | blockNumber, | |||
| DataBlock & | dataBlock | |||
| ) | [virtual] |
Read a block.
Reimplemented in Bds::DataFileBdrs, Bds::DataFileBds, Bds::DataFileGcf, Bds::DataFileTapeDigitiser, Bds::DataFileWra, and Bds::DataFileWraAgso.
| BError Bds::DataFile::seekBlock | ( | BUInt32 | channel, | |
| BUInt | segment, | |||
| BTimeStamp | time, | |||
| BUInt32 & | blockNumber, | |||
| BUInt64 & | sampleNumber, | |||
| DataBlock & | data | |||
| ) | [virtual] |
| BError Bds::DataFile::setFormat | ( | BString | format | ) | [virtual] |
| BError Bds::DataFile::setInfo | ( | DataInfo & | dataInfo, | |
| ChannelInfos & | channelInfos, | |||
| WriteOptionsList | options = WriteOptionNone | |||
| ) | [virtual] |
Set information on data for write.
| BError Bds::DataFile::start | ( | BUInt | channel, | |
| BUInt | segment | |||
| ) | [virtual] |
| BError Bds::DataFile::writeData | ( | DataBlock & | data | ) | [virtual] |
Write a block of data.
Reimplemented in Bds::DataFileAscii, Bds::DataFileBds, Bds::DataFileBknas, and Bds::DataFileIms.
BFile Bds::DataFile::ofile [protected] |
BString Bds::DataFile::ofileName [protected] |
BTimeStamp Bds::DataFile::ofileNameTime [protected] |
BString Bds::DataFile::oformat [protected] |
Reimplemented in Bds::DataFileAscii, Bds::DataFileBds, and Bds::DataFileGcf.
BString Bds::DataFile::omode [protected] |
1.4.7