BdsApi  2.2.7
This is the Blacknest BDS API.
BdsDataFileCd.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * BdsDataFileCd.h BDRS Data File Access
3  * T.Barnaby, BEAM Ltd, 2011-06-01
4  *******************************************************************************
5  */
6 #ifndef BdsDataFileCd_H
7 #define BdsDataFileCd_H
8 
9 #include <BdsDataFile.h>
10 
11 namespace Bds {
12 
14 struct CdChannel_1v0 {
21  char name[16];
22  char stationName[16];
23  char channelName[16];
25 };
26 
35 };
36 
39 public:
42  char mode[24];
43  char status[32];
49 };
50 
52 class CdPacketData {
53 public:
56  char creator[8];
57  char destination[8];
60 
65 
68  char* auth;
70 };
71 
73 class CdFlag {
74 public:
75  CdFlag(){ dead = zeroed = 0; };
76  int dead;
77  int zeroed;
78 };
79 
81 class DataFileCd : public DataFile{
82 public:
83  DataFileCd();
84 
85  int getFeatures();
87 
88  BError getInfo(DataInfo& dataInfo, DataFileOptions options, BList<DataError>& errors);
89  BError readData(BUInt32 channel, BUInt segment, BUInt32 blockNumber, DataBlock& data);
90 
91  static DataFormat getFormats();
92 private:
93  BError readPacket_1v0(int validateNext);
94  BError readPacket_1v0_Scan(BUInt64& pos);
95  BError readBlock_1v0(BUInt32 channel, BUInt64 pos, DataBlock& data, int addInfo, int validateNext);
96  BError readPacket_1v1(int validateNext);
97  BError readPacket_1v1_Scan(BUInt64& pos);
98  BError readBlock_1v1(BUInt32 channel, BUInt64 pos, DataBlock& data, int addInfo, int validateNext);
99  DataError getBlockReorderInfo();
100 
101  DataFileOptions ooptions;
102  bool ohasYear2000Blocks;
103  DataInfo odataInfo;
104  BBufferStore opacket;
105  BBufferStore opacketNext;
106  BArray<BArray<DataBlockPos> > oblockPositions;
107 
108  int odataFormat;
109  BArray<CdDataFormatFrame_1v0> odataFormats;
110  BArray<CdFlag> ochannelFlags;
111 };
112 
113 }
114 #endif
BError
Bds::CdPacketData::series
BUInt32 series
Definition: BdsDataFileCd.h:59
Bds::CdDataChannel::data
BUInt8 * data
Definition: BdsDataFileCd.h:48
Bds::CdDataChannel::dataSize
BUInt32 dataSize
Definition: BdsDataFileCd.h:47
Bds::DataFileCd::getFeatures
int getFeatures()
Get bitmask of supported features.
Definition: BdsDataFileCd.cpp:238
Bds::CdDataChannel
BdsDataFile: Internal CD channel information.
Definition: BdsDataFileCd.h:38
Bds::CdFlag::zeroed
int zeroed
Definition: BdsDataFileCd.h:77
Bds::CdChannel_1v0
BdsDataFile: Internal CD1.0 channel information.
Definition: BdsDataFileCd.h:14
Bds::CdDataFormatFrame_1v0
BdsDataFile: Internal CD1.0 frame information.
Definition: BdsDataFileCd.h:28
Bds::CdFlag::CdFlag
CdFlag()
Definition: BdsDataFileCd.h:75
Bds::DataFileOptions
This defines a list of BDS data convtor options.
Definition: BdsDataFile.h:30
Bds::CdDataFormatFrame_1v0::numChannels
BUInt32 numChannels
Definition: BdsDataFileCd.h:32
Bds::CdPacketData::numChannels
BUInt32 numChannels
Definition: BdsDataFileCd.h:61
Bds::CdChannel_1v0::calibrationPeriod
BFloat32 calibrationPeriod
Definition: BdsDataFileCd.h:20
Bds::CdFlag
BdsDataFile: Internal CD flag.
Definition: BdsDataFileCd.h:73
BFloat32
float BFloat32
BdsDataFile.h
Bds::CdChannel_1v0::calibrationFactor
BFloat32 calibrationFactor
Definition: BdsDataFileCd.h:19
BUInt
BUInt32 BUInt
Bds::CdDataFormatFrame_1v0::period
BUInt32 period
Definition: BdsDataFileCd.h:33
BArray
Bds::CdDataChannel::numSamples
BUInt32 numSamples
Definition: BdsDataFileCd.h:46
Bds::CdDataChannel::status
char status[32]
Definition: BdsDataFileCd.h:43
Bds::CdDataFormatFrame_1v0::frameType
BUInt32 frameType
Definition: BdsDataFileCd.h:29
BUInt64
uint64_t BUInt64
Bds::DataBlock
This class provides the acual seismic data values contained within a single data block.
Definition: BdsD.h:640
BUInt32
uint32_t BUInt32
Bds::DataFile::DataOrder
DataOrder
Definition: BdsDataFile.h:43
Bds::CdDataChannel::channel
BString channel
Definition: BdsDataFileCd.h:41
Bds::CdPacketData::destination
char destination[8]
Definition: BdsDataFileCd.h:57
Bds
Definition: BdsC.cc:8
Bds::CdChannel_1v0::channel
BUInt32 channel
Definition: BdsDataFileCd.h:24
Bds::DataError
This stores a data error. It includes and error number and a string as well as information on what se...
Definition: BdsLib.h:35
BString
BBufferStore
Bds::CdChannel_1v0::auth
BUInt8 auth
Definition: BdsDataFileCd.h:15
Bds::CdChannel_1v0::name
char name[16]
Definition: BdsDataFileCd.h:21
Bds::CdPacketData
BdsDataFile: Internal CD data packet.
Definition: BdsDataFileCd.h:52
Bds::CdDataFormatFrame_1v0::frameLength
BUInt32 frameLength
Definition: BdsDataFileCd.h:30
Bds::CdPacketData::sequenceNum
BUInt64 sequenceNum
Definition: BdsDataFileCd.h:58
Bds::CdChannel_1v0::compress
BUInt8 compress
Definition: BdsDataFileCd.h:16
Bds::DataInfo
This class defines information on a set of data.
Definition: BdsD.h:573
Bds::CdDataChannel::period
BUInt32 period
Definition: BdsDataFileCd.h:45
Bds::CdDataChannel::startTime
BTimeStamp startTime
Definition: BdsDataFileCd.h:44
Bds::DataFormat
This holds information on a seismic data format.
Definition: BdsD.h:829
Bds::DataFile
This class defines the interface for generic data file access that all of the BDS data conterors shar...
Definition: BdsDataFile.h:41
Bds::CdPacketData::crc
BUInt64 crc
Definition: BdsDataFileCd.h:69
Bds::CdDataChannel::mode
char mode[24]
Definition: BdsDataFileCd.h:42
data
char data[8]
Bds::CdDataChannel::station
BString station
Definition: BdsDataFileCd.h:40
Bds::CdPacketData::channels
BArray< CdDataChannel > channels
Definition: BdsDataFileCd.h:64
BUInt8
uint8_t BUInt8
Bds::CdChannel_1v0::spare1
BUInt8 spare1
Definition: BdsDataFileCd.h:18
BTimeStamp
Bds::CdPacketData::creator
char creator[8]
Definition: BdsDataFileCd.h:56
Bds::CdPacketData::auth
char * auth
Definition: BdsDataFileCd.h:68
Bds::CdChannel_1v0::stationName
char stationName[16]
Definition: BdsDataFileCd.h:22
Bds::DataFileCd::getFormats
static DataFormat getFormats()
Definition: BdsDataFileCd.cpp:176
Bds::CdPacketData::authSize
BUInt32 authSize
Definition: BdsDataFileCd.h:67
Bds::CdChannel_1v0::channelName
char channelName[16]
Definition: BdsDataFileCd.h:23
Bds::CdDataFormatFrame_1v0::channels
CdChannel_1v0 channels[100]
Definition: BdsDataFileCd.h:34
Bds::DataFileCd
Data file convertor for CD1.0 and CD1.1 file formats.
Definition: BdsDataFileCd.h:81
Bds::DataFileCd::DataFileCd
DataFileCd()
Definition: BdsDataFileCd.cpp:232
Bds::CdPacketData::period
BUInt32 period
Definition: BdsDataFileCd.h:62
BList
Bds::DataFileCd::readData
BError readData(BUInt32 channel, BUInt segment, BUInt32 blockNumber, DataBlock &data)
Read a block.
Definition: BdsDataFileCd.cpp:553
Bds::CdPacketData::frameType
BUInt32 frameType
Definition: BdsDataFileCd.h:54
Bds::CdChannel_1v0::spare0
BUInt8 spare0
Definition: BdsDataFileCd.h:17
Bds::CdDataFormatFrame_1v0::maxFrameLength
BUInt32 maxFrameLength
Definition: BdsDataFileCd.h:31
Bds::DataFileCd::getDataOrder
DataOrder getDataOrder()
Get the expected order of writing data, by sample or by channel.
Definition: BdsDataFileCd.cpp:242
Bds::CdPacketData::authKey
BUInt32 authKey
Definition: BdsDataFileCd.h:66
Bds::DataFileCd::getInfo
BError getInfo(DataInfo &dataInfo, DataFileOptions options, BList< DataError > &errors)
Get info on data.
Definition: BdsDataFileCd.cpp:246
Bds::CdPacketData::trailerOffset
BUInt32 trailerOffset
Definition: BdsDataFileCd.h:55
Bds::CdPacketData::startTime
BTimeStamp startTime
Definition: BdsDataFileCd.h:63
Bds::CdFlag::dead
int dead
Definition: BdsDataFileCd.h:75