Man page - ms_splitsrcname(3)
Packages contas this manual
- ms_gswap2(3)
- ms_selection(3)
- ms_gswap8(3)
- ms_strncpclean(3)
- msr_endtime(3)
- ms_hptime2isotimestr(3)
- ms_addselect_comp(3)
- ms_readtracelist_selection(3)
- ms_hptime2seedtimestr(3)
- ms_strncpopen(3)
- ms_readtracelist(3)
- msr_addblockette(3)
- ms_parse_raw(3)
- ms_gswap4(3)
- ms_matchselect(3)
- ms_btime2isotimestr(3)
- ms_gswap4a(3)
- msr_free(3)
- ms_bigendianhost(3)
- ms_addselect(3)
- mst_writemseedgroup(3)
- ms_freeselections(3)
- ms_seedtimestr2hptime(3)
- ms_loginit_l(3)
- mst_addtracetogroup(3)
- ms_gswap8a(3)
- mst_printgaplist(3)
- ms_blktdesc(3)
- ms_samplesize(3)
- ms_md2doy(3)
- msr_pack_header(3)
- msr_writemseed(3)
- ms_readtraces(3)
- ms_readmsr_r(3)
- ms_readtracelist_timewin(3)
- mst_writemseed(3)
- mstl_printsynclist(3)
- ms_hptime2btime(3)
- mstl_addmsr(3)
- msr_duplicate(3)
- mstl_free(3)
- ms_lookup(3)
- msr_pack(3)
- mst_freegroup(3)
- ms_btime3hptime(3)
- mst_printtracelist(3)
- ms_readleapseconds(3)
- mst_packgroup(3)
- ms_btime2mdtimestr(3)
- ms_encodingstr(3)
- ms_time(3)
- ms_detect(3)
- msr_print(3)
- ms_log(3)
- ms_readtraces_timewin(3)
- ms_readtraces_selection(3)
- msr_init(3)
- mstl_convertsamples(3)
- msr_parse_selection(3)
- msr_starttime(3)
- mst_pack(3)
- ms_readselectionsfile(3)
- ms_timestr2hptime(3)
- ms_blktlen(3)
- ms_hptime2mdtimestr(3)
- mst_initgroup(3)
- ms_intro(3)
- ms_recsrcname(3)
- ms_btime2seedtimestr(3)
- mst_free(3)
- ms_gswap(3)
- mst_addmsr(3)
- msr_starttime_uc(3)
- mst_findmatch(3)
- ms_loginit(3)
- msr_parse(3)
- ms_log_l(3)
- ms_errorstr(3)
- msr_samprate(3)
- mst_addspan(3)
- ms_printselections(3)
- ms_genfactmult(3)
- ms_srcname(3)
- msr_normalize_header(3)
- ms_gswap3(3)
- ms_ratapprox(3)
- ms_writemseed(3)
- msr_unpack(3)
- mst_groupheal(3)
- mstl_init(3)
- mstl_printgaplist(3)
- mst_findadjacent(3)
- mst_groupsort(3)
- ms_readleapsecondfile(3)
- ms_gswap2a(3)
- mst_srcname(3)
- mst_convertsamples(3)
- msr_nomsamprate(3)
- msr_free_blktchain(3)
- mstl_printtracelist(3)
- ms_splitsrcname(3)
- ms_doy2md(3)
- ms_time2hptime(3)
- msr_host_latency(3)
- ms_readmsr(3)
- mst_printsynclist(3)
- mst_init(3)
- msr_srcname(3)
- mst_addmsrtogroup(3)
- ms_find_reclen(3)
apt-get install libmseed-doc
Manual
| MS_SPLITSRCNAME(3) | Library Functions Manual | MS_SPLITSRCNAME(3) |
NAME
ms_splitsrcname - Split source names into the SEED naming nomenclature.
SYNOPSIS
#include <libmseed.h>
char *ms_splitsrcname ( char *srcname, char *net, char * sta,
char * loc, char *chan, char *qual );
DESCRIPTION
The ms_splitsrcname routine parses SEED channel naming components from a source name string in the following format:
"NET_STA_LOC_CHAN[_QUAL]"
The first four components are required to uniquely identify a SEED channel, generally these are always present in a srcname. The Quality code is normally optional in a source name.
The arguments for the first four components (net, sta, loc & chan) are treated as strings but the quality code (qual) is treated as a pointer to a single character.
Memory for the requested component strings must already be allocated. If a component pointer is NULL it will not be parsed from the string.
Source names in the expected format are created, for example, by the ms_recsrcname(3), msr_srcname(3) and mst_srcname(3) routines.
LOCATION IDS AND SPACES
The source name should never include spaces. The fixed format nature of SEED data records leads to blank or unused location IDs represented by spaces, in a source name such blank location IDs should be collapsed to nothing in the resulting sources names. A blank location ID is parsed from a source name as an empty string (not two spaces).
EXAMPLES
This usage will result in net="IU", sta="ANMO", loc="00", chan="BHZ" and qual will remain unchanged (because it was not contained in the input srcname):
ms_splitsrcname("IU_ANMO_00_BHZ", net, sta, loc, chan, qual);
This usage will limit the parsing to only the network and station components with net="IU", sta="ANMO":
ms_splitsrcname("IU_ANMO_00_BHZ", net, sta, NULL, NULL, NULL);
The following usage illustrates a blank location ID and included quality code:
ms_splitsrcname("IU_ANMO__BHZ_Q", net, sta, loc, chan, qual);
The result is:
net = "IU" sta = "ANMO" loc = "" chan = "BHZ" qual = 'Q'
RETURN VALUES
Return 0 on success and -1 on error.
SEE ALSO
ms_recsrcname(3), msr_srcname(3) and mst_srcname(3).
AUTHOR
Chad Trabant IRIS Data Management Center
| 2009/12/19 | Libmseed API |