Account
| BdsApi 2.0.11 |
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 next segment of data. More... | |
| virtual BError | end () |
| End 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... | |
Private Member Functions | |
| void | clear () |
| BError | dataBlockAdd (BUInt32 streamlet, BTimeStamp startTime, BTimeStamp endTime) |
| Bool | dataBlockCheckIfExists (BUInt32 streamlet, BTimeStamp startTime, BTimeStamp endTime) |
| Checks if this data block already exists. More... | |
| BError | setInfoRepeat (BUInt32 repeat) |
| Sets the reapeat period for the information packets. More... | |
| BError | infoSet (BUInt32 streamlet, BTimeStamp startTime, BTimeStamp endTime, BDictString &info) |
| Sets the information packet and writes this to the file/stream. More... | |
| BError | infoGet (BdsDataPacket &packet, BDictString &info) |
| Gets the information from an information packet. More... | |
| BError | readInfoPacket () |
| Read the info packet from the file. More... | |
| BError | addInfoPacket () |
| BError | addInfoExtraPacket () |
| BError | streamletFromChannel (BUInt channel, BUInt &streamlet) |
| Find streamlet given channel. More... | |
| BError | dataAppend (const DataBlock &data) |
| Appends a data block to the file. More... | |
| BError | dataGet (BUInt channel, BdsDataPacket &packet, DataBlock &data) |
| Gets the data from a data packet. More... | |
| BError | setWritePositionForAppend () |
| Sets the next packet write position. More... | |
| BError | packetRead (BdsDataPacket &packet) |
| Reads a packet from the file. More... | |
| BError | packetWrite (BdsDataPacket &packet) |
| Writes a packet to the file. More... | |
| BError | diskBlockWrite (void *data, BUInt32 numBytes, int header=0) |
| Writes data to a block in the file. More... | |
| BError | diskBlockWriteFlush () |
| Flushes a semi-filled block to the file. More... | |
| BError | diskBlockRead (void *data, BUInt32 numBytes, int header=0) |
| Reads data from a block. More... | |
| BError | diskBlockSeek (BUInt64 position) |
Private Attributes | |
| BString | omode |
| The mode (local) More... | |
| BString | oformat |
| The format. More... | |
| PackFormat | opackFormat |
| The data packet format. More... | |
| DataInfo | odataInfo |
| Information on the channel data. More... | |
| ChannelInfos | ochannelInfos |
| Channel meta data information. More... | |
| BUInt32 | oinfoRepeat |
| How often to output info packet. More... | |
| BDictString | oinfo |
| Info packet output. More... | |
| BdsDataPacketHeader | oinfoHeader |
| Info packet header. More... | |
| BUInt32 | odiskBlockSize |
| The block size. More... | |
| BdsDataBlock * | odiskBlockRead |
| Data block buffer for reads. More... | |
| BUInt64 | odiskPositionRead |
| The disk block position. More... | |
| BdsDataBlock * | odiskBlockWrite |
| Data block buffer for writes. More... | |
| BUInt64 | odiskPositionWrite |
| The disk block position for writing. More... | |
| BArray< BdsDataStreamlet > | ostreamlets |
| Streamlet sequence numbers, position and segments. More... | |
| BdsDataPacket | opacket |
| Temporary packet for header/data packet generation. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Bds::DataFile | |
| BString | ofileName |
| BString | omode |
| BTimeStamp | ofileNameTime |
| BFile | ofile |
| BString | oformat |
Detailed Description
This class implements the BDS Data File/Stream access system.
Member Enumeration Documentation
◆ anonymous enum
◆ anonymous enum
◆ PackFormat
Constructor & Destructor Documentation
◆ DataFileBds()
| Bds::DataFileBds::DataFileBds | ( | ) |
◆ ~DataFileBds()
| Bds::DataFileBds::~DataFileBds | ( | ) |
Member Function Documentation
◆ addInfoExtraPacket()
| private |
◆ addInfoPacket()
| private |
◆ clear()
| private |
◆ close()
| virtual |
Close file.
Reimplemented from Bds::DataFile.
◆ dataAppend()
Appends a data block to the file.
◆ dataBlockAdd()
| private |
◆ dataBlockCheckIfExists()
| private |
Checks if this data block already exists.
◆ dataGet()
| private |
Gets the data from a data packet.
◆ diskBlockRead()
Reads data from a block.
◆ diskBlockSeek()
◆ diskBlockWrite()
Writes data to a block in the file.
◆ diskBlockWriteFlush()
| private |
Flushes a semi-filled block to the file.
◆ flush()
| virtual |
Flush any data to disk even if blocks are not full.
Reimplemented from Bds::DataFile.
◆ getDataOrder()
| virtual |
Get the expected order of writing data, by sample or by channel.
Reimplemented from Bds::DataFile.
◆ getDiskBlockSize()
| uint32_t Bds::DataFileBds::getDiskBlockSize | ( | ) |
Returns the data block size in bytes.
◆ getFormats()
| static |
Get the names of the supported formats.
◆ getInfo()
| virtual |
Get information on open file.
Reimplemented from Bds::DataFile.
◆ infoGet()
| private |
Gets the information from an information packet.
◆ infoSet()
| private |
Sets the information packet and writes this to the file/stream.
◆ open()
Open the file for reading or writing.
Reimplemented from Bds::DataFile.
◆ packetRead()
| private |
Reads a packet from the file.
◆ packetWrite()
| private |
Writes a packet to the file.
◆ readData()
| virtual |
Read the data block for the given channel or all channels if blockNumber is 0.
Reimplemented from Bds::DataFile.
◆ readInfoPacket()
| private |
Read the info packet from the file.
◆ seekBlock()
| virtual |
Find the block that contains the samples for the time requested.
Reimplemented from Bds::DataFile.
◆ setDiskBlockSize()
◆ setFormat()
Sets the sub-format.
Reimplemented from Bds::DataFile.
◆ setInfo()
| virtual |
Sets the information.
Reimplemented from Bds::DataFile.
◆ setInfoRepeat()
Sets the reapeat period for the information packets.
◆ setWritePositionForAppend()
| private |
Sets the next packet write position.
◆ streamletFromChannel()
Find streamlet given channel.
◆ writeData()
Writes a data block to the file.
Reimplemented from Bds::DataFile.
Member Data Documentation
◆ ochannelInfos
| private |
Channel meta data information.
◆ odataInfo
| private |
Information on the channel data.
◆ odiskBlockRead
| private |
Data block buffer for reads.
◆ odiskBlockSize
| private |
The block size.
◆ odiskBlockWrite
| private |
Data block buffer for writes.
◆ odiskPositionRead
| private |
The disk block position.
◆ odiskPositionWrite
| private |
The disk block position for writing.
◆ oformat
| private |
The format.
◆ oinfo
| private |
Info packet output.
◆ oinfoHeader
| private |
Info packet header.
◆ oinfoRepeat
| private |
How often to output info packet.
◆ omode
| private |
The mode (local)
◆ opacket
| private |
Temporary packet for header/data packet generation.
◆ opackFormat
| private |
The data packet format.
◆ ostreamlets
| private |
Streamlet sequence numbers, position and segments.
The documentation for this class was generated from the following files:
- /src/blacknest/bds/bds/bdsDataLib/BdsDataFileBds.h
- /src/blacknest/bds/bds/bdsDataLib/BdsDataFileBds.cpp
Generated by
1.8.15 
Public Types inherited from