The gdi-trigger subsystem of the Platinum firmware will record events in response to a trigger signal (such as a waveform value exceeding a threshold). A CGI program present in the firmware can be used to generate an Atom feed that presents a list of these events to a compatible reader. This can be an off-the-shelf RSS reader, for example:
The Atom feed is further extended with XML elements that allow a program to reliably extract information from the feed. This uses the built-in extension features of Atom (see RFC 4287 section 6 for full details). These are explained below.
Within the Atom feed entries a simple set of elements is embedded using the
namespace http://www.guralp.com/platinum/xmlns/gdi-trig-atom.cgi/1.0
.
In this truncated example, these elements are highlighted in
red:
Station ruthenium Trigger group 1 ruthenium http://ruthenium/ gdi-trig-atom.cgi urn:X-com.guralp.gdi-trigger.atom:d51806c543534878a316c64bfc983655/1 2014-08-14T11:57:16Z Event at 20140814T115716Z urn:X-com.guralp.gdi-trigger.atom:d51806c543534878a316c64bfc983655/1/2014-08-14T11:57:16Z 2014-08-14T11:57:16Z ]]><gt:event>Timestamp ]]><gt:timestamp>2014-08-14T11:57:16Z</gt:timestamp> Description ]]><gt:reason>Manual trigger</gt:reason> Duration ]]><gt:duration>0</gt:duration> ]]></gt:event> ]]>
Parameter Instrument Component E N Z PFREQ.1 LW.CAD.1 ]]><gt:parameter instrument='LW.CAD.1' parameter='PFREQ.1' component='E'>34.800000</gt:parameter> ]]><gt:parameter instrument='LW.CAD.1' parameter='PFREQ.1' component='N'>34.800000</gt:parameter> ]]><gt:parameter instrument='LW.CAD.1' parameter='PFREQ.1' component='Z'>75.400000</gt:parameter> The structure is as follows:
<event>
Can appear multiple times, once per event. Always has the following children:Furthermore, depending on which parameters have been configured in the summary view, has zero or more of these children:
<timestamp>
— ISO8601 timestamp of first trigger<reason>
— textual reason for trigger<duration>
— how long the event lasted for, in seconds, excluding pre- and post-trigger periods.
<parameter>
— summary value parameter, with attributes:
instrument
— associated instrument IDparameter
— code name of computed parametercomponent
— component/axis code
XSLT files
To aid development of an automatic processing system, some example XSLT stylesheets are provided.
Extract to plain XML
When run on the Atom feed document, this stylesheet will return a very simple XML document which just has the raw event data. It basically just extracts the highlighted structures as shown above, but extracts the parameter attributes into XML elements for consistency.
Example output:
]]> 2014-08-14T11:57:16Z 0 Manual trigger LW.CAD.1 PFREQ.1 E 34.800000 LW.CAD.1 PFREQ.1 N 34.800000 2014-08-14T11:52:20Z 0 Manual trigger LW.CAD.1 PFREQ.1 E 37.700000 LW.CAD.1 PFREQ.1 N 37.700000 Build plain-text table
When run on the Atom feed document, this simple stylesheet builds a plain text table of the results. It can be modified to pull out different parameters with relative ease. Example output:
Timestamp Duration LW.CAD.1 PGA.1 (Z, N, E) 2014-08-14T11:57:16Z 0 75.400000, 34.800000, 34.800000 2014-08-14T11:52:20Z 0 75.400000, 37.700000, 37.700000 2014-08-14T11:51:21Z 0 75.400000, 37.700000, 37.700000 2014-08-14T11:48:28Z 0 88.200000, 37.700000, 75.300000 2014-08-14T11:43:11Z 0 75.200000, 42.600000, 37.600000 2014-08-14T11:00:28Z 0 75.400000, 85.200000, 37.700000 2014-08-14T10:24:38Z 0 36.000000, 84.400000, 36.000000