|
BdsApi
2.2.1
This is the Blacknest BDS API.
|
This class implements the BDS Data File/Stream access system. More...
#include <BdsDataFileBds.h>
Public Types | |
| enum | { StreamsMax = 256 } |
| enum | { DefaultBlockSize = 65536 } |
| enum | PackFormat { PackFormat_Unknown = 0, PackFormat_SM = 1, PackFormat_CM = 2, PackFormat_SM_CC = 3 } |
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 } |
Public Member Functions | |
| DataFileBds () | |
| ~DataFileBds () | |
| BError | open (BString fileName, BString mode) |
| Open the file for reading or writing. More... | |
| BError | flush () |
| Flush any data to disk even if blocks are not full. More... | |
| BError | close () |
| Close file. More... | |
| BError | setFormat (BString format) |
| Sets the sub-format. More... | |
| BError | setInfo (const DataInfo &dataInfo, const ChannelInfos &channelInfos, WriteOptionsList options=WriteOptionSensorData) |
| Sets the information. More... | |
| BError | writeData (const DataBlock &data) |
| Writes a data block to the file. 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 information on open file. More... | |
| BError | seekBlock (BUInt32 channel, BUInt segment, BTimeStamp time, BUInt32 &blockNumber, BUInt64 &sampleNumber, DataBlock &dataBlock) |
| Find the block that contains the samples for the time requested. More... | |
| BError | readData (BUInt32 channel, BUInt segment, BUInt32 blockNumber, DataBlock &dataBlock) |
| Read the data block for the given channel or all channels if blockNumber is 0. More... | |
| BError | setDiskBlockSize (BUInt32 blockSize) |
| Sets up file/stream block size. More... | |
| BUInt32 | getDiskBlockSize () |
| Returns the data block size in bytes. More... | |
Public Member Functions inherited from Bds::DataFile | |
| DataFile () | |
| virtual | ~DataFile () |
| virtual void | init () |
| Initialise. More... | |
| virtual BString | getFileName () |
| Return the file name. More... | |
| virtual int | getFeatures () |
| Get bitmask of supported features. More... | |
| virtual BError | start (BUInt channel, BUInt segment) |
| Start writing next segment of data. More... | |
| virtual BError | end () |
| End write segment. More... | |
| virtual BError | fileNameProcess () |
| Parse the file name for a date/time. More... | |
| virtual BError | getFormat (BString &format) |
| Get sub-format. More... | |
| virtual BError | getMetaData (ChannelInfos &channelInfos) |
| Return all known MetaData in the file. More... | |
| void | dataErrorFixup (const 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 (const DataBlock &data1, const DataBlock &data2, BUInt channel=0) |
| Check if blocks are duplicates. More... | |
| BUInt64 | getFilePosition () |
Static Public Member Functions | |
| static DataFormat | getFormats () |
| Get the names of the supported formats. More... | |
Static Public Member Functions inherited from Bds::DataFile | |
| static DataFormat | getFormats () |
| Get list of supported formats. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Bds::DataFile | |
| BString | ofileName |
| BString | omode |
| BTimeStamp | ofileNameTime |
| BFile | ofile |
| BString | oformat |
This class implements the BDS Data File/Stream access system.
| Bds::DataFileBds::DataFileBds | ( | ) |
| Bds::DataFileBds::~DataFileBds | ( | ) |
|
virtual |
Close file.
Reimplemented from Bds::DataFile.
|
virtual |
Flush any data to disk even if blocks are not full.
Reimplemented from Bds::DataFile.
|
virtual |
Get the expected order of writing data, by sample or by channel.
Reimplemented from Bds::DataFile.
| uint32_t Bds::DataFileBds::getDiskBlockSize | ( | ) |
Returns the data block size in bytes.
|
static |
Get the names of the supported formats.
|
virtual |
Get information on open file.
Reimplemented from Bds::DataFile.
Open the file for reading or writing.
Reimplemented from Bds::DataFile.
|
virtual |
Read the data block for the given channel or all channels if blockNumber is 0.
Reimplemented from Bds::DataFile.
|
virtual |
Find the block that contains the samples for the time requested.
Reimplemented from Bds::DataFile.
Sets the sub-format.
Reimplemented from Bds::DataFile.
|
virtual |
Sets the information.
Reimplemented from Bds::DataFile.
Writes a data block to the file.
Reimplemented from Bds::DataFile.
1.8.5