home
EGADS
Java Plotter
Sharc
Intro
Command Switches
Basic Design
Examples
Schedg
Mapsurfer
home
Sharc - Command Line Switches
Class Hierarchy
     Receiver --> Ashtech
              |-> Leica
              |-> Trimble
              |-> TRogue

     The receiver class implements some basic functionality:
     --storing a basic FAT and using that FAT to decide which
       indexes to download. These FAT entries are defined by the
       specific manufacturer subclasses
     --Using stored FAT, find receiver indexes that match a given
       time range. 
     --Using stored FAT, Create basic filenames using filename template
       defined in subclass.
     --Store basic session programming information which is made available
       to subclass for doing Receiver Session programming.
     
     Most of the Receiver class functions are virtual and need to be
     implemented by the subclass.

Basic flow of Sharc

Sharc is primarily designed to download and delete files from geodetic
quality GPS receivers. It also has hooks built in to do basic receiver
programming.

The basic flow of Sharc

    Read commands from sharc.cfg
                |
    Read command line switches
                |
    Create separate Receiver class instance for each
    download
                |
    Open serial port and optionally connect
    using modem or freewave
                |
    Get receiver ID
                |
    Download FAT (if necessary). This is only done
    if requested, or if one of the other operations 
    requested requires information from the FAT.
                |
    Download requested files (see explanation below)
                |
    Write Files (see explanation)
                |
    Delete requested files (see explanation below)
                |
    Download FAT (it could have changed)
                |
    Write FAT and exit

Download
     If given an index, download that index. Each class should
     only be responsible for one download. Store the downloaded file
     in memory until WriteFile is called. If the receiver does not 
     have a file structure, this call will do nothing.

     If given a time range (and optional list of indexes), use parent
     receiver class FindIndexesByTime routine to get list of indexes
     to download. Create a separate class for each resulting download and
     use the resulting class to download a single index. The resulting
     downloads should then be joined together into one large file rather
     than separate files. If the receiver does not have a file structure
     just download the relevant data.
Delete
     The same basic idea as above except separate class instances do
     not need to be created for the deletion. 
Write
     The writefile portion of each receiver class will only be called
     if the download returned successful. This routine should take care
     of writing out the downloaded file and any other information that
     should be added to the file (The Ashtech WriteFile routine adds the
     header segment and fat information).
Author:Keith F. Stark, Last Change: