BDS Public
BdsApi 4.0.1
This is the Blacknest BDS API.
Loading...
Searching...
No Matches
Bds Namespace Reference

Classes

class  AccessGroup
 This holds information on data access groups. More...
 
class  AdminAccess
 This is the AdminAccess Access API interface. More...
 
class  ArrayChannel
 This class defines an array's channel. More...
 
struct  BdsDataBlock
 BdsDataFileBds: internal fixed size BDS Data Block. More...
 
struct  BdsDataBlockHeader
 BdsDataFileBds: internal fixed size BDS Data Block header. More...
 
class  BdsDataBlockPos
 BdsDataFileBds: internal file storage data block position. More...
 
class  BdsDataPacket
 BdsDataFileBds: internal file storage packet. More...
 
struct  BdsDataPacketHeader
 BdsDataFileBds internal file storage packet header. More...
 
class  BdsDataSegment
 BdsDataFileBds: internal file storage data segment. More...
 
class  BdsDataStreamlet
 BdsDataFileBds: internal file storage data streamlet. More...
 
class  BdsSeedType
 BdsDataFileSeed internal parent for all SEED types. More...
 
class  Calibration
 This class defines a calibration setting. More...
 
struct  CdChannel_1v0
 BdsDataFile: Internal CD1.0 channel information. More...
 
class  CdDataChannel
 BdsDataFile: Internal CD channel information. More...
 
struct  CdDataFormatFrame_1v0
 BdsDataFile: Internal CD1.0 frame information. More...
 
class  CdFlag
 BdsDataFile: Internal CD flag. More...
 
class  CdPacketData
 BdsDataFile: Internal CD data packet. More...
 
class  Change
 This holds information on a Medatdata or Sensor data database change. More...
 
class  ChangeGroup
 This holds information on a set of Changes. More...
 
class  Channel
 This class defines a seismic data Channel. More...
 
class  ChannelInfo
 This class provides full Metadata information on a channel. More...
 
class  ChannelInfos
 This class provides Metadata information on a set of channels. More...
 
class  ChannelInstrument
 This class defines a Channel's instrument. More...
 
class  ChannelName
 This class defines a full channel name. More...
 
class  CleanOptions
 This defines the set of clean options used in the clean() function. More...
 
class  CompressSteim1
 Steim1 un-compress class. More...
 
class  DataAccess
 This is the Data Access API interface to the BDS system. More...
 
class  DataAddAccess
 This is the DataAdd Access API interface. More...
 
class  DataAvail
 This class provides availability information on a particular period of data. More...
 
class  DataAvailChan
 This class defines avaiilablity information on a set of data. More...
 
class  DataBlock
 This class provides the actual Sensor data values contained within a single data block. More...
 
class  DataBlockChannel
 This class provides the actual seismic data values contained within a single data block along with the network:station:channel:source information. More...
 
class  DataBlockPos
 This defines the position of a data block in a file. It is used by the BDS data converters to order blocks by time. More...
 
class  DataChannel
 This class defines information on a single channel's set of data stored in a file. More...
 
class  DataCollate
 Not sure if this is used or what it does. More...
 
class  DataError
 This stores a data error. It includes and error number and a string as well as information on what seismic channel it is for. More...
 
class  DataFile
 This class defines the interface for generic data file access that all of the BDS data converters share. More...
 
class  DataFileAd22
 Data file convertor for AD22 format files. More...
 
class  DataFileAscii
 Data file convertor for ASCII format files. More...
 
class  DataFileBdrs
 Data file convertor for BDRS format files. More...
 
class  DataFileBds
 This class implements the BDS Data File/Stream access system. More...
 
class  DataFileBknas
 Data file convertor for BKNAS format files. More...
 
class  DataFileCd
 Data file convertor for CD1.0 and CD1.1 file formats. More...
 
class  DataFileCss
 Data file convertor for CSS format files. More...
 
class  DataFileCssData
 DataFileCss internal CSS data type. More...
 
class  DataFileGcf
 Data file convertor for GCF format files. More...
 
class  DataFileIdc
 This class defines the interface for IDC response data file access. More...
 
class  DataFileIms
 Data file convertor for IMS format files. More...
 
class  DataFileInfo
 This class defines information on a Sensor data file. More...
 
class  DataFileLac
 Data file convertor for LAC format files. More...
 
class  DataFileLog
 Data file convertor for LOG format files. More...
 
class  DataFileOptions
 This defines a list of BDS data converter options. More...
 
class  DataFileResponse
 This class defines the interface for generic response data file access. More...
 
class  DataFileSac
 Data file convertor for SAC format files. More...
 
class  DataFileSeed
 Data file convertor for SEED file formats. More...
 
class  DataFileStationXml
 This class defines the interface for generic response data file access. More...
 
class  DataFileTapeDigitiser
 This class implements the TapeDigitiser's file output conversion and storing system. More...
 
class  DataFileWra
 Data file convertor for WRA format files. More...
 
class  DataFileWraAgso
 Data file convertor for WRA AGSO format files. More...
 
class  DataFormat
 This holds information on a Sensor data format. More...
 
class  DataFormatAll
 This class defines the interface for generic data file access. More...
 
class  DataHandle
 This defines a handle to a sensor data stream/file when opened for read or write. More...
 
class  DataInfo
 This class defines information on a set of data. More...
 
class  Digitiser
 This class defines a seismic Digitiser. More...
 
class  Event
 This class defines a seismic event. More...
 
class  Fap
 This class defines an entry in an Amplitude/Phase Response table. More...
 
class  Fir
 This class defines an FIR response table. More...
 
class  FirEntry
 This class defines an entry in a FIR coefficient table. More...
 
struct  GcfChannel
 DataFileGcf internal GCF channel information. More...
 
class  Group
 This holds information on a User security group. More...
 
class  ListRange
 This class defines an integer based range. More...
 
class  Location
 This class defines the physical location of a Station. More...
 
class  Log
 This holds information on a Log entry. More...
 
class  LogSelect
 This defines the selection cirteria when requesting a set of log entries. More...
 
class  Network
 This class defines a seismic Network organisation. More...
 
class  Note
 This holds information on a Note for general information. More...
 
class  Point
 This class defines an X,Y location. More...
 
class  PoleZero
 This class defines a Pole/Zero Response. More...
 
class  Polynomial
 This class defines an Polynomial response table. More...
 
class  PolynomialEntry
 This class defines an entry in a Polynomial coefficient table. More...
 
class  Response
 This class defines a seismic Response characteristic. More...
 
class  ResponseObj
 Response object adding string conversion. More...
 
class  Selection
 This class defines a generic Metadata or Sensor data selection. More...
 
class  SelectionChannel
 This class defines an idividual channel for selection. More...
 
class  SelectionInfo
 This class defines the set of Metadata or Siesmic sensor data to be selected when getSelectionInfo() is use. More...
 
class  Sensor
 This class defines a seismic Sensor. More...
 
class  Source
 This class defines a seismic data Source. More...
 
class  SourcePriority
 This class defines a Source Priority entry. More...
 
class  SpecialChannel
 A Special channel identifier. More...
 
class  Station
 This class defines a seismic station. More...
 
class  TimePeriod
 This class defines a TimePeriod. More...
 
class  User
 This holds information on a user. More...
 

Typedefs

typedef BList< DataFormatDataFormats
 A list of the available Sensor data formats.
 

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
}
 The System Error number list in addition to standard system error numbers. More...
 
enum  Priority { PriorityLow , PriorityNormal , PriorityHigh }
 Priority levels. More...
 
enum  Mode { ModeMaster , ModeSlave }
 BdsServer mode. More...
 
enum  DataFlags {
  DataFlagNone = 0x00 , DataFlagClipDataToTime = 0x01 , DataFlagClipDataToChannels = 0x02 , DataFlagMergeSegments = 0x04 ,
  DataFlagNoMetadata = 0x08
}
 Flags when opening data files. More...
 
enum  SelectionGroup { SelectionGroupData , SelectionGroupMetaData , SelectionGroupDataWithCount }
 The Selection group when making selections. More...
 
enum  SampleFormat {
  SampleFormatUnknown , SampleFormatInt16 , SampleFormatInt32 , SampleFormatFloat32 ,
  SampleFormatFloat64 , SampleFormatInt24
}
 The actual format of a data sample. More...
 
enum  AvailType { AvailNone , AvailPartial , AvailFull }
 A flag defining the data availability state. More...
 
enum  DataFormatSet {
  DataFormatSetNone = 0x00 , DataFormatSetMetadataRead = 0x01 , DataFormatSetMetadataWrite = 0x02 , DataFormatSetSensordataRead = 0x04 ,
  DataFormatSetSensordataWrite = 0x08
}
 Data format abilities bitset. More...
 
enum  LocationSelect { LocationSelectAll , LocationSelectStation , LocationSelectChannel }
 Which Locations to select. More...
 
enum  MetadataOption { MetadataOptionNone = 0x00 , MetadataOptionAllowIncomplete = 0x01 , MetadataOptionAllTime = 0x02 , MetadataOptionFixedChannels = 0x04 }
 Metadata fetch options. More...
 
enum  BdsDataType { BdsDataTypeBlock = 0x42534442 , BdsDataTypeInfo = 0x30534442 , BdsDataTypeData = 0x31534442 , BdsDataTypeInfoExtra = 0x32534442 }
 BdsDataFileBds: internal file block type field. More...
 
enum  FileHeaderType { FileHeaderType_Standard = 1 , FileHeaderType_TapeDigitiser = 10 }
 
enum  FileSampleType {
  FileSampleType_Unknown , FileSampleType_Float32 , FileSampleType_Float64 , FileSampleType_Int16 ,
  FileSampleType_Int32
}
 

Functions

BError bdsLibInit (DataAccess &bds)
 Initialise the bdsLib with settings from the BdsServer.
 
BError bdsLibInit (DataAddAccess &bds)
 Initialise the bdsLib with settings from the BdsServer.
 
BError bdsLibInit (AdminAccess &bds)
 Initialise the bdsLib with settings from the BdsServer.
 
void bdsDumpPoleZeros (PoleZero poleZeros)
 Debug print out a PoleZeros object.
 
void bdsChannelGetTypeAux (BString name, BString &type, BString &aux)
 Get the channel type and aux fields from a generic channel name.
 
BString bdsChannelGetName (BString type, BString aux)
 Create a full channel name from a channels type and aux fields.
 
BError bdsDataInfoSetTimeRange (DataInfo &dataInfo)
 Restricts the time tange of all of the DataInfo's channels to match the DataInfo's startTime/endTime fields.
 
BError bdsDataInfoFromInfo (BDictString info, DataInfo &dataInfo, Bool append)
 Convert info to DataInfo.
 
BError bdsInfoFromDataInfo (const DataInfo &dataInfo, BDictString &info)
 Converts a DataInfo object into a BDictString list of named strings.
 
BError bdsDataInfoFlatten (DataInfo &dataInfo)
 Flattens a DataInfo to 1 segement per channel for use in dataOpen() calls.
 
BError bdsDataInfoMergeFlatten (DataInfo &dataInfo, const DataInfo &dataInfoAdd)
 Merges a DataInfo into another flattening the segments to 1 for use in dataOpen() calls.
 
BString bdsUnitsConvert (BString units)
 Tidy up units name to standard SI units format.
 
BError bdsDataInfoFromChannelInfos (const ChannelInfos &channelInfos, DataInfo &dataInfo)
 Sets up a Datainfo object from ChannelInfos.
 
static int responseSort (Response &a, Response &b)
 
BError bdsMetadataImportFix (ChannelInfos &channelInfos, BString &changedMessage, Bool stageRenumber)
 Fix up ChannelInfos from import. Mainly making sure response stages and their units are correct.
 
BError bdsMetadataExportFix (ChannelInfos &channelInfos, BString &changedMessage, Bool singleResponse, Bool stageRenumber, Bool changeUnits, Bool stageGains, Bool decimation, Bool toDisplacement, Bool toNm)
 Fix up ChannelInfos for export. Mainly making sure response stages and their units are correct.
 
BString bdsStationAlias (Station station)
 Returns the station alias if set else its name.
 
void bdsDumpSelection (Selection sel)
 Debug print out a Selection object.
 
void bdsDumpSelectionInfo (SelectionInfo sel)
 Debug print out a SelectionInfo object.
 
void bdsDumpDataInfo (DataInfo dataInfo, int includeInfo=0)
 Debug print out a DataInfo object.
 
void bdsDumpChannelInfos (const ChannelInfos &channelInfos)
 Debug print out a ChannelInfos object.
 
void bdsDumpData (const DataBlock &dataBlock, int nSamples=0)
 Debug print out a DataBlock object.
 
void bdsDumpLocation (Location location)
 Debug printout location.
 
BString bdsDataChannelInfo (const DataChannel &dataChannel)
 Returns a string representation of a DataChannel object.
 
BString bdsDataChannelRef (const DataChannel &dataChannel)
 Returns the string reference name of a DataChannel object.
 
BString bdsDataChannelRef (const ChannelInfo &channelInfo)
 Returns the string reference name of a ChannelInfo object.
 
BError bdsDataChannelOverallResponse (const ChannelInfo &channelInfo, Response &response)
 Returns the overal response from the list of responses in a ChannelInfo.
 
BString bdsSelectionChannelInfo (const Selection &selection, BUInt channel)
 Returns a string describing the name and time period of a selection channel.
 
double bdsPoleZeroGain (const PoleZero &poleZero, double frequency)
 Calculates the overall gain of the given PoleZero transfer function.
 
void bdsPoleZeroGainPhase (const PoleZero &poleZero, double frequency, double &gain, double &phase)
 Calculates the overall gain and phase of the given PoleZero transfer function.
 
void bdsPoleZeroToFap (const PoleZero &poleZero, BUInt nPoints, double calibrationFrequency, double sampleFrequency, BArray< Fap > &fap)
 Convert PoleZero to FAP.
 
static BString fileNameTime (BTimeStamp t)
 
BString bdsFileNameExpand (BString fileName, ChannelInfo &channelInfo)
 Default filename from a ChannelInfo.
 
BString bdsFileNameExpand (BString fileName, ChannelInfos &channelInfos)
 Default filename from a list of ChannelInfo's.
 
BString bdsFileNameExpand (BString fileName, Selection &sel)
 Default filename from a Selection.
 
void bdsSpecialChannelsSet (const BList< SpecialChannel > specialChannels)
 Set the special channels list.
 
BList< SpecialChannelbdsSpecialChannels ()
 Return list of special channels.
 
Bool bdsSpecialChannelIgnore (BString network, BString station, BString channel)
 Check if channel should be ignored.
 
char seedChannelInstrumentCode (BString dataType)
 Returns SEED instrument code from dataType.
 
BString seedChannelDataType (BString channel)
 Returns dataType from channel name based on SEED channel name convention.
 
BStringList bdsDataTypes ()
 Returns all known data types.
 
BStringList bdsUnits ()
 Returns all known SI units.
 
BString bdsUnitCase (BString unit)
 Converts character case of units.
 
BError bdsUnCompressCm8 (BUInt8 *buffer, BUInt n, BArray< BInt32 > &data)
 Uncompress CM8 formatted data.
 
BError bdsUnCompressSteim1 (BUInt8 *buffer, BUInt n, BArray< BInt32 > &data)
 Uncompress STEIM1 formatted 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 unitsCode (Response &r)
 
static BString stringFormat (BTimeStamp t)
 
static BString removeCR (BString str)
 
BString fixedWidthValue (double v, int width)
 This returns a double as a fixed width string truncating the data.
 
static double roundDigits (double v, int nDigits)
 
static void bdsDataFileSeedLogWarning (char *str)
 
static void bdsDataFileSeedLogError (char *str)
 
static hptime_t seedTime (BTimeStamp t)
 
static BString seedTimeString (BTimeStamp t)
 
static BTimeStamp fromSeedTimeString (BString str)
 
static void dataConvert (const BArray< BFloat64 > &dataIn, BArray< BInt32 > &dataOut)
 
static void dataConvert (const BArray< BFloat64 > &dataIn, BArray< BFloat32 > &dataOut)
 
static void record_handler (char *record, int reclen, void *info)
 

Variables

const BUInt32 apiVersion = 0
 
static BList< SpecialChannelbdsSpecialChannelsList
 
SeedICodeToDataType seedICodeToDataTypes []
 
const int NetworkNameLen = 3
 Maximum Network name length.
 
const int StationNameLen = 5
 Maximum Station name length.
 
const int ChannelTypeLen = 3
 Maximum Channel type name length.
 
const int ChannelAuxLen = 2
 Maximum Channel Aux length.
 
const int SourceLen = 16
 Maximum Source length.
 
const BString BdsDataFileVersion = "1.2.0"
 
static uint64_t crcVec [256]
 
static int crcInitDone
 
static char cm6Table [64]
 
static BUInt8 cm6TableRev [128]
 
const char * node_types []
 
const double Scale = 16777216.0
 
DataFormatAll dataFormatAll
 

Typedef Documentation

◆ DataFormats

A list of the available Sensor data formats.

Enumeration Type Documentation

◆ Errors

The System Error number list in addition to standard system error numbers.

Enumerator
ErrorNoMetaData 

No Metadata is available

ErrorDataQuality 

Data quality error

ErrorSlaveMode 

BdsServer is in slave mode

ErrorTimeStamp 

Timestamp invalid

ErrorValidate 

A validation error occured

ErrorValidateMissingBlocks 

Validation found missing blocks

ErrorValidateTimeBackwards 

Validation found the time went backwards between blocks

ErrorValidateFilenameTime 

Validation of the file name failed

ErrorValidateMetaData 

There was no Metadata available

ErrorValidateFix 

Validation has fixed some issues

ErrorValidateDuplicate 

Validation has found duplicate blocks

ErrorValidateReorder 

Validation has re-orderd blocks

ErrorValidateBdsFudge 

Special BDS SensorData/Metadata changes have been applied

◆ Priority

Priority levels.

Enumerator
PriorityLow 

The lowest priority level

PriorityNormal 

The normal priority level

PriorityHigh 

The highest priority level

◆ Mode

enum Bds::Mode

BdsServer mode.

Enumerator
ModeMaster 

BdsServer is a master

ModeSlave 

BdsServer is a slave

◆ DataFlags

Flags when opening data files.

Enumerator
DataFlagNone 

No data flags

DataFlagClipDataToTime 

Clip the data to the time period requested so that data begins and ends with the sample at the requested time. Normally the BDS will return data beginning at the startTime of the data block in which the user startTime occurred and the endTime of the block that the user supplied endTime occurs so that complete original data blocks are returned.

DataFlagClipDataToChannels 

When requesting data from a number of channels the start and end times per channel may be different due to missing blocks or other reasons. This option asks the BDS to truncate the data so that all channels start and end with the sample timed sample.

DataFlagMergeSegments 

Data will normally be segmented at file boundaries. This option merges these segments assuming the start/end times match.

DataFlagNoMetadata 

Don't include Metadata in export data files.

◆ SelectionGroup

The Selection group when making selections.

Enumerator
SelectionGroupData 

Select items from Sensor data

SelectionGroupMetaData 

Select items from Metadata

SelectionGroupDataWithCount 

Select items from Sensor data ancd return the number of items found

◆ SampleFormat

The actual format of a data sample.

Enumerator
SampleFormatUnknown 

Unknown sample format

SampleFormatInt16 

16 bit signed integer format

SampleFormatInt32 

32 bit signed integer format

SampleFormatFloat32 

IEEE 32 bit floating point format

SampleFormatFloat64 

IEEE 64 bit floating point format

SampleFormatInt24 

24 bit signed integer format

◆ AvailType

A flag defining the data availability state.

Enumerator
AvailNone 

There is no data available

There is full data available

AvailPartial 

There is partial data available

AvailFull 

There is no data available

◆ DataFormatSet

Data format abilities bitset.

The data convertors supported Metadata and Sensordata abilities

Enumerator
DataFormatSetNone 

Does not support and type of Metadata or Sensordata

DataFormatSetMetadataRead 

Supports the reading of Metadata

DataFormatSetMetadataWrite 

Supports the writing of Metadata

DataFormatSetSensordataRead 

Supports the reading of Sensordata

DataFormatSetSensordataWrite 

Supports the writing of Sensordata

◆ LocationSelect

Which Locations to select.

Enumerator
LocationSelectAll 
LocationSelectStation 
LocationSelectChannel 

◆ MetadataOption

Metadata fetch options.

Options when fetching sets of Metadata from BdsServer

Enumerator
MetadataOptionNone 

No special options

MetadataOptionAllowIncomplete 

If there is missing Metadata, just return a warning rather than an error

MetadataOptionAllTime 
MetadataOptionFixedChannels 

The FixedChannels option indicates to get Metadata in order of selection channels assuming there are no wild cards

◆ BdsDataType

BdsDataFileBds: internal file block type field.

Enumerator
BdsDataTypeBlock 
BdsDataTypeInfo 
BdsDataTypeData 
BdsDataTypeInfoExtra 

◆ FileHeaderType

Enumerator
FileHeaderType_Standard 
FileHeaderType_TapeDigitiser 

◆ FileSampleType

Enumerator
FileSampleType_Unknown 
FileSampleType_Float32 
FileSampleType_Float64 
FileSampleType_Int16 
FileSampleType_Int32 

Function Documentation

◆ bdsLibInit() [1/3]

BError Bds::bdsLibInit ( DataAccess bds)

Initialise the bdsLib with settings from the BdsServer.

◆ bdsLibInit() [2/3]

BError Bds::bdsLibInit ( DataAddAccess bds)

Initialise the bdsLib with settings from the BdsServer.

◆ bdsLibInit() [3/3]

BError Bds::bdsLibInit ( AdminAccess bds)

Initialise the bdsLib with settings from the BdsServer.

◆ bdsDumpPoleZeros()

void Bds::bdsDumpPoleZeros ( PoleZero  poleZeros)

Debug print out a PoleZeros object.

◆ bdsChannelGetTypeAux()

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

Get the channel type and aux fields from a generic channel name.

Parameters
[in]nameThe channels full name
[out]typeReturns the type component of the channel's name
[out]auxReturns the aux component of the channel's name

◆ bdsChannelGetName()

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

Create a full channel name from a channels type and aux fields.

◆ bdsDataInfoSetTimeRange()

BError Bds::bdsDataInfoSetTimeRange ( DataInfo dataInfo)

Restricts the time tange of all of the DataInfo's channels to match the DataInfo's startTime/endTime fields.

◆ bdsDataInfoFromInfo()

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

Convert info to DataInfo.

Sets up a DataInfo object from a BDictString list of named strings.

◆ bdsInfoFromDataInfo()

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

Converts a DataInfo object into a BDictString list of named strings.

◆ bdsDataInfoFlatten()

BError Bds::bdsDataInfoFlatten ( DataInfo dataInfo)

Flattens a DataInfo to 1 segement per channel for use in dataOpen() calls.

◆ bdsDataInfoMergeFlatten()

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

Merges a DataInfo into another flattening the segments to 1 for use in dataOpen() calls.

◆ bdsUnitsConvert()

BString Bds::bdsUnitsConvert ( BString  units)

Tidy up units name to standard SI units format.

◆ bdsDataInfoFromChannelInfos()

BError Bds::bdsDataInfoFromChannelInfos ( const ChannelInfos channelInfos,
DataInfo dataInfo 
)

Sets up a Datainfo object from ChannelInfos.

◆ responseSort()

static int Bds::responseSort ( Response a,
Response b 
)
static

◆ bdsMetadataImportFix()

BError Bds::bdsMetadataImportFix ( ChannelInfos channelInfos,
BString changedMessage,
Bool  stageRenumber 
)

Fix up ChannelInfos from import. Mainly making sure response stages and their units are correct.

◆ bdsMetadataExportFix()

BError Bds::bdsMetadataExportFix ( ChannelInfos channelInfos,
BString changedMessage,
Bool  singleResponse,
Bool  stageRenumber,
Bool  changeUnits,
Bool  stageGains,
Bool  decimation,
Bool  toDisplacement,
Bool  toNm 
)

Fix up ChannelInfos for export. Mainly making sure response stages and their units are correct.

◆ bdsStationAlias()

BString Bds::bdsStationAlias ( Station  station)

Returns the station alias if set else its name.

◆ bdsDumpSelection()

void Bds::bdsDumpSelection ( Selection  sel)

Debug print out a Selection object.

◆ bdsDumpSelectionInfo()

void Bds::bdsDumpSelectionInfo ( SelectionInfo  sel)

Debug print out a SelectionInfo object.

◆ bdsDumpDataInfo()

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

Debug print out a DataInfo object.

◆ bdsDumpChannelInfos()

void Bds::bdsDumpChannelInfos ( const ChannelInfos channelInfos)

Debug print out a ChannelInfos object.

◆ bdsDumpData()

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

Debug print out a DataBlock object.

◆ bdsDumpLocation()

void Bds::bdsDumpLocation ( Location  location)

Debug printout location.

◆ bdsDataChannelInfo()

BString Bds::bdsDataChannelInfo ( const DataChannel dataChannel)

Returns a string representation of a DataChannel object.

◆ bdsDataChannelRef() [1/2]

BString Bds::bdsDataChannelRef ( const DataChannel dataChannel)

Returns the string reference name of a DataChannel object.

◆ bdsDataChannelRef() [2/2]

BString Bds::bdsDataChannelRef ( const ChannelInfo channelInfo)

Returns the string reference name of a ChannelInfo object.

◆ bdsDataChannelOverallResponse()

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

Returns the overal response from the list of responses in a ChannelInfo.

◆ bdsSelectionChannelInfo()

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

Returns a string describing the name and time period of a selection channel.

◆ bdsPoleZeroGain()

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

Calculates the overall gain of the given PoleZero transfer function.

◆ bdsPoleZeroGainPhase()

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

Calculates the overall 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.

◆ fileNameTime()

static BString Bds::fileNameTime ( BTimeStamp  t)
static

◆ bdsFileNameExpand() [1/3]

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

Default filename from a ChannelInfo.

◆ bdsFileNameExpand() [2/3]

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

Default filename from a list of ChannelInfo's.

◆ bdsFileNameExpand() [3/3]

BString Bds::bdsFileNameExpand ( BString  fileName,
Selection sel 
)

Default filename from a Selection.

◆ bdsSpecialChannelsSet()

void Bds::bdsSpecialChannelsSet ( const BList< SpecialChannel specialChannels)

Set the special channels list.

◆ bdsSpecialChannels()

BList< SpecialChannel > Bds::bdsSpecialChannels ( )

Return list of special channels.

◆ bdsSpecialChannelIgnore()

Bool Bds::bdsSpecialChannelIgnore ( BString  network,
BString  station,
BString  channel 
)

Check if channel should be ignored.

◆ seedChannelInstrumentCode()

char Bds::seedChannelInstrumentCode ( BString  dataType)

Returns SEED instrument code from dataType.

◆ seedChannelDataType()

BString Bds::seedChannelDataType ( BString  channel)

Returns dataType from channel name based on SEED channel name convention.

◆ bdsDataTypes()

BStringList Bds::bdsDataTypes ( )

Returns all known data types.

◆ bdsUnits()

BStringList Bds::bdsUnits ( )

Returns all known SI units.

◆ bdsUnitCase()

BString Bds::bdsUnitCase ( BString  unit)

Converts character case of units.

◆ bdsUnCompressCm8()

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

Uncompress CM8 formatted data.

◆ bdsUnCompressSteim1()

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

Uncompress STEIM1 formatted data.

◆ nullString()

static BString Bds::nullString ( BString  s)
static

◆ crc()

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

◆ crcInit()

static void Bds::crcInit ( )
static

◆ crc64()

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

◆ getHexString()

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

◆ duplicateDump()

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

◆ fixedString()

static BError Bds::fixedString ( double  v,
int  fieldWidth,
int  numDecimal,
BString str 
)
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 
)

◆ dataDeCompressCm6()

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

◆ dataConvert() [1/3]

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

◆ unitsCode()

static BString Bds::unitsCode ( Response r)
static

◆ stringFormat()

static BString Bds::stringFormat ( BTimeStamp  t)
static

◆ removeCR()

static BString Bds::removeCR ( BString  str)
static

◆ fixedWidthValue()

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

This returns a double as a fixed width string truncating the data.

◆ roundDigits()

static double Bds::roundDigits ( double  v,
int  nDigits 
)
static

◆ bdsDataFileSeedLogWarning()

static void Bds::bdsDataFileSeedLogWarning ( char *  str)
static

◆ bdsDataFileSeedLogError()

static void Bds::bdsDataFileSeedLogError ( char *  str)
static

◆ seedTime()

static hptime_t Bds::seedTime ( BTimeStamp  t)
static

◆ seedTimeString()

static BString Bds::seedTimeString ( BTimeStamp  t)
static

◆ fromSeedTimeString()

static BTimeStamp Bds::fromSeedTimeString ( BString  str)
static

◆ dataConvert() [2/3]

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

◆ dataConvert() [3/3]

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

◆ record_handler()

static void Bds::record_handler ( char *  record,
int  reclen,
void *  info 
)
static

Variable Documentation

◆ apiVersion

const BUInt32 Bds::apiVersion = 0

◆ bdsSpecialChannelsList

BList<SpecialChannel> Bds::bdsSpecialChannelsList
static

◆ seedICodeToDataTypes

SeedICodeToDataType Bds::seedICodeToDataTypes[]
Initial value:
= {
{ 'H', "seismic" },
{ 'L', "seismic" },
{ 'G', "seismic" },
{ 'M', "seismic" },
{ 'N', "seismic" },
{ 'Y', "data" },
{ 'A', "tilt" },
{ 'B', "creep" },
{ 'C', "calibration" },
{ 'D', "pressure" },
{ 'E', "testpoint" },
{ 'F', "magnetometer" },
{ 'I', "humidity" },
{ 'J', "rotation" },
{ 'K', "temperature" },
{ 'O', "waterCurrent" },
{ 'P', "geophone" },
{ 'Q', "voltage" },
{ 'R', "rainfall" },
{ 'S', "linearStrain" },
{ 'T', "tide" },
{ 'U', "bolometer" },
{ 'V', "volumetricStrain" },
{ 'W', "wind" },
{ 'X', "generated" },
{ 'Z', "beam" },
{ 0, 0 }
}

◆ NetworkNameLen

const int Bds::NetworkNameLen = 3

Maximum Network name length.

◆ StationNameLen

const int Bds::StationNameLen = 5

Maximum Station name length.

◆ ChannelTypeLen

const int Bds::ChannelTypeLen = 3

Maximum Channel type name length.

◆ ChannelAuxLen

const int Bds::ChannelAuxLen = 2

Maximum Channel Aux length.

◆ SourceLen

const int Bds::SourceLen = 16

Maximum Source length.

◆ BdsDataFileVersion

const BString Bds::BdsDataFileVersion = "1.2.0"

◆ crcVec

uint64_t Bds::crcVec[256]
static

◆ crcInitDone

int Bds::crcInitDone
static

◆ 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,
}

◆ node_types

const char* Bds::node_types[]
Initial value:
= {
"null", "document", "element", "pcdata", "cdata", "comment", "pi", "declaration"
}

◆ Scale

const double Bds::Scale = 16777216.0

◆ dataFormatAll

DataFormatAll Bds::dataFormatAll