pub struct PackInfo {
pub sample_rate: c_double,
pub format_version: c_uchar,
pub pub_version: c_uchar,
pub flags: MSBitFieldFlags,
pub encoding: MSDataEncoding,
pub rec_len: c_int,
pub extra_headers: Option<CString>,
/* private fields */
}Expand description
Struct providing miniSEED record packing information.
Fields§
§sample_rate: c_doubleRecord sample rate.
format_version: c_ucharThe miniSEED format version.
pub_version: c_ucharPublication version.
flags: MSBitFieldFlagsBit field flags.
encoding: MSDataEncodingData encoding.
rec_len: c_intRecord length used for encoding.
extra_headers: Option<CString>Extra headers.
If not None it is expected to contain extra headers, i.e. a string containing (compact)
JSON, that will be added to each output record.
Implementations§
source§impl PackInfo
impl PackInfo
sourcepub fn new<T>(sid: T) -> MSResult<Self>
pub fn new<T>(sid: T) -> MSResult<Self>
Creates a new PackInfo from a FDSN source identifier.
sourcepub fn with_sample_rate<T>(sid: T, sample_rate: c_double) -> MSResult<Self>
pub fn with_sample_rate<T>(sid: T, sample_rate: c_double) -> MSResult<Self>
Creates a new PackInfo from a FDSN source
identifier with configured sample
rate.
Note that by libmseed convention a negative
sample_rate value is considered as a sample rate period (i.e. in units of seconds (s)),
while a positive sample rate value is considered as a sample rate frequency (i.e. in units
of Hertz (Hz)).
See also factor_multiplier_to_sample_rate.
sourcepub fn sid(&self) -> &CString
pub fn sid(&self) -> &CString
Returns a reference to the FDSN source identifier.