DATRW++ library: seismic data I/O with multiple formats

◆ nval()

int datrw::mseed::SEED::Steim2Word::nval ( ) const

return number of values in this word

Definition at line 267 of file seedstructs.cc.

References DATRW_abort, dnib(), Fbyte, Fdnib00, Fdnib01, Fdnib1, Fdnib10, Fdnib11, Fdnib2, Fspecial, and Mctrl.

Referenced by datrw::mseed::SEED::dump(), datrw::mseed::SEED::Steim2Frame::setn(), and value().

268  {
269  int retval=0;
270  switch (Mctrl) {
272  retval=1;
273  break;
274  case Steim2Word::Fbyte:
275  retval=4;
276  break;
277  case Steim2Word::Fdnib1:
278  switch (this->dnib()) {
279  case Steim2Word::Fdnib01:
280  retval=1;
281  break;
282  case Steim2Word::Fdnib10:
283  retval=2;
284  break;
285  case Steim2Word::Fdnib11:
286  retval=3;
287  break;
288  default:
289  DATRW_abort("ERROR (Steim2Word::value): "
290  "illegal decode nibble");
291  }
292  break;
293  case Steim2Word::Fdnib2:
294  switch (this->dnib()) {
295  case Steim2Word::Fdnib00:
296  retval=5;
297  break;
298  case Steim2Word::Fdnib01:
299  retval=6;
300  break;
301  case Steim2Word::Fdnib10:
302  retval=7;
303  break;
304  default:
305  DATRW_abort("ERROR (Steim2Word::value): "
306  "illegal decode nibble");
307  }
308  break;
309  default:
310  DATRW_abort("ERROR (Steim2Word::value): illegal ctrl code");
311  }
312  return(retval);
313  } // int Steim2Word::nval() const
int dnib() const
return dnib
Definition: seedstructs.cc:260
four 8-bit differences (byte)
Definition: seedstructs.h:419
#define DATRW_abort(M)
Abort and give a message.
Definition: error.h:101
contains non-data information, like headers
Definition: seedstructs.h:418
Here is the call graph for this function:
Here is the caller graph for this function: