BDS Public
BdsApi  2.0.11
Bds Namespace Reference

Classes

class  AccessGroup
 This holds information on data access groups. More...
 
class  AdminAccess
 This is the AdminAccess API interface. More...
 
class  ArrayChannel
 This class defines an arrays channel. More...
 
struct  BdsDataBlock
 
struct  BdsDataBlockHeader
 
class  BdsDataBlockPos
 
class  BdsDataPacket
 
struct  BdsDataPacketHeader
 
class  BdsDataSegment
 
class  BdsDataStreamlet
 
class  Calibration
 This class defines a calibration setting. More...
 
struct  CdChannel_1v0
 
class  CdDataChannel
 
struct  CdDataFormatFrame_1v0
 
class  CdFlag
 
class  CdPacketData
 
class  Change
 This holds information on a change. More...
 
class  ChangeGroup
 This holds information on a change. More...
 
class  Channel
 This class defines a Channel. More...
 
class  ChannelInfo
 This class provides information on a channel. More...
 
class  ChannelInfos
 This class provides information on a set of channels. More...
 
class  ChannelInstrument
 This class defines a Channel to Digitiser/Sensor linkage. More...
 
class  ChannelName
 This class defines a full channel name. More...
 
class  CleanOptions
 This is the clean options. More...
 
class  CompressSteim1
 
class  DataAccess
 This class defines an X,Y location. More...
 
class  DataAddAccess
 This is the DataAdd Access API interface. More...
 
class  DataAvail
 This class defines information on a set of data. More...
 
class  DataAvailChan
 This class defines information on a set of data. More...
 
class  DataBlock
 This class defines information on a set of data. More...
 
class  DataBlockPos
 
class  DataChannel
 This class defines information on a single channels set of data. More...
 
class  DataChannelInfo
 This class defines information on a data channel. More...
 
class  DataCollate
 This class defines the interface for generic data file access. More...
 
class  DataError
 
class  DataFile
 This class defines the interface for generic data file access. More...
 
class  DataFileAd22
 
class  DataFileAscii
 
class  DataFileBdrs
 
class  DataFileBds
 This class implements the BDS Data File/Stream access system. More...
 
class  DataFileBknas
 
class  DataFileCd
 
class  DataFileCss
 
class  DataFileCssData
 
class  DataFileGcf
 
class  DataFileIms
 
class  DataFileInfo
 This class defines information on a data file. More...
 
class  DataFileLac
 
class  DataFileLog
 
class  DataFileOptions
 
class  DataFileResponse
 This class defines the interface for generic responese data file access. More...
 
class  DataFileSac
 
class  DataFileTapeDigitiser
 This class implements the TapeDigitiser's file output conversion and storeing system. More...
 
class  DataFileWra
 
class  DataFileWraAgso
 
class  DataFormat
 This holds information on a data format. More...
 
class  DataFormats
 This class defines the interface for generic data file access. More...
 
struct  DataFrameHead_1v0
 
class  DataHandle
 This defines a handle to a data stream/file. More...
 
class  DataInfo
 This class defines information on a set of data. More...
 
struct  DataSubFrameHead_1v0
 
class  Digitiser
 This class defines a Digitiser. More...
 
class  Fap
 This class defines a Amplitude/Phase Response. More...
 
struct  FileDataHeaderTape_1v1
 
struct  FileDataHeaderTape_2v0
 
class  Fir
 This class defines a Pole/Zero Response. More...
 
class  FirEntry
 This class defines a Pole/Zero Response. More...
 
struct  GcfChannel
 
class  Group
 This holds information on a groups. More...
 
struct  Header_1v0
 
struct  Header_1v1
 
class  ListRange
 This class defines an integer based range. More...
 
class  Location
 This class defines a Location. This will be the stations location. More...
 
class  Log
 This holds information on a Note. More...
 
class  LogSelect
 This is used for requesting log entries. More...
 
class  Network
 This class defines a Seismic Network organisation. More...
 
class  Note
 This holds information on a Note. More...
 
class  Point
 This class defines an X,Y location. More...
 
class  PoleZero
 This class defines a Pole/Zero Response. More...
 
class  Response
 This class defines a Response. More...
 
class  ResponseEdit
 Response Editor object. More...
 
class  Selection
 This class defines the set of data selection critera. More...
 
class  SelectionChannel
 This class defines the set of data selection critera. More...
 
class  SelectionInfo
 This class defines the set of data selection critera. More...
 
class  Sensor
 This class defines a Sensor. More...
 
class  Source
 This class defines a Seismic data Source. More...
 
class  SourcePriority
 This class defines a Source Order entry. More...
 
class  Station
 This class defines a Station. More...
 
class  TimePeriod
 This class defines a TimePeriod. More...
 
struct  Trailer
 
class  User
 This holds information on a user. More...
 

Enumerations

enum  Errors {
  ErrorNoMetaData = 64, ErrorDataQuality = 65, ErrorSlaveMode = 66, ErrorTimeStamp = 67,
  ErrorValidate = 80, ErrorValidateMissingBlocks = 81, ErrorValidateTimeBackwards = 82, ErrorValidateFilenameTime = 83,
  ErrorValidateMetaData = 84, ErrorValidateFix = 85, ErrorValidateDuplicate = 86, ErrorValidateReorder = 87,
  ErrorValidateBdsFudge = 88
}
 
enum  Priority { PriorityLow, PriorityNormal, PriorityHigh }
 
enum  Mode { ModeMaster, ModeSlave }
 
enum  DataFlags {
  DataFlagNone = 0x00, DataFlagClipDataToTime = 0x01, DataFlagClipDataToChannels = 0x02, DataFlagMergeSegments = 0x04,
  DataFlagNoMetadata = 0x08
}
 
enum  SelectionGroup { SelectionGroupData, SelectionGroupMetaData, SelectionGroupDataWithCount }
 
enum  SampleFormat {
  SampleFormatUnknown, SampleFormatInt16, SampleFormatInt32, SampleFormatFloat32,
  SampleFormatFloat64, SampleFormatInt24
}
 
enum  AvailType { AvailNone, AvailPartial, AvailFull }
 
enum  BdsDataType { BdsDataTypeBlock = 0x42534442, BdsDataTypeInfo = 0x30534442, BdsDataTypeData = 0x31534442, BdsDataTypeInfoExtra = 0x32534442 }
 
enum  FileHeaderType { FileHeaderType_Standard = 1, FileHeaderType_TapeDigitiser = 10 }
 
enum  FileSampleType {
  FileSampleType_Unknown, FileSampleType_Float32, FileSampleType_Float64, FileSampleType_Int16,
  FileSampleType_Int32
}
 

Functions

void bdsDumpPoleZeros (PoleZero poleZeros)
 
void bdsChannelGetTypeAux (BString name, BString &type, BString &aux)
 
BString bdsChannelGetName (BString type, BString aux)
 
BError bdsDataInfoSetTimeRange (DataInfo &dataInfo)
 
BError bdsDataInfoFromInfo (BDictString info, DataInfo &dataInfo, Bool append)
 Convert info to DataInfo. More...
 
BError bdsInfoFromDataInfo (const DataInfo &dataInfo, BDictString &info)
 
BError bdsDataInfoMergeFlatten (DataInfo &dataInfo, const DataInfo &dataInfoAdd)
 
BString bdsStationAlias (Station station)
 
void bdsDumpSelection (Selection sel)
 
void bdsDumpDataInfo (DataInfo dataInfo, int includeInfo)
 
void bdsDumpChannelInfos (const ChannelInfos &channelInfos)
 
void bdsDumpData (const DataBlock &dataBlock, int nSamples)
 
BString bdsDataChannelInfo (const DataChannel &dataChannel)
 
BString bdsDataChannelRef (const DataChannel &dataChannel)
 
BString bdsDataChannelRef (const ChannelInfo &channelInfo)
 
BError bdsDataChannelOverallResponse (const ChannelInfo &channelInfo, Response &response)
 
BString bdsSelectionChannelInfo (const Selection &selection, BUInt channel)
 
double bdsPoleZeroGain (const PoleZero &poleZero, double frequency)
 Calculates the overal gain of the given PoleZero transfer function. More...
 
void bdsPoleZeroGainPhase (const PoleZero &poleZero, double frequency, double &gain, double &phase)
 Calculates the overal gain and phase of the given PoleZero transfer function. More...
 
void bdsPoleZeroToFap (const PoleZero &poleZero, BUInt nPoints, double calibrationFrequency, double sampleFrequency, BArray< Fap > &fap)
 Convert PoleZero to FAP. More...
 
static BString fileNameTime (BTimeStamp t)
 
BString bdsFileNameExpand (BString fileName, ChannelInfo &channelInfo)
 
BString bdsFileNameExpand (BString fileName, ChannelInfos &channelInfos)
 
BError bdsUnCompressCm8 (BUInt8 *buffer, BUInt n, BArray< BInt32 > &data)
 
BError bdsUnCompressSteim1 (BUInt8 *buffer, BUInt n, BArray< BInt32 > &data)
 
static BString nullString (BString s)
 
BUInt32 crc (BUInt32 crc, void *data, int numBytes)
 
static void crcInit ()
 
static uint64_t crc64 (const void *buffer, const uint32_t len)
 
BString getHexString (char *data, int len)
 
int duplicateDump (DataBlock &data1, DataBlock &data2, int channel)
 
static BError fixedString (double v, int fieldWidth, int numDecimal, BString &str)
 
void dataCalculateDifference (BInt32 &prevValue, BArray< BInt32 > &data)
 
void dataCalculateUnDifference (BInt32 &prevValue, BArray< BInt32 > &data)
 
BInt32 dataChecksum (BInt32 checksum, BArray< BInt32 > &data)
 
BError dataCompressCm6 (int &prevValue1, int &prevValue2, BArray< BInt32 > &data, BString &d)
 
BError dataDeCompressCm6 (int &prevValue1, int &prevValue2, BString &d, BArray< BInt32 > &data)
 
static void dataConvert (const BArray< BFloat64 > &dataIn, BArray< BInt32 > &dataOut)
 
static BString stringFormat (BTimeStamp t)
 
static BString removeCR (BString str)
 
BString fixedWidthValue (double v, int width)
 

Variables

const BUInt32 apiVersion = 0
 
const int NetworkNameLen = 3
 
const int StationNameLen = 5
 
const int ChannelTypeLen = 3
 
const int ChannelAuxLen = 2
 
const int SourceLen = 16
 
const BString BdsVersion = "1.2.0"
 
static uint64_t crcVec [256]
 
static int crcInitDone
 
static char cm6Table [64]
 
static BUInt8 cm6TableRev [128]
 
const double Scale = 16777216.0
 
DataFormats dataFormats
 

Enumeration Type Documentation

◆ AvailType

Enumerator
AvailNone 
AvailPartial 
AvailFull 

◆ BdsDataType

Enumerator
BdsDataTypeBlock 
BdsDataTypeInfo 
BdsDataTypeData 
BdsDataTypeInfoExtra 

◆ DataFlags

Enumerator
DataFlagNone 
DataFlagClipDataToTime 
DataFlagClipDataToChannels 
DataFlagMergeSegments 
DataFlagNoMetadata 

◆ Errors

Version
: 24 The System Error List
Enumerator
ErrorNoMetaData 
ErrorDataQuality 
ErrorSlaveMode 
ErrorTimeStamp 
ErrorValidate 
ErrorValidateMissingBlocks 
ErrorValidateTimeBackwards 
ErrorValidateFilenameTime 
ErrorValidateMetaData 
ErrorValidateFix 
ErrorValidateDuplicate 
ErrorValidateReorder 
ErrorValidateBdsFudge 

◆ FileHeaderType

Enumerator
FileHeaderType_Standard 
FileHeaderType_TapeDigitiser 

◆ FileSampleType

Enumerator
FileSampleType_Unknown 
FileSampleType_Float32 
FileSampleType_Float64 
FileSampleType_Int16 
FileSampleType_Int32 

◆ Mode

enum Bds::Mode
Enumerator
ModeMaster 
ModeSlave 

◆ Priority

Enumerator
PriorityLow 
PriorityNormal 
PriorityHigh 

◆ SampleFormat

Enumerator
SampleFormatUnknown 
SampleFormatInt16 
SampleFormatInt32 
SampleFormatFloat32 
SampleFormatFloat64 
SampleFormatInt24 

◆ SelectionGroup

Enumerator
SelectionGroupData 
SelectionGroupMetaData 
SelectionGroupDataWithCount 

Function Documentation

◆ bdsChannelGetName()

BString Bds::bdsChannelGetName ( BString  type,
BString  aux 
)

◆ bdsChannelGetTypeAux()

void Bds::bdsChannelGetTypeAux ( BString  name,
BString type,
BString aux 
)

◆ bdsDataChannelInfo()

BString Bds::bdsDataChannelInfo ( const DataChannel dataChannel)

◆ bdsDataChannelOverallResponse()

BError Bds::bdsDataChannelOverallResponse ( const ChannelInfo channelInfo,
Response response 
)

◆ bdsDataChannelRef() [1/2]

BString Bds::bdsDataChannelRef ( const DataChannel dataChannel)

◆ bdsDataChannelRef() [2/2]

BString Bds::bdsDataChannelRef ( const ChannelInfo channelInfo)

◆ bdsDataInfoFromInfo()

BError Bds::bdsDataInfoFromInfo ( BDictString  info,
DataInfo dataInfo,
Bool  append 
)

Convert info to DataInfo.

◆ bdsDataInfoMergeFlatten()

BError Bds::bdsDataInfoMergeFlatten ( DataInfo dataInfo,
const DataInfo dataInfoAdd 
)

◆ bdsDataInfoSetTimeRange()

BError Bds::bdsDataInfoSetTimeRange ( DataInfo dataInfo)

◆ bdsDumpChannelInfos()

void Bds::bdsDumpChannelInfos ( const ChannelInfos channelInfos)

◆ bdsDumpData()

void Bds::bdsDumpData ( const DataBlock dataBlock,
int  nSamples 
)

◆ bdsDumpDataInfo()

void Bds::bdsDumpDataInfo ( DataInfo  dataInfo,
int  includeInfo 
)

◆ bdsDumpPoleZeros()

void Bds::bdsDumpPoleZeros ( PoleZero  poleZeros)

◆ bdsDumpSelection()

void Bds::bdsDumpSelection ( Selection  sel)

◆ bdsFileNameExpand() [1/2]

BString Bds::bdsFileNameExpand ( BString  fileName,
ChannelInfo channelInfo 
)

◆ bdsFileNameExpand() [2/2]

BString Bds::bdsFileNameExpand ( BString  fileName,
ChannelInfos channelInfos 
)

◆ bdsInfoFromDataInfo()

BError Bds::bdsInfoFromDataInfo ( const DataInfo dataInfo,
BDictString info 
)

◆ bdsPoleZeroGain()

double Bds::bdsPoleZeroGain ( const PoleZero poleZero,
double  frequency 
)

Calculates the overal gain of the given PoleZero transfer function.

◆ bdsPoleZeroGainPhase()

void Bds::bdsPoleZeroGainPhase ( const PoleZero poleZero,
double  frequency,
double &  gain,
double &  phase 
)

Calculates the overal gain and phase of the given PoleZero transfer function.

◆ bdsPoleZeroToFap()

void Bds::bdsPoleZeroToFap ( const PoleZero poleZero,
BUInt  nPoints,
double  calibrationFrequency,
double  sampleFrequency,
BArray< Fap > &  fap 
)

Convert PoleZero to FAP.

◆ bdsSelectionChannelInfo()

BString Bds::bdsSelectionChannelInfo ( const Selection selection,
BUInt  channel 
)

◆ bdsStationAlias()

BString Bds::bdsStationAlias ( Station  station)

◆ bdsUnCompressCm8()

BError Bds::bdsUnCompressCm8 ( BUInt8 buffer,
BUInt  n,
BArray< BInt32 > &  data 
)

◆ bdsUnCompressSteim1()

BError Bds::bdsUnCompressSteim1 ( BUInt8 buffer,
BUInt  n,
BArray< BInt32 > &  data 
)

◆ crc()

BUInt32 Bds::crc ( BUInt32  crc,
void *  data,
int  numBytes 
)

◆ crc64()

static uint64_t Bds::crc64 ( const void *  buffer,
const uint32_t  len 
)
static

◆ crcInit()

static void Bds::crcInit ( )
static

◆ dataCalculateDifference()

void Bds::dataCalculateDifference ( BInt32 prevValue,
BArray< BInt32 > &  data 
)

◆ dataCalculateUnDifference()

void Bds::dataCalculateUnDifference ( BInt32 prevValue,
BArray< BInt32 > &  data 
)

◆ dataChecksum()

BInt32 Bds::dataChecksum ( BInt32  checksum,
BArray< BInt32 > &  data 
)

◆ dataCompressCm6()

BError Bds::dataCompressCm6 ( int &  prevValue1,
int &  prevValue2,
BArray< BInt32 > &  data,
BString d 
)

◆ dataConvert()

static void Bds::dataConvert ( const BArray< BFloat64 > &  dataIn,
BArray< BInt32 > &  dataOut 
)
static

◆ dataDeCompressCm6()

BError Bds::dataDeCompressCm6 ( int &  prevValue1,
int &  prevValue2,
BString d,
BArray< BInt32 > &  data 
)

◆ duplicateDump()

int Bds::duplicateDump ( DataBlock data1,
DataBlock data2,
int  channel 
)

◆ fileNameTime()

static BString Bds::fileNameTime ( BTimeStamp  t)
static

◆ fixedString()

static BError Bds::fixedString ( double  v,
int  fieldWidth,
int  numDecimal,
BString str 
)
static

◆ fixedWidthValue()

BString Bds::fixedWidthValue ( double  v,
int  width 
)

◆ getHexString()

BString Bds::getHexString ( char *  data,
int  len 
)

◆ nullString()

static BString Bds::nullString ( BString  s)
static

◆ removeCR()

static BString Bds::removeCR ( BString  str)
static

◆ stringFormat()

static BString Bds::stringFormat ( BTimeStamp  t)
static

Variable Documentation

◆ apiVersion

const BUInt32 Bds::apiVersion = 0

◆ BdsVersion

const BString Bds::BdsVersion = "1.2.0"

◆ ChannelAuxLen

const int Bds::ChannelAuxLen = 2

◆ ChannelTypeLen

const int Bds::ChannelTypeLen = 3

◆ cm6Table

char Bds::cm6Table[64]
static
Initial value:
= {
'+', '-', '0', '1', '2', '3', '4', '5',
'6', '7', '8', '9', 'A', 'B', 'C', 'D',
'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b',
'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z'
}

◆ cm6TableRev

BUInt8 Bds::cm6TableRev[128]
static
Initial value:
= {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0x00, 0xff, 0x01, 0xff, 0xff,
0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
0x0a, 0x0b, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12,
0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a,
0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22,
0x23, 0x24, 0x25, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c,
0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34,
0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c,
0x3d, 0x3e, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff,
}

◆ crcInitDone

int Bds::crcInitDone
static

◆ crcVec

uint64_t Bds::crcVec[256]
static

◆ dataFormats

DataFormats Bds::dataFormats

◆ NetworkNameLen

const int Bds::NetworkNameLen = 3

◆ Scale

const double Bds::Scale = 16777216.0

◆ SourceLen

const int Bds::SourceLen = 16

◆ StationNameLen

const int Bds::StationNameLen = 5