Account
| BdsApi 4.0.1 This is the Blacknest BDS API. |
Loading...
Searching...
No Matches
BdsDataFileBds.h
Go to the documentation of this file.
11 * A BDS data file contains multiple streams. Each stream, numbered from 0 upwards, contains information blocks or
12 * data blocks for a specic data channel or set of channels if the channel data is sample multiplexed into a block.
13 * Data streams are split into segments at time discontinuities when using the getInfo() function..
14 * Each segment consists of a set of data blocks and each data block can be for one channel or a number of sample multiplexed channels.
15 * The siesmic channel to stream mapping is stored in the Information blocks. An information block is located at the start of the
16 * file and at each append point. You can only append data channels that the files was originally created for (ie. the first setInfo() API call).
18 * If the ReadOptionReorder option is used the data segments and blocks are sorted into time order.
31enum BdsDataType { BdsDataTypeBlock = 0x42534442, BdsDataTypeInfo = 0x30534442, BdsDataTypeData = 0x31534442, BdsDataTypeInfoExtra = 0x32534442 };
78 BdsDataBlockPos(BTimeStamp startTime = 0, BTimeStamp endTime = 0, BUInt32 channel = 0, BUInt32 numChannels = 0, BUInt32 segment = 0, BUInt64 position = 0, BUInt64 numSamples = 0) :
79 startTime(startTime), endTime(endTime), channel(channel), numChannels(numChannels), segment(segment), position(position), numSamples(numSamples){}
124 enum PackFormat { PackFormat_Unknown = 0, PackFormat_SM = 1, PackFormat_CM = 2, PackFormat_SM_CC = 3 };
136 BError setInfo(const DataInfo& dataInfo, const ChannelInfos& channelInfos, WriteOptionsList options = WriteOptionSensorData);
142 BError seekBlock(BUInt32 channel, BUInt segment, BTimeStamp time, BUInt32& blockNumber, BUInt64& sampleNumber, DataBlock& dataBlock);
BUInt32 BUInt
uint32_t BUInt32
bool Bool
uint64_t BUInt64
BdsDataFileBds: internal file storage data block position.
Definition BdsDataFileBds.h:76
BdsDataBlockPos(BTimeStamp startTime=0, BTimeStamp endTime=0, BUInt32 channel=0, BUInt32 numChannels=0, BUInt32 segment=0, BUInt64 position=0, BUInt64 numSamples=0)
Definition BdsDataFileBds.h:78
int operator<(const BdsDataBlockPos &b) const
Definition BdsDataFileBds.h:80
BError setHeader(const BdsDataPacketHeader &header)
Definition BdsDataFileBds.cpp:131
BError getHeader(BdsDataPacketHeader &header)
Definition BdsDataFileBds.cpp:143
BdsDataFileBds: internal file storage data segment.
Definition BdsDataFileBds.h:92
int operator<(const BdsDataSegment &b) const
Definition BdsDataFileBds.h:95
BdsDataFileBds: internal file storage data streamlet.
Definition BdsDataFileBds.h:106
This class provides Metadata information on a set of channels.
Definition BdsD.h:566
This class provides the actual Sensor data values contained within a single data block.
Definition BdsD.h:710
This class implements the BDS Data File/Stream access system.
Definition BdsDataFileBds.h:120
BError setDiskBlockSize(BUInt32 blockSize)
Sets up file/stream block size.
Definition BdsDataFileBds.cpp:989
BError setInfo(const DataInfo &dataInfo, const ChannelInfos &channelInfos, WriteOptionsList options=WriteOptionSensorData)
Sets the information.
Definition BdsDataFileBds.cpp:369
BError flush()
Flush any data to disk even if blocks are not full.
Definition BdsDataFileBds.cpp:203
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.
Definition BdsDataFileBds.cpp:877
BError setWritePositionForAppend()
Sets the next packet write position.
Definition BdsDataFileBds.cpp:228
static DataFormats getFormats()
Get the names of the supported formats.
Definition BdsDataFileBds.cpp:53
BError open(BString fileName, BString mode)
Open the file for reading or writing.
Definition BdsDataFileBds.cpp:275
BError packetRead(BdsDataPacket &packet)
Reads a packet from the file.
Definition BdsDataFileBds.cpp:932
BError setFormat(BString format)
Sets the sub-format.
Definition BdsDataFileBds.cpp:348
BError getInfo(DataInfo &dataInfo, DataFileOptions options, BList< DataError > &errors)
Get information on open file.
Definition BdsDataFileBds.cpp:531
BError setReadPositionToStart()
Definition BdsDataFileBds.cpp:923
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.
Definition BdsDataFileBds.cpp:829
BUInt32 getDiskBlockSize()
Returns the data block size in bytes.
Definition BdsDataFileBds.cpp:985
BError streamletToChannel(BUInt streamlet, BUInt &channel)
Find streamlet given channel.
Definition BdsDataFileBds.cpp:818
DataOrder getDataOrder()
Get the expected order of writing data, by sample or by channel.
Definition BdsDataFileBds.cpp:475
BError writeData(const DataBlock &data)
Writes a data block to the file.
Definition BdsDataFileBds.cpp:460
BError packetWrite(BdsDataPacket &packet)
Writes a packet to the file.
Definition BdsDataFileBds.cpp:919
This class defines the interface for generic data file access that all of the BDS data converters sha...
Definition BdsDataFile.h:41
Definition BdsC.cc:8
BdsDataType
BdsDataFileBds: internal file block type field.
Definition BdsDataFileBds.h:31
BdsDataFileBds: internal fixed size BDS Data Block header.
Definition BdsDataFileBds.h:34
BUInt32 packetOffset
Offset to first packet header within block or 0 if no packet header within block.
Definition BdsDataFileBds.h:37
BUInt32 type
Blocks type, contains magic number for synchronisation.
Definition BdsDataFileBds.h:35
BdsDataFileBds internal file storage packet header.
Definition BdsDataFileBds.h:47
BTimeStamp startTime
The time of the first sample.
Definition BdsDataFileBds.h:53
BUInt32 length
Length in bytes of packet.
Definition BdsDataFileBds.h:49
BUInt32 sequence
The streamlet packet sequence number.
Definition BdsDataFileBds.h:51
BTimeStamp endTime
The time of the last sample + 1.
Definition BdsDataFileBds.h:54
Generated by
