DATRW++ library: seismic data I/O with multiple formats
seedstructs.h
Go to the documentation of this file.
1 /*! \file seedstructs.h
2  * \brief structures defined in the SEED (prototypes)
3  *
4  * ----------------------------------------------------------------------------
5  *
6  * \author Thomas Forbriger
7  * \date 16/07/2004
8  *
9  * structures defined in the SEED (prototypes)
10  *
11  * ----
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25  * ----
26  *
27  * Copyright (c) 2004 by Thomas Forbriger (BFO Schiltach)
28  *
29  * REVISIONS and CHANGES
30  * - 16/07/2004 V1.0 Thomas Forbriger
31  * - 28/04/2006 V1.1 long int appears to be of
32  * implementation dependent size
33  * - 09/05/2006 V1.2 introduced Steim 2 code
34  * SteimFrame now does all that Steim1Reader did
35  * - 12/07/2016 V1.3 thof:
36  * - fix [1001] Data Extension Blockette
37  * field 4 (usec) explicitely is signed an can be
38  * negative (see SEED V2.4 Manual, August 2012, page
39  * 124)
40  *
41  * ============================================================================
42  */
43 
44 // include guard
45 #ifndef DATRW_SEEDSTRUCTS_H_VERSION
46 
47 #define DATRW_SEEDSTRUCTS_H_VERSION \
48  "DATRW_SEEDSTRUCTS_H V1.3"
49 
50 namespace datrw {
51 
52  namespace mseed {
53 
54  /*! SEED data structures
55  *
56  * The definitions for data structures are based an the
57  *
58  * Standard for the Exchange of Earthquake Data \n
59  * Refernce Manual \n
60  * SEED Format Version 2.3 \n
61  * February, 1993 \n
62  *
63  * All references initially refer to this manual.
64  *
65  * With SEED V2.4 some of the definitions have changed.
66  * Where changes are applied, they are documented in the comments in the
67  * source code.
68  *
69  * The structure of a data record is given in Fig. 8 in chapter 2.
70  *
71  * A useful command to investigate binary data files is
72  *
73  * od -A x -t x1z filename
74  *
75  * This dumps hex values at hex addresses and adds printable characters to
76  * the end of each line.
77  *
78  * This namespace should contain raw SEED structure. Any structure that
79  * provides additional facilities to read from a file should be placed in
80  * namespace mseed (an thus in a different source file).
81  */
82  namespace SEED {
83 
84  template<class C1, class C2>
85  void copy_from_pointer(C1* target, const C2* p)
86  { *target = *(reinterpret_cast<const C1*>(p)); }
87 
88  /*----------------------------------------------------------------------*/
89 
90  /*! encoding formats
91  *
92  * used in Data Only SEED Blockette
93  * see chapter 8, page 107
94  */
96  ascii=0, //!< ascii text
97  int16=1, //!< 16 bit integer
98  int24=2, //!< 24 bit integer
99  int32=3, //!< 32 bit integer
100  ieeefp=4, //!< IEEE floating point
101  ieeedp=5, //!< IEEE double precision floating point
102  steim1=10, //!< Steim (1) compression
103  steim2=11, //!< Steim (2) compression
104  geoscope24=12, //!< GEOSCOPE multiplexed 24 bit integer
105  geoscope163=13, //!< GEOSCOPE multiplexed 16 bit gain ranged 3 bit exp
106  geoscope164=14, //!< GEOSCOPE multiplexed 16 bit gain ranged 4 bit exp
107  us=15, //!< US national network compression
108  cdsn=16, //!< CDSN 16 bit gain ranged
109  grf=17, //!< Graefenberg 16 bit gain ranged
110  ipg=18, //!< IPG Strasbourg 16 bit gain ranged
111  steim3=19, //!< Steim (3) compression
112  sro=30, //!< SRO format
113  hglp=31, //!< HGLP format
114  dwwssn=32, //!< DWWSSN gain ranged
115  rstn=33 //!< RSTN 16 bit gain ranged
116  }; // EEncodingFormat
117 
118  /*----------------------------------------------------------------------*/
119 
120  /*! byte swapping order
121  *
122  * used in Data Only SEED Blockette
123  * see chapter 8, page 108
124  */
125  enum EByteOrder {
126  vax8086=0, //!< VAX or 8086 byte order
127  sparc68000=1, //!< SPARC or 68000 byte order
128  }; // EByteOrder
129 
130  /*----------------------------------------------------------------------*/
131 
132  /*! a structure to hold any control header
133  *
134  * see chapter 3, page 34 (old SEED manual)
135  * on "How to Assemble Control Headers"
136  *
137  * This structure is used in datrw::mseed::FixedDataRecordHeader
138  *
139  * See recent SEED V2.4 Manual:
140  * see chapter 8, page 108: "Fixed Section of Data Header (48 bytes)"
141  */
142  struct ControlHeader {
144  ControlHeader(const char* p) { copy_from_pointer(this, p); }
145  char seqno[6];
146  char type;
147  char cont;
148  }; // ControlHeader
149 
150  /*----------------------------------------------------------------------*/
151 
152  /*! a structure to hold a blockette header
153  *
154  * see chapter 3, page 34 on "How to Assemble Control Headers"
155  *
156  * This differs from the blockette header of data record blockettes.
157  * See DataRecordBlocketteHeader below.
158  */
161  BlocketteHeader(const char* p) { copy_from_pointer(this, p); }
162  char type[3];
163  char len[4];
164  }; // BlocketteHeader
165 
166  /*----------------------------------------------------------------------*/
167 
168  /*! a structure to hold a telemtry volume identifier blockette
169  *
170  * only used within COMSERV data
171  *
172  * [8] Telemetry Volume Identifier Blockette
173  */
177  char ver[4];
178  char len[2];
179  char stat[5];
180  char loc[2];
181  char chan[3];
182  char rest[1];
183  }; // TelemetryVolumeIdentifierBlockette
184 
185  /*----------------------------------------------------------------------*/
186 
187  /* a structure to hold an extracted
188  * telemtry volume identifier blockette
189  */
190  /*
191  struct TelemetryVolumeIdentifier {
192  char ver[5];
193  char len[3];
194  char stat[6];
195  char loc[3];
196  char chan[4];
197  char begv[23];
198  char endv[23];
199  char sied[23];
200  char cied[23];
201  char net[3];
202  };
203  */
204 
205  /*----------------------------------------------------------------------*/
206 
207  /*! a strcuture to hold a starting time etc.
208  *
209  * see chapter 3, page 35.
210  */
211  struct BTIME {
212  BTIME() { }
213  BTIME(const char* p, const bool& swap=false)
214  {
215  copy_from_pointer(this, p);
216  if (swap) { this->swap(); }
217  }
218  void swap();
219  unsigned short int year;
220  unsigned short int doy;
221  unsigned char hour;
222  unsigned char min;
223  unsigned char sec;
224  unsigned char zero;
225  unsigned short int tmilsec;
226  }; // BTIME
227 
228  /*----------------------------------------------------------------------*/
229 
230  /*! a structure to hold activity flags
231  *
232  * used in Fixed Data Record Header
233  * see chapter 8, page 93
234  */
235  struct ActivityFlags {
237  ActivityFlags(const unsigned char& p) { copy_from_pointer(this, &p); }
238  bool calpres: 1; //!< calibration signals present
239  bool tcorrapp: 1; //!< time correction applied
240  bool begevent: 1; //!< beginning of event
241  bool endevent: 1; //!< end of event
242  bool posleap: 1; //!< a positive leap second happend
243  bool negleap: 1; //!< a negative leap second happend
244  bool event: 1; //!< event in progress
245  bool unused1: 1;
246  }; // ActivityFlags
247 
248  /*----------------------------------------------------------------------*/
249 
250  /*! a structure to hold I/O flags
251  *
252  * used in Fixed Data Record Header
253  * see chapter 8, page 93
254  */
255  struct IOFlags {
256  IOFlags() { }
257  IOFlags(const unsigned char& p) { copy_from_pointer(this, &p); }
258  bool parityerr: 1; //!< station volume parity error possibly present
259  bool longrec: 1; //!< long record read
260  bool shortrec: 1; //!< short record read
261  bool start: 1; //!< start of time series
262  bool end: 1; //!< end of time series
263  bool locked: 1; //!< clock locked
264  bool unused1: 1;
265  bool unused2: 1;
266  }; // IOFlags
267 
268  /*----------------------------------------------------------------------*/
269 
270  /*! a structure to hold quality flags
271  *
272  * used in Fixed Data Record Header
273  * see chapter 8, page 93
274  */
275  struct QualityFlags {
277  QualityFlags(const unsigned char& p) { copy_from_pointer(this, &p); }
278  bool ampsat: 1; //!< amplifier saturation detected
279  bool clip: 1; //!< digitizer clipping detected
280  bool spike: 1; //!< spikes detected
281  bool glitch: 1; //!< glitches detected
282  bool miss: 1; //!< missing/padded data present
283  bool telsynch: 1; //!< telemetry synchronization error
284  bool charging: 1; //!< a digital filter may be charging
285  bool time: 1; //!< time tag is questionable
286  }; // QualityFlags
287 
288  /*----------------------------------------------------------------------*/
289 
290  /*! a strcuture to hold a fixed data record header
291  *
292  * Old SEED manual: see chapter 8, page 92.
293  *
294  * Recent SEED V2.4 Manual:
295  * see chapter 8, page 108: "Fixed Section of Data Header (48 bytes)"
296  */
299  FixedDataRecordHeader(const char* p, const bool& doswap=false)
300  {
301  copy_from_pointer(this, p);
302  if (doswap) { this->swap(); }
303  }
304  void swap();
305  ControlHeader controlheader; //!< control header with sequence number
306  char stat[5]; //!< station identifier code
307  char loc[2]; //!< location identifier
308  char chan[3]; //!< channel identifier
309  char net[2]; //!< network code
310  BTIME stime; //!< record start time
311  unsigned short int nsamp; //!< number of samples
312  short int srate; //!< sample rate factor
313  short int srmult; //!< sample rate multiplier
314  unsigned char aflags; //!< activity flags
315  unsigned char ioflags; //!< i/o and clock flags
316  unsigned char qflags; //!< data quality flags
317  unsigned char numblock; //!< number of blockettes that follow
318  //long int tcorr; //!< time correction
319  int tcorr; //!< time correction
320  unsigned short int dbeg; //!< beginning of data
321  unsigned short int fblock; //!< first blockette
322  }; // FixedDataRecordHeader
323 
324  /*----------------------------------------------------------------------*/
325 
326  /*! s structure to hold a data record blockette header
327  */
330  DataRecordBlocketteHeader(const char* p, const bool& swap=false)
331  {
332  copy_from_pointer(this, p);
333  if (swap) { this->swap(); }
334  }
335  void swap();
336  unsigned short int type; //!< Blockette type
337  unsigned short int next; //!< Next blockette's byte number
338  }; // DataRecordBlocketteHeader
339 
340  /*----------------------------------------------------------------------*/
341 
342  /*! a structure to hold a data only blockette
343  *
344  * [1000] Data Only SEED Blockette
345  */
348  DataOnlySEEDBlockette(const char* p, const bool& swap=false)
349  {
350  copy_from_pointer(this, p);
351  if (swap) { this->swap(); }
352  }
353  void swap();
355  unsigned char format; //!< Encoding Format
356  unsigned char bytesex; //!< Word order
357  unsigned char reclen; //!< Data Record Length
358  unsigned char reserved; //!< Reserved
359  unsigned int reclenbytes() const { return(2<<(reclen-1)); }
360  unsigned int ireclen() const { return(this->reclen); }
361  unsigned int ibytesex() const { return(this->bytesex); }
362  unsigned int iformat() const { return(this->format); }
363  }; // DataOnlySEEDBlockette
364 
365  /*----------------------------------------------------------------------*/
366 
367  /*! a structure to hold a data extension blockette
368  *
369  * [1001] Data Extension Blockette
370  */
373  DataExtensionBlockette(const char* p, const bool& swap=false)
374  {
375  copy_from_pointer(this, p);
376  if (swap) { this->swap(); }
377  }
378  void swap();
380  unsigned char tquality; //!< Timing quality
381  char usec; //!< microseconds
382  unsigned char reserved; //!< reserved
383  unsigned char fcount; //!< frame count
384  int iusec() const { return(this->usec); }
385  unsigned int itquality() const { return(this->tquality); }
386  unsigned int ifcount() const { return(this->fcount); }
387  }; // DataExtensionBlockette
388 
389  /*----------------------------------------------------------------------*/
390 
391  /*! a union to hold a fout-byte word in a Steim 1 frame
392  */
393  union Steim1Word {
394  char byte[4]; //!< 4 1-byte differences
395  short int hw[2]; //!< 2 2-byte differences (halfword)
396  int fw; //!< 1 4-byte difference (fullword)
397  }; // union Steim1Word
398 
399  /*----------------------------------------------------------------------*/
400 
401  /*! a class to hold a four-byte word in a Steim 2 frame
402  *
403  * A Steim 2 frame knows eight different types of data encoding:
404  * - c=00 special (like Steim 1)
405  * - c=01 four 1 Byte (8 Bit) differences (like Steim 1)
406  * - c=10 look for dnib (high order two bits) in data word
407  * - dnib=01 one 30-bit difference
408  * - dnib=10 two 15-bit differences
409  * - dnib=11 three 10-bit differences
410  * - c=11 look for dnib (high order two bits) in data word
411  * - dnib=00 five 6-bit differences
412  * - dnib=01 six 5-bit differences
413  * - dnib=10 seven 4-bit differences
414  */
415  class Steim2Word {
416  public:
418  Fspecial=0, //!< contains non-data information, like headers
419  Fbyte=1, //!< four 8-bit differences (byte)
420  Fdnib1=2, //!< check dnib
421  Fdnib2=3 //!< check dnib
422  }; // enum ESteim1Control
423  enum ESteim2dnib {
428  }; // enum ESteim2dnib
429  //! store control code and data word
430  Steim2Word(const ESteim2Control& c, const int& word):
431  Mctrl(c), Mword(word) { };
432  //! return dnib
433  int dnib() const;
434  /*! return value
435  *
436  * \arg \c i index in word
437  */
438  int value(const int& i) const;
439  //! return number of values in this word
440  int nval() const;
441  private:
442  /*! return masked value
443  *
444  * \arg \c b number of bits
445  * \arg \c p position in word
446  */
447  int extract(const int& b, const int& p) const;
449  int Mword;
450  }; // class Steim2Word
451 
452  /*----------------------------------------------------------------------*/
453 
454  /*! a base class to handle a Steim frame
455  *
456  * We explicitely distinguish between Steim 1 and Steim 2 frames,
457  * since data swapping differs for them.
458  */
459  class SteimFrame {
460  public:
461  // --- constants section ---
462  //! numer of words to process
463  static const int nwords=15;
464  //! size of frame in bytes
465  static const int blocksize=16*sizeof(int);
466  // --- type definition section ---
467  //! possible control codes
469  Fspecial=0, //!< contains non-data information, like headers
470  Fbyte=1, //!< four 8-bit differences (byte)
471  Fhw=2, //!< two 16-bit differences (halfword)
472  Ffw=3, //!< one 32-bit difference (fullword)
473  Fdnib1=2, //!< check dnib
474  Fdnib2=3 //!< check dnib
475  }; // enum ESteimControl
476  //! struct to hold frame data
477  struct FrameData {
478  //! read
479  FrameData(const char* p)
481  //! control flags
482  unsigned int control;
483  //! data buffer
484  int word[nwords];
485  }; // struct FrameData
486  // --- member function section ---
487  //! virtual base class need virtual destructor
488  virtual ~SteimFrame() { }
489  //! return control word
490  unsigned int control() const { return(Mdata.control); }
491  //! return control code for word \c i
492  ESteimControl ctrl(const int& i) const;
493  //! return data word \c i
494  int word(const int& i) const { return(Mdata.word[i]); }
495  //! return current data word
496  int word() const { return(this->word(this->iword())); }
497  //! read data from pointer
498  void read(const char* p, const bool& swap=false)
499  {
500  Mdata=FrameData(p);
501  if (swap) { this->swap(); }
502  }
503  //! return current difference value
504  virtual int diff() const =0;
505  //! we are still inside the frame
506  bool valid() const { return(Mvalid); }
507  //! return control code for current word
509  { return(this->ctrl(this->iword())); }
510  //! step to next difference value
511  void next();
512  //! step to first difference value
513  void reset();
514  //! return current word index
515  int iword() const { return(Miword); }
516  //! return current difference index
517  int idiff() const { return(Midiff); }
518  protected:
519  //! swapping must be performed differently for Steim1 and Steim2
520  virtual void swap() =0;
521  //! set Mn for current word (compression type specific)
522  virtual void setn() =0;
523  //! read data to buffer
524  SteimFrame(const char* p):
525  Mdata(p), Mn(0), Miword(0), Midiff(0), Mvalid(true) { }
526  // --- data section ---
527  //! frame data (swapped)
529  //! number of differences in this word
530  int Mn;
531  private:
532  //! current word in frame
533  int Miword;
534  //! current difference value in word
535  int Midiff;
536  //! we are still inside the current frame
537  bool Mvalid;
538  }; // class SteimFrame
539 
540  /*----------------------------------------------------------------------*/
541 
542  /*! a structure holding a Steim 1 frame
543  */
544  class Steim1Frame: public SteimFrame {
545  public:
546  typedef SteimFrame Tbase;
547  virtual ~Steim1Frame() { }
548  Steim1Frame(const char* p, const bool& swap=false):
549  Tbase(p)
550  {
551  if (swap) { this->swap(); }
552  this->reset();
553  }
554  virtual void swap();
555  virtual void setn();
556  virtual int diff() const;
557  }; // class Steim1Frame
558 
559  /*----------------------------------------------------------------------*/
560 
561  /*! a structure holding a Steim 2 frame
562  */
563  class Steim2Frame: public SteimFrame {
564  public:
565  typedef SteimFrame Tbase;
566  virtual ~Steim2Frame() { }
567  Steim2Frame(const char* p, const bool& swap=false):
568  Tbase(p)
569  {
570  if (swap) { this->swap(); }
571  this->reset();
572  }
573  virtual void swap();
574  virtual void setn();
575  virtual int diff() const;
576  }; // class Steim2Frame
577 
578  } // namespace SEED
579 
580  } // namespace mseed
581 
582 } // namespace datrw
583 
584 #endif // DATRW_SEEDSTRUCTS_H_VERSION (includeguard)
585 
586 /* ----- END OF seedstructs.h ----- */
int idiff() const
return current difference index
Definition: seedstructs.h:517
SteimFrame(const char *p)
read data to buffer
Definition: seedstructs.h:524
virtual void swap()
swapping must be performed differently for Steim1 and Steim2
Definition: seedstructs.cc:134
int fw
1 4-byte difference (fullword)
Definition: seedstructs.h:396
unsigned short int tmilsec
Definition: seedstructs.h:225
virtual void swap()
swapping must be performed differently for Steim1 and Steim2
Definition: seedstructs.cc:103
DWWSSN gain ranged.
Definition: seedstructs.h:114
bool end
end of time series
Definition: seedstructs.h:262
ActivityFlags(const unsigned char &p)
Definition: seedstructs.h:237
int iword() const
return current word index
Definition: seedstructs.h:515
static const int blocksize
size of frame in bytes
Definition: seedstructs.h:465
virtual int diff() const
return current difference value
Definition: seedstructs.cc:207
GEOSCOPE multiplexed 16 bit gain ranged 3 bit exp.
Definition: seedstructs.h:105
Steim (1) compression.
Definition: seedstructs.h:102
unsigned short int year
Definition: seedstructs.h:219
unsigned short int dbeg
beginning of data
Definition: seedstructs.h:320
short int srate
sample rate factor
Definition: seedstructs.h:312
int nval() const
return number of values in this word
Definition: seedstructs.cc:267
unsigned short int fblock
first blockette
Definition: seedstructs.h:321
bool event
event in progress
Definition: seedstructs.h:244
void reset()
step to first difference value
Definition: seedstructs.cc:162
char chan[3]
channel identifier
Definition: seedstructs.h:308
unsigned int control() const
return control word
Definition: seedstructs.h:490
virtual void setn()
set Mn for current word (compression type specific)
Definition: seedstructs.cc:185
Steim (3) compression.
Definition: seedstructs.h:111
bool shortrec
short record read
Definition: seedstructs.h:260
US national network compression.
Definition: seedstructs.h:107
SteimFrame::ESteimControl ctrl() const
return control code for current word
Definition: seedstructs.h:508
unsigned int control
control flags
Definition: seedstructs.h:482
bool calpres
calibration signals present
Definition: seedstructs.h:238
short int srmult
sample rate multiplier
Definition: seedstructs.h:313
int dnib() const
return dnib
Definition: seedstructs.cc:260
ESteimControl
possible control codes
Definition: seedstructs.h:468
virtual ~SteimFrame()
virtual base class need virtual destructor
Definition: seedstructs.h:488
bool negleap
a negative leap second happend
Definition: seedstructs.h:243
unsigned short int nsamp
number of samples
Definition: seedstructs.h:311
CDSN 16 bit gain ranged.
Definition: seedstructs.h:108
four 8-bit differences (byte)
Definition: seedstructs.h:419
bool posleap
a positive leap second happend
Definition: seedstructs.h:242
bool ampsat
amplifier saturation detected
Definition: seedstructs.h:278
unsigned char reclen
Data Record Length.
Definition: seedstructs.h:357
short int hw[2]
2 2-byte differences (halfword)
Definition: seedstructs.h:395
IEEE floating point.
Definition: seedstructs.h:100
BTIME(const char *p, const bool &swap=false)
Definition: seedstructs.h:213
bool time
time tag is questionable
Definition: seedstructs.h:285
FixedDataRecordHeader(const char *p, const bool &doswap=false)
Definition: seedstructs.h:299
virtual void swap()=0
swapping must be performed differently for Steim1 and Steim2
FrameData Mdata
frame data (swapped)
Definition: seedstructs.h:528
unsigned short int next
Next blockette&#39;s byte number.
Definition: seedstructs.h:337
char stat[5]
station identifier code
Definition: seedstructs.h:306
GEOSCOPE multiplexed 16 bit gain ranged 4 bit exp.
Definition: seedstructs.h:106
ControlHeader controlheader
control header with sequence number
Definition: seedstructs.h:305
char loc[2]
location identifier
Definition: seedstructs.h:307
void read(const char *p, const bool &swap=false)
read data from pointer
Definition: seedstructs.h:498
DataOnlySEEDBlockette(const char *p, const bool &swap=false)
Definition: seedstructs.h:348
Root namespace of library.
Definition: aalibdatrwxx.cc:16
four 8-bit differences (byte)
Definition: seedstructs.h:470
bool locked
clock locked
Definition: seedstructs.h:263
unsigned char aflags
activity flags
Definition: seedstructs.h:314
void copy_from_pointer(C1 *target, const C2 *p)
Definition: seedstructs.h:85
DataRecordBlocketteHeader blocketteheader
Definition: seedstructs.h:354
virtual void setn()
set Mn for current word (compression type specific)
Definition: seedstructs.cc:240
Steim (2) compression.
Definition: seedstructs.h:103
unsigned short int doy
Definition: seedstructs.h:220
bool telsynch
telemetry synchronization error
Definition: seedstructs.h:283
DataRecordBlocketteHeader blocketteheader
Definition: seedstructs.h:379
bool spike
spikes detected
Definition: seedstructs.h:280
one 32-bit difference (fullword)
Definition: seedstructs.h:472
IOFlags(const unsigned char &p)
Definition: seedstructs.h:257
bool longrec
long record read
Definition: seedstructs.h:259
contains non-data information, like headers
Definition: seedstructs.h:469
bool begevent
beginning of event
Definition: seedstructs.h:240
virtual void setn()=0
set Mn for current word (compression type specific)
IEEE double precision floating point.
Definition: seedstructs.h:101
int Mn
number of differences in this word
Definition: seedstructs.h:530
IPG Strasbourg 16 bit gain ranged.
Definition: seedstructs.h:110
unsigned char format
Encoding Format.
Definition: seedstructs.h:355
Steim1Frame(const char *p, const bool &swap=false)
Definition: seedstructs.h:548
unsigned char ioflags
i/o and clock flags
Definition: seedstructs.h:315
bool parityerr
station volume parity error possibly present
Definition: seedstructs.h:258
bool clip
digitizer clipping detected
Definition: seedstructs.h:279
int Miword
current word in frame
Definition: seedstructs.h:533
int extract(const int &b, const int &p) const
Definition: seedstructs.cc:375
GEOSCOPE multiplexed 24 bit integer.
Definition: seedstructs.h:104
unsigned short int type
Blockette type.
Definition: seedstructs.h:336
contains non-data information, like headers
Definition: seedstructs.h:418
bool glitch
glitches detected
Definition: seedstructs.h:281
bool miss
missing/padded data present
Definition: seedstructs.h:282
Graefenberg 16 bit gain ranged.
Definition: seedstructs.h:109
void next()
step to next difference value
Definition: seedstructs.cc:172
DataRecordBlocketteHeader(const char *p, const bool &swap=false)
Definition: seedstructs.h:330
bool tcorrapp
time correction applied
Definition: seedstructs.h:239
virtual int diff() const
return current difference value
Definition: seedstructs.cc:248
virtual int diff() const =0
return current difference value
SPARC or 68000 byte order.
Definition: seedstructs.h:127
Steim2Frame(const char *p, const bool &swap=false)
Definition: seedstructs.h:567
bool Mvalid
we are still inside the current frame
Definition: seedstructs.h:537
unsigned char qflags
data quality flags
Definition: seedstructs.h:316
bool valid() const
we are still inside the frame
Definition: seedstructs.h:506
bool start
start of time series
Definition: seedstructs.h:261
bool charging
a digital filter may be charging
Definition: seedstructs.h:284
DataExtensionBlockette(const char *p, const bool &swap=false)
Definition: seedstructs.h:373
int Midiff
current difference value in word
Definition: seedstructs.h:535
static const int nwords
numer of words to process
Definition: seedstructs.h:463
Steim2Word(const ESteim2Control &c, const int &word)
store control code and data word
Definition: seedstructs.h:430
int word() const
return current data word
Definition: seedstructs.h:496
int word(const int &i) const
return data word i
Definition: seedstructs.h:494
unsigned char tquality
Timing quality.
Definition: seedstructs.h:380
unsigned char bytesex
Word order.
Definition: seedstructs.h:356
RSTN 16 bit gain ranged.
Definition: seedstructs.h:115
char byte[4]
4 1-byte differences
Definition: seedstructs.h:394
unsigned char numblock
number of blockettes that follow
Definition: seedstructs.h:317
int value(const int &i) const
Definition: seedstructs.cc:317
two 16-bit differences (halfword)
Definition: seedstructs.h:471
VAX or 8086 byte order.
Definition: seedstructs.h:126
QualityFlags(const unsigned char &p)
Definition: seedstructs.h:277