Salamander Data Supplier C Developer Information
Code:
This is release 2.0.b2 (occurred
on ).
Here is the latest gzip'd tarfile for the salamander
data supplier interface.
It consists of these files:
-
Makefile
-
salamanderSupplier.c
-
salamanderInterface.h
-
salamanderInterface.c
-
salamanderUtil.h
-
salamanderUtil.c
-
propertyList.h
-
propertyList.c
See the sample Makefile for compilation.
WARNING:
The libraries needed for linking will vary depending on your system.
The example Makefile works under solaris.
The property list manipulation routines needed are:
-
plist_t createPropertyList(void);
-
void destroyPropertyList(plist_t plist)
-
int updateProperty(plist_t plist, char * key, char * value);
An example supplier is provided
that uses the following interface routines:
-
int connectToSalamanderServer(char * hostname, u_long sskey);
-
void disconnectFromSalamanderServer(void);
-
int salamanderSendServerData(plist_t plist, void * data, u_long data_length);
CAVEAT:
This is a VERY simple blocking send interface to the salamander server.
If your application needs more control over it's data delivery, please
use an alternate interface.
Usage Notes:
The basic idea, is that data suppliers provide data objects into the system.
These objects have attributes associated with them. These attributes describe
the data object in a way such that data subscribers can pick and chose
among them. The salamander system makes this object and property separation
explicit at the interface level. When providing an object to the system
through the sendSalamanderServerData routine, you provide a property list
(plist) and the object (along with its size in bytes). The interface then
gives this object and its properties to the salamander system which in
turn gives it to any subscribers who may want it.
Property lists are created with the routines in the propertyList.c
file. Property lists are just lists of properties. Aproperty consists
of two strings: a key, and a value. The key string identifies the property;
and the value string represents the property's value.
To illustrate the data supply process, take the example of the UARC
Sondrestrom Radar supplier. This supplier generates radar datasets at regular
intervals. For each radar dataset, it creates a property list with the
following two properties:
-
key = "NAME", value = "Sondresrom:Radar:DREC"
-
key = "TIMESTAMP", value = "89023423.234546"
The NAME is a well-known property that identifies the object's
type. Every data supplier MUST chose a unique name.
The TIMESTAMP is another well-known property that represents
the UT time in seconds since January 1, 1970. It is constructed of two
numeric string catenated with a period. The first number represents the
number of seconds; the second number the microseconds. These are the two
values from the unix structure:
struct timeval {u_long tv_sec; u_long tv_usec};
Together these two properties are enough to uniquely describe the data
object, specifically the radar dataset. This is IMPORTANT, the set
of properties you generate for an object must uniquely identify it within
the system.
See the salamanderSupplier.c
code for Unix code that generates these two well-known properties.
Salamander homepage
rmalan@eecs.umich.edu