ifpServerText User's Guide

January 6, 2012

Table of Contents

Overview

Running the ifpServerText Program

Example Execution

Output Formats

Overview

The ifpServerText is a program to allow reading, writing, deleting, and inventorying text data in EDEX. It is an easy way to store items such as smart tools directly into EDEX. The following data types are supported:
Category Description
Tool Smart tools
Procedure Procedures
Utility Utilities for smart tools and procedures
TextUtility Utilities for text products
TextProduct Text product definitions
EditArea Edit areas
EditAreaGroup Edit area group definitions
WeatherElementGroup Weather element groups
SelectTR User-defined selection time ranges
SampleSet Sample Sets
ColorTable Color Tables
Combinations
Zone Combiner Active Combination Files

Running the ifpServerText Program

The command line syntax is:
ifpServerText -h hostname -p portnumber -o siteID [-u user] [-s -n name -f filename -c class] [-d -n name [-c class]] [-i [-c class] [-g -f filename -n name [-c class]] [-m infoType]

A sample command line to store data is:
ifpServerText -h dx3-oax -p 9581 -o LWX -s -n MaxT_Tool -f /tmp/maxt.py -c Tool
 
Option Syntax Optional or Mandatory Description
-h hostname Mandatory (See Note) Specifies the host, upon which EDEX is running.
-p port Mandatory (See Note) Specifies the port, upon which EDEX is running.
-o siteID Mandatory Specifies the site ID for which EDEX is running.
-u user Optional The connection to EDEX will be made using this user, which defaults to the UNIX login user.
MetaData Mode:

-m infoType Mandatory for meta mode infoType specifies the type of data to be obtained.  Choices are "site", "sitetimezone", "domain", and "singleton". The "site" will list the site for which EDEX is configured. The "sitetimezone" lists the site and the timezone for EDEX. The "singleton" lists all of the databases that are configured as singletons. The "domain" lists the common database domain information.
-f filename Optional Indicates the name of the file to contain the output information.
Save Mode:

-s Mandatory for save mode Indicates SAVE mode, requires the -n, -f, and -c switches.
-n name Mandatory Indicates the name to store the file under in EDEX
-f filename Mandatory Indicates the filename source for the operation.
-c class Mandatory Indicates the type of the file.  Must be one of: Config, "Tool", "Procedure", "Utility", "TextUtility",  "TextProduct", "EditArea", "EditAreaGroup", "WeatherElementGroup", ColorTable", "SampleSet", "SelectTR", "Combinations".
Delete Mode:

-d Mandatory for delete mode Indicates DELETE mode, requires the -n switch.  The -c switch is used only for the class type of Config.
-n name Mandatory Indicates the name of the entry to be deleted from EDEX.
-c class Mandatory Indicates the type of the file.  Must be one of: Config, "Tool", "Procedure", "Utility", "TextUtility",  "TextProduct", "EditArea", "EditAreaGroup", "WeatherElementGroup", ColorTable", "SampleSet", "SelectTR", "Combinations".
Inventory Mode:

-i Mandatory for inventory mode Indicates INVENTORY mode.  The -c switch is used only for the class type of Config.
-c class Mandatory Indicates the type of the file.  Must be one of: Config, "Tool", "Procedure", "Utility", "TextUtility",  "TextProduct", "EditArea", "EditAreaGroup", "WeatherElementGroup", ColorTable", "SampleSet", "SelectTR", "Combinations"
Get Mode:

-g Mandatory for get mode Indicates GET mode, requires the -n switch. The -f switch is used to output the resulting file to another file, otherwise the output goes to the terminal. The -c switch is used only for the class type of Config.
-f filename Optional If present, the retrieved file will be written to the specified location.
-c class Mandatory Indicates the type of the file. Must be one of: Config, "Tool", "Procedure", "Utility", "TextUtility", "TextProduct", "EditArea", "EditAreaGroup", "WeatherElementGroup", ColorTable", "SampleSet", "SelectTR", "Combinations".
Note: The -h serverhost and -p port are predefined based on your installation configuration of GFESuite. The -h and -r will be defined for the server host and port specified during installation. If you wish to connect to another server, then these switches will be necessary.

Example Execution

Note that in the following examples, the -h and -p switches are not included. They will default to the currently installed EDEX configuration. Also in AWIPS2 the site switch becomes mandatory.

Saving Data

camper> ifpServerText -o LWX -s -n MyMaxTool -f ../examples/smartTools/Td_SmartTool.py -c Tool

Obtaining an Inventory

camper > ifpServerText -c Tool -i -o LWX

Getting Data

camper > ifpServerText -g -c Tool -n Assign_Value -f 1.txt -o LWX

Deleting Data

camper > ifpServerText -c Tool -d -n MyTool -o LWX


Output Formats

The output formats for each of the classes are described in this section.

Tool, Procedure, Utility, TextUtility, TextProduct, Config, Combinations

The output format is the exact copy of the file in EDEX.

EditArea

In AWIPS2 edit areas are now stored in xml format.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
< referenceData xmlns:ns2="group">
< polygons > MULTIPOLYGON (((-100.74059659999995 39.56791216000005, -100.73749659999999 39.56791216000005, -100.72409659999994 39.56801216000008, -100.72139659999999 39.56801216000008, -100.72009659999998 39.56571216000003, -100.72009659999998 39.56201216000005, -100.71999659999994 39.55391216000004, -100.72009659999998 39.54661216000005, -100.71999659999994 39.53941216000004, -100.71999659999994 39.53111216000008, -100.71999659999994 39.524712160000036, -100.72009659999998 39.520412160000035, -100.72019659999995 39.513312160000055, -100.72019659999995 39.50911216000003)))</polygons >
</referenceData >

EditAreaGroup

The output consists of a list of edit area names, one per line, that are contained within the edit area group, such as:

1
PPLN1HW

WeatherElementGroup

In AWIPS2 weather element groups are stored in xml files:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
< WEGroup name="FireWx" xmlns:ns2="group" xmlns:ns3="http://www.example.org/productType">
< WEItem relativeCycleNumber="-1" parmID="Hazards_SFC:OAX_GRID__Fcst_00000000_0000"/>
< WEItem relativeCycleNumber="-1" parmID="PoP_SFC:OAX_GRID__Fcst_00000000_0000"/>
< WEItem relativeCycleNumber="-1" parmID="QPF_SFC:OAX_GRID__Fcst_00000000_0000"/>
< WEItem relativeCycleNumber="-1" parmID="RH_SFC:OAX_GRID__Fcst_00000000_0000"/>
< WEItem relativeCycleNumber="-1" parmID="Sky_SFC:OAX_GRID__Fcst_00000000_0000"/>
< WEItem relativeCycleNumber="-1" parmID="T_SFC:OAX_GRID__Fcst_00000000_0000"/>
< WEItem relativeCycleNumber="-1" parmID="Td_SFC:OAX_GRID__Fcst_00000000_0000"/>
</WEGroup >

SelectTR

The output consists of the identical format of the user-defined selection time range in EDEX, such as:

54 78

SampleSet

In AWIPS2 sample sets are stored in xml files:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
< sampleData xmlns:ns2="group">
-95.2074,41.009
-95.6972,41.0414
-96.4373,41.4339
-96.6898,41.8389
-98.0257,42.7388
-96.75,40.86
-95.9,41.3
-97.43,41.98
-95.92,40.95
</sampleData>

ColorTable

In AWIPS2 color tables are stored in xml files:

< colorMap >
< color r="0" g="0" b="0" a="1" />
< color r="0.00392156862745098" g="0.00392156862745098" b="0.00392156862745098" a="1" />
< color r="0.00784313725490196" g="0.00784313725490196" b="0.00784313725490196" a="1" />
< color r="0.0117647058823529" g="0.0117647058823529" b="0.0117647058823529" a="1" />
< color r="0.0156862745098039" g="0.0156862745098039" b="0.0156862745098039" a="1" />
< color r="0.0196078431372549" g="0.0196078431372549" b="0.0196078431372549" a="1" />
< color r="1" g="1" b="1" a="1" />
</colorMap >