MIME Content Helpers for Weather Products

After a Metcast client received a response that contained some data (content), it saves the data in a file, and calls an appropriate helper to process the data. The helpers are chosen based on a media type (Content-type). The helpers are specified through a mailcap file, the same file used by Netscape and MIME-compliant mail readers (metamail) to process data.

 

syn-proc: helps with real-time observations
media type text/x-syn

Synopsis:

syn-proc area-name syn-file
where
area-name
JMV area name of the relevant area
syn-file
a file of SYN (METAR) records, MIME type text/x-syn
The executable of this program must reside in the NODDSFLS folder (so the program can figure out the location of the NODDS folder from the argv[0]).

This program:

Note that there is no need to do any file locking, as there is no contention with the JMV viewer for reading/writing MZZUPDT_.XXF file. This syn-proc helper never writes to MZZUPDT_.XXF: instead, it creates an entirely new file, which it later renames into MZZUPDT_.XXF (taking care to save the existing MZZUPDT_.XXF as MZZOLD_.XXF).

Also note that the present syn-proc module does not need to access any other file that is not mentioned above (for example, syn-proc does not need an ARQ_info.txt file).

History:

The current version of the syn-proc is 2.5, as of Jul 23, 1997


 

sat-proc: helps with satellite image data
media type image/x-portable-graymap

This helper is typically called by a Metcast Retriever or by a MIME compliant mail client to process (real-time) satellite products in PGM 'P5' format

Synopsis:

sat-proc tmpname area-name sat-id description timestamp
where
tmpname
the file containing the received satellite image data
area-name
JMV area name of the relevant area
sat-id
the three-char satellite identifier for JMV sat images (e.g. SVN)
description
a string describing this particular product
the string must be quoted when specified on the command line (mailcap) as it typically contains spaces
timestamp
a decimal number telling the timestamp for this product, in EPOCH seconds (the same format as returned by time(2))
The executable of this program must reside in the NODDSFLS folder

The program descends into the area (which is a folder named area-name just below NODDSFLS, the folder this application is called from). The tmpname file is copied to a file whose name is constructed as follows:

sat-id + "X000" + rightmostchar( sat-id ) + ".IMF"
(e.g.: if sat-id == "SVN", then file name would be "SVNX000N.IMF")

The full product description, a 'description' command-line argument, is used to create a record about this satellite product in the fldsum.dat file. After this helper has taken care of the product data file and recorded this info in the fldsum.dat, the helper touches a file 'update.all' The presence of this file tells JMV that fldsum.dat has been updated (and so JMV should re-draw the current display).

History:

The current version of the sat-proc is 2.0, as of August 8, 1997


History

$Id: Helpers.html,v 1.1 1997/09/10 19:34:40 oleg Exp oleg $