MsPASS C++ API  2.4.1.dev4+g92330b7a
Defines the C++ API for MsPASS
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Friends | List of all members
mspass::io::mseed_index Class Reference

Index entry describing one contiguous MiniSEED data segment. More...

#include <mseed_index.h>

Public Member Functions

 mseed_index ()
 
 mseed_index (const mseed_index &parent)
 
mseed_indexoperator= (const mseed_index &parent)
 

Public Attributes

std::string net
 
std::string sta
 
std::string loc
 
std::string chan
 
size_t foff
 
size_t nbytes
 
size_t npts
 
double samprate
 
double starttime
 
double endtime
 
double last_packet_time
 

Friends

std::ostringstream & operator<< (std::ostringstream &ss, const mseed_index &ind)
 

Detailed Description

Index entry describing one contiguous MiniSEED data segment.

Constructor & Destructor Documentation

◆ mseed_index() [1/2]

mspass::io::mseed_index::mseed_index ( )
inline

Construct an empty index entry.

25 {
26 net = "";
27 sta = "";
28 loc = "";
29 chan = "";
30 foff = 0;
31 nbytes = 0;
32 npts = 0;
33 samprate = 0.0;
34 starttime = 0.0;
35 endtime = 0.0;
36 last_packet_time = 0.0;
37 };
size_t nbytes
Definition mseed_index.h:16
std::string chan
Definition mseed_index.h:14
double endtime
Definition mseed_index.h:20
size_t npts
Definition mseed_index.h:17
double samprate
Definition mseed_index.h:18
std::string sta
Definition mseed_index.h:12
double last_packet_time
Definition mseed_index.h:21
size_t foff
Definition mseed_index.h:15
double starttime
Definition mseed_index.h:19
std::string loc
Definition mseed_index.h:13
std::string net
Definition mseed_index.h:11

References chan, endtime, foff, last_packet_time, loc, nbytes, net, npts, samprate, sta, and starttime.

◆ mseed_index() [2/2]

mspass::io::mseed_index::mseed_index ( const mseed_index parent)
inline

Copy constructor.

40 : net(parent.net), sta(parent.sta), loc(parent.loc), chan(parent.chan) {
41 foff = parent.foff;
42 nbytes = parent.nbytes;
43 npts = parent.npts;
44 samprate = parent.samprate;
45 starttime = parent.starttime;
46 endtime = parent.endtime;
47 last_packet_time = parent.last_packet_time;
48 };

References endtime, foff, last_packet_time, nbytes, npts, samprate, and starttime.

Member Function Documentation

◆ operator=()

mseed_index & mspass::io::mseed_index::operator= ( const mseed_index parent)
inline

Assignment operator.

50 {
51 if (&parent != this) {
52 net = parent.net;
53 sta = parent.sta;
54 loc = parent.loc;
55 chan = parent.chan;
56 foff = parent.foff;
57 npts = parent.npts;
58 nbytes = parent.nbytes;
59 samprate = parent.samprate;
60 starttime = parent.starttime;
61 endtime = parent.endtime;
62 last_packet_time = parent.last_packet_time;
63 }
64 return *this;
65 };

References chan, endtime, foff, last_packet_time, loc, nbytes, net, npts, samprate, sta, and starttime.

Friends And Related Symbol Documentation

◆ operator<<

std::ostringstream & operator<< ( std::ostringstream &  ss,
const mseed_index ind 
)
friend

Stream an index entry to an output string stream.

6 {
7 ss << ind.net << " " << ind.sta << " ";
8 if (ind.loc.size() > 0)
9 ss << ind.loc << " ";
10 else
11 ss << "NULL ";
12 ss << ind.chan << " " << ind.foff << " " << ind.nbytes << " "
13 << std::setprecision(20) << ind.starttime << " " << ind.last_packet_time
14 << " " << ind.endtime << " " << ind.samprate << " " << ind.npts;
15 return ss;
16};

Member Data Documentation

◆ chan

std::string mspass::io::mseed_index::chan

Channel code.

◆ endtime

double mspass::io::mseed_index::endtime

Segment end time as epoch seconds.

◆ foff

size_t mspass::io::mseed_index::foff

File offset of the first packet in this segment.

◆ last_packet_time

double mspass::io::mseed_index::last_packet_time

Start time of the last packet in the segment.

◆ loc

std::string mspass::io::mseed_index::loc

Location code.

◆ nbytes

size_t mspass::io::mseed_index::nbytes

Number of bytes in this segment.

◆ net

std::string mspass::io::mseed_index::net

Network code.

◆ npts

size_t mspass::io::mseed_index::npts

Number of samples represented by this segment.

◆ samprate

double mspass::io::mseed_index::samprate

Sample rate in samples per second.

◆ sta

std::string mspass::io::mseed_index::sta

Station code.

◆ starttime

double mspass::io::mseed_index::starttime

Segment start time as epoch seconds.


The documentation for this class was generated from the following file: