PreEScope0 : A Program to Connect to MDSplus
This is the first program of the PreEscope series. The specifications of this program are as follows:

- It will run in the command line and take four arguments: the server address and port (in the form ``address:portNo''), the name of the experiment, the shot number and the path name of the signal to be displayed.
- After checking that the arguments have been supplied correctly, the program will open a connection with the MDSplus database server and download the data corresponding to a particular dataset.
- The X and Y data arrays of this dataset are then written to two
  binary files data_yVals and data_xVals.
- The Plotter.plot method will be called to plot the data.

To exercise this program the following steps are required:

1. If not already running, start a MDSplus data server. On windows, click on start->programs->MDSplus->MDSDataserver. On Linux, run script start_mdsip.
2. Change directory in <source root>/preescopes/preescope0, where <source root> is the directory where you copied the source directory in the CD.
3. Include the current directory in your CLASSPATH environmante variable. On Windows this can be done by changing the CLASSPATH definition in Control Panel/System setting, or by the command
   set CLASSPATH=.;%CLASSPATH%
   On Linux (bash shell) this can be done by the command
   export CLASSPATH=.:$CLASSPATH
4. Compile the java source files with the command
   javac *.java
5. Run the program with the proper arguments. In the following example, it is assument that the MDSplus data server is running locally, and the signal whose path name is signals.pb.pbmc01_im in experiment edam, shot No. 17615 is displayed. Note that experiment edam, shot 17615 is provided in the MDSplus installation.
   java PreEScope0 localhost:8000 edam 17615 signals.pb.pbmc01_im

View Source