Server Interfaces¶
Client interface / telnet¶
CAPS provides a line based client interface for requesting data and showing
available streams. The telnet
command may be used to connect to the server:
telnet localhost 18002
The following commands are supported by the server:
HELLO
- prints server name and versionHELP
prints descriptive helpBYE
- disconnects from serverAUTH <user> <password>
- performs authenticationINFO STREAMS [stream id filter]
- lists available streams and time spans, see section ref{sec:ci_info_streams}BEGIN REQUEST
- starts a request block, followed by request parameters, see section ref{sec:ci_request}REALTIME ON|OFF
- enables/disables real-time mode, if disabled the connection is closed if all archive data was sentSTREAM ADD|REMOVE <NET.STA.LOC.CHA>
- adds/removes a stream from the request, may be repeated in one request blockTIME [<starttime>]:[endtime]
- defines start and end time of the request, open boundaries are allowedHELI ADD|REMOVE <NET.STA.LOC.CHA>
- similar to STREAM but re-sample the data to 1HzMETA{@[version]} [ON|OFF]
- request delivery of packet header information onlyOUTOFORDER [ON|OFF]
- delivers data in order of sampling or transmission timeSEGMENTS [ON|OFF]
- request delivery of times of contiguous segments (API >= 4)GAPS [ON|OFF]
- request delivery of times of gaps (API >= 4)TOLERANCE [value in us]
- Define data segment continuation tolerance in microseconds (API >= 4)RESOLUTION [value in d]
- Resolution in days of the returned data segments or gaps (API >= 4)
END
- finalizes a request and starts acquisitionPRINT REQUESTS
- prints active request of current sessionABORT
- aborts current data transmission
Requests to server are separated by a new line. For the response data the server prepends the message length to the data. In this way non ASCII characters or binary content can be returned.
List available streams¶
The following example shows a telnet conversation of a request for available
streams. The first line contains the request command. All other lines represent
the server response. The response is 124 characters long. The length parameter
is interpreted by telnet and converted to its ASCII representation, in this
case: |
.
1INFO STREAMS VZ.HILO.*
2|STREAMS
3VZ.HILO.WLS.CAM 2013-07-26T00:00:01 2013-08-02T09:28:17
4VZ.HILO.WLS.SSH 2008-06-06T00:00:00 2013-08-02T09:04:00
5END
Data requests¶
Data request are initiated by a request block which defines the stream and the time span to fetch.
1BEGIN REQUEST
2REALTIME OFF
3STREAM ADD VZ.HILO.WLS.SSH
4TIME 2013,08,02,09,00,02:
5END
6DSTATUS OK
7SESSION_TABLE VERSION:1
8PACKET_HEADER IDSIZE:2,DATASIZE:4
9FREQUESTS
10ID:1,SID:VZ.HILO.WLS.SSH,SFREQ:1/60,UOM:mm,FMT:RAW/FLOAT
11END
12[unprintable data]
13'REQUESTS
14ID:-1,SID:VZ.HILO.WLS.SSH
15END
16�EOD
The listing above shows such a request block in lines 1-5. Line 2 disables the real-time mode which will close the session after all data was read. Line 3 adds the stream to the request set. More streams may be added in successive lines. Line 4 specifies a start time and an open end time.
The first response chunk starts at line 6 and ends at line 11. I has a length of
68 byte (= ACCII D
) and contains version information and a session table.
The table maps a 2 byte integer id to data stream meta information. In this way
following data chunks can be distinguished by only 2 bytes and the header
information has to be transmitted only once.
Line 12 contains the data chunks. It is omitted here because it contains unprintable characters. A data chunk starts with the 2 id bytes followed by the 4 byte chunk size.
After all data was transmitted the server reports the end of the stream (line 13-15) and the end of the session (line 16).
Web interface¶
CAPS ships with a read-only web interface for viewing information and
downloading data. The Web interface is disabled by default and may be enabled by
configuring a valid port number under AS.http.port
. It provides
different tabs:
Channels (figure 44): View and filter available streams. For the RAW and miniSEED packets it is also possible to view the waveform data by clicking on an entry of the stream table. miniSEED data may be downloaded interactively.
Server stats (figure 45): View server traffic statistics. This tab is only accessible if the logged in user is member of the admin group as defined by
AS.auth.basic.users.passwd
.Settings (figure 46): Set the login credentials and parameters of the other perspectives.