
 $Id$

See the INSTALL file for build instructions.

For more information on Hyrax and the BES, please visit our documentation
wiki at docs.opendap.org. This will include the latest install and build
instructions, the latest configuration inforamtion, tutorials, how to
develop new modules for the BES, and more.

Contents
  What's here: What files are in the distribution
  Configuration: How to configure the hello world example
  Testing: Once built and configured, how do you know it works?

* What's here:

The csv-handler example module provides developers with an example of how
modules and data request handlers are added in to the BES dynamically.

* Configuration

The bes.conf file should work as is. The RootDirectory parameters are
pointing to the current directory. In order to use the bes.conf file for
this example, set the environment variable BES_CONF to point to the bes.conf
file located in this directory.

      setenv BES_CONF ./bes.conf

      or

      BES_CONF=./bes.conf
      export BES_CONF

* Testing

To test the server, open a new terminal window and start the bes by using
the bes control script besctl, which is installed in <prefix>/bin.
using the -c switch to name the configuration file. If the server standalone
starts correctly it should print something like the following to stdout:

    [jimg@zoe sbin]$ besctl start
    BES install directory: <prefix>/bin
    Starting the BES daemon
    PID: <process_id> UID: <uid of process>

Go back to your first window and run the bescmdln program. Use the -h (host)
and -p (port) switches to tell it how to connect to the BES.

    [jimg@zoe bin]$ bescmdln -p 10002 -h localhost

    Type 'exit' to exit the command line client and 'help' or '?' to display
    the help screen

    BESClient>

Try the a simple command first:

    BESClient> show help;
    <showHelp>
	<response>

	...

	</response>
    </showHelp>
    BESClient>

Note that all commands must end with a semicolon except 'exit'.

Now try to get some data:

    BESClient> set container in catalog values c,data/csv/temperature.csv;
    BESClient> define d as c;
    BESClient> get das for d;
    Attributes {
	Station {
	    String type String;
	}
	latitude {
	    Float32 type Float32;
	}
	longitude {
	    Float32 type Float32;
	}
	temperature_K {
	    Float32 type Float32;
	}
	Notes {
	    String type String;
	}
    }

    BESClient> get dds for d;
    Dataset {
	String Station[record = 5];
	Float32 latitude[record = 5];
	Float32 longitude[record = 5];
	Float32 temperature_K[record = 5];
	String Notes[record = 5];
    } .//temperature.csv;

    BESClient> get ascii for d;
    Dataset: .//temperature.csv
    Station, "CMWM", "BWWJ", "CWQK", "CRLM", "FOOB"
    latitude, -34.7, -34.2, -32.7, -33.8, -32.9
    longitude, 23.7, 21.5, 22.3, 22.1, 23.4
    temperature_K, 264.3, 262.1, 268.4, 270.2, 269.69
    Notes, "", "Foo", "", "Blah", "FOOBAR"

Now exit the command line client:

    BESClient> exit
    [jimg@zoe bin]$

To stop the BES use the bes control script with the stop option:

    [jimg@zoe sbin]$ besctl start

