BdsApi  2.0.11
Classes | Enumerations | Functions | Variables
Bds Namespace Reference

Classes

class  DataAccess
 
class  DataAddAccess
 This is the DataAdd Access API interface. More...
 
class  AdminAccess
 This is the AdminAccess API interface. More...
 
class  Point
 
class  TimePeriod
 
class  ListRange
 This class defines a TimePeriod. More...
 
class  Network
 This class defines a Network organisation. Could have other information here like website, contacts etc. More...
 
class  Source
 This class defines a Source. More...
 
class  SourcePriority
 This class defines a Source Order entry. More...
 
class  ArrayChannel
 This class defines an arrays channel. More...
 
class  Station
 
class  Location
 This class defines a Location. This will be the stations location. More...
 
class  PoleZero
 This class defines a Pole/Zero Response. More...
 
class  Fap
 This class defines a Amplitude/Phase Response. More...
 
class  FirEntry
 This class defines a Pole/Zero Response. More...
 
class  Fir
 This class defines a Pole/Zero Response. More...
 
class  Response
 This class defines a Response. More...
 
class  Calibration
 This class defines a calibration setting. More...
 
class  Digitiser
 This class defines a Digitiser. More...
 
class  Sensor
 This class defines a Sensor. More...
 
class  ChannelInstrument
 This class defines a Channel to Digitiser/Sensor linkage. More...
 
class  Channel
 This class defines a Channel. More...
 
class  SelectionInfo
 This class defines the set of data selection critera. More...
 
class  SelectionChannel
 
class  Selection
 
class  ChannelInfo
 
class  ChannelInfos
 This class provides information on a set of channels. More...
 
class  DataFileInfo
 This class defines information on a data file. More...
 
class  DataChannel
 
class  DataInfo
 
class  DataHandle
 This defines a handle to a data stream/file. More...
 
class  DataBlock
 
class  User
 This holds information on a user. More...
 
class  Group
 This holds information on a groups. More...
 
class  AccessGroup
 This holds information on data access groups. More...
 
class  Change
 This holds information on a change. More...
 
class  ChangeGroup
 This holds information on a change. More...
 
class  Note
 This holds information on a Note. More...
 
class  Log
 This holds information on a Note. More...
 
class  LogSelect
 This is used for requesting log entries. More...
 
class  CleanOptions
 This is the clean options. More...
 
class  DataFormat
 This holds information on a data format. More...
 
class  DataChannelInfo
 This class defines information on a data channel. More...
 
class  ResponseEdit
 Response Editor object. More...
 
class  DataError
 
class  CompressSteim1
 
class  DataCollate
 This class defines the interface for generic data file access. More...
 
class  DataBlockPos
 
class  DataFileOptions
 
class  DataFile
 This class defines the interface for generic data file access. More...
 
class  DataFileAd22
 
class  DataFileAscii
 
class  DataFileBdrs
 
struct  BdsDataBlockHeader
 
struct  BdsDataBlock
 
struct  BdsDataPacketHeader
 
class  BdsDataPacket
 
class  BdsDataStreamlet
 
class  BdsDataSegment
 
class  BdsDataBlockPos
 
class  DataFileBds
 This class implements the BDS Data File/Stream access system. More...
 
class  DataFileBknas
 
struct  DataFrameHead_1v0
 
struct  DataSubFrameHead_1v0
 
struct  Header_1v0
 
struct  Header_1v1
 
struct  Trailer
 
struct  CdChannel_1v0
 
struct  CdDataFormatFrame_1v0
 
class  CdDataChannel
 
class  CdPacketData
 
class  CdFlag
 
class  DataFileCd
 
class  DataFileCssData
 
class  DataFileCss
 
struct  GcfChannel
 
class  DataFileGcf
 
class  DataFileIms
 
class  DataFileLac
 
class  DataFileLog
 
class  DataFileResponse
 This class defines the interface for generic responese data file access. More...
 
class  DataFileSac
 
struct  FileDataHeaderTape_1v1
 
struct  FileDataHeaderTape_2v0
 
class  DataFileTapeDigitiser
 This class implements the TapeDigitiser's file output conversion and storeing system. More...
 
class  DataFileWra
 
class  DataFileWraAgso
 
class  DataFormats
 This class defines the interface for generic data file access. 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
}
 The System Error List. More...
 
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  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)
 Convert info to DataInfo. More...
 
BError bdsInfoFromDataInfo (DataInfo &dataInfo, BDictString &info)
 
BString bdsStationAlias (Station station)
 
void bdsDumpSelection (Selection sel)
 
void bdsDumpDataInfo (DataInfo dataInfo, int includeInfo)
 
void bdsDumpChannelInfos (ChannelInfos &channelInfos)
 
void bdsDumpData (DataBlock &dataBlock, int nSamples)
 
BString bdsDataChannelInfo (DataChannel &dataChannel)
 
BString bdsDataChannelRef (DataChannel &dataChannel)
 
BString bdsDataChannelRef (ChannelInfo &channelInfo)
 
BError bdsDataChannelOverallResponse (ChannelInfo &channelInfo, Response &response)
 
BString bdsSelectionChannelInfo (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 (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.1.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

Enumerator
BdsDataTypeBlock 
BdsDataTypeInfo 
BdsDataTypeData 
BdsDataTypeInfoExtra 
Enumerator
DataFlagNone 
DataFlagClipDataToTime 
DataFlagClipDataToChannels 
DataFlagMergeSegments 
DataFlagNoMetadata 

The System Error List.

Enumerator
ErrorNoMetaData 
ErrorDataQuality 
ErrorSlaveMode 
ErrorTimeStamp 
ErrorValidate 
ErrorValidateMissingBlocks 
ErrorValidateTimeBackwards 
ErrorValidateFilenameTime 
ErrorValidateMetaData 
ErrorValidateFix 
ErrorValidateDuplicate 
ErrorValidateReorder 
ErrorValidateBdsFudge 
Enumerator
FileHeaderType_Standard 
FileHeaderType_TapeDigitiser 
Enumerator
FileSampleType_Unknown 
FileSampleType_Float32 
FileSampleType_Float64 
FileSampleType_Int16 
FileSampleType_Int32 
enum Bds::Mode
Enumerator
ModeMaster 
ModeSlave 
Enumerator
PriorityLow 
PriorityNormal 
PriorityHigh 
Enumerator
SampleFormatUnknown 
SampleFormatInt16 
SampleFormatInt32 
SampleFormatFloat32 
SampleFormatFloat64 
SampleFormatInt24 
Enumerator
SelectionGroupData 
SelectionGroupMetaData 
SelectionGroupDataWithCount 

Function Documentation

BString Bds::bdsChannelGetName ( BString  type,
BString  aux 
)
void Bds::bdsChannelGetTypeAux ( BString  name,
BString &  type,
BString &  aux 
)
BString Bds::bdsDataChannelInfo ( DataChannel &  dataChannel)
BError Bds::bdsDataChannelOverallResponse ( ChannelInfo &  channelInfo,
Response &  response 
)
BString Bds::bdsDataChannelRef ( DataChannel &  dataChannel)
BString Bds::bdsDataChannelRef ( ChannelInfo &  channelInfo)
BError Bds::bdsDataInfoFromInfo ( BDictString  info,
DataInfo &  dataInfo 
)

Convert info to DataInfo.

BError Bds::bdsDataInfoSetTimeRange ( DataInfo &  dataInfo)
void Bds::bdsDumpChannelInfos ( ChannelInfos &  channelInfos)
void Bds::bdsDumpData ( DataBlock &  dataBlock,
int  nSamples 
)
void Bds::bdsDumpDataInfo ( DataInfo  dataInfo,
int  includeInfo 
)
void Bds::bdsDumpPoleZeros ( PoleZero  poleZeros)
void Bds::bdsDumpSelection ( Selection  sel)
BString Bds::bdsFileNameExpand ( BString  fileName,
ChannelInfo &  channelInfo 
)
BString Bds::bdsFileNameExpand ( BString  fileName,
ChannelInfos &  channelInfos 
)
BError Bds::bdsInfoFromDataInfo ( DataInfo &  dataInfo,
BDictString &  info 
)
double Bds::bdsPoleZeroGain ( const PoleZero &  poleZero,
double  frequency 
)

Calculates the overal gain of the given PoleZero transfer function.

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

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

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

Convert PoleZero to FAP.

BString Bds::bdsSelectionChannelInfo ( Selection &  selection,
BUInt  channel 
)
BString Bds::bdsStationAlias ( Station  station)
BError Bds::bdsUnCompressCm8 ( BUInt8 *  buffer,
BUInt  n,
BArray< BInt32 > &  data 
)
BError Bds::bdsUnCompressSteim1 ( BUInt8 *  buffer,
BUInt  n,
BArray< BInt32 > &  data 
)
BUInt32 Bds::crc ( BUInt32  crc,
void data,
int  numBytes 
)
static uint64_t Bds::crc64 ( const void buffer,
const uint32_t  len 
)
static
static void Bds::crcInit ( )
static
void Bds::dataCalculateDifference ( BInt32 &  prevValue,
BArray< BInt32 > &  data 
)
void Bds::dataCalculateUnDifference ( BInt32 &  prevValue,
BArray< BInt32 > &  data 
)
BInt32 Bds::dataChecksum ( BInt32  checksum,
BArray< BInt32 > &  data 
)
BError Bds::dataCompressCm6 ( int &  prevValue1,
int &  prevValue2,
BArray< BInt32 > &  data,
BString &  d 
)
static void Bds::dataConvert ( BArray< BFloat64 > &  dataIn,
BArray< BInt32 > &  dataOut 
)
static
BError Bds::dataDeCompressCm6 ( int &  prevValue1,
int &  prevValue2,
BString &  d,
BArray< BInt32 > &  data 
)
int Bds::duplicateDump ( DataBlock &  data1,
DataBlock &  data2,
int  channel 
)
static BString Bds::fileNameTime ( BTimeStamp  t)
static
static BError Bds::fixedString ( double  v,
int  fieldWidth,
int  numDecimal,
BString &  str 
)
static
BString Bds::fixedWidthValue ( double  v,
int  width 
)
BString Bds::getHexString ( char *  data,
int  len 
)
static BString Bds::nullString ( BString  s)
static
static BString Bds::removeCR ( BString  str)
static
static BString Bds::stringFormat ( BTimeStamp  t)
static

Variable Documentation

const BUInt32 Bds::apiVersion = 0
const BString Bds::BdsVersion = "1.1.0"
const int Bds::ChannelAuxLen = 2
const int Bds::ChannelTypeLen = 3
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'
}
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,
}
int Bds::crcInitDone
static
uint64_t Bds::crcVec[256]
static
DataFormats Bds::dataFormats
const int Bds::NetworkNameLen = 3
const double Bds::Scale = 16777216.0
const int Bds::SourceLen = 16
const int Bds::StationNameLen = 5