jpl.mipl.uplink.tour
Class IssSasf

java.lang.Object
  extended byjpl.mipl.uplink.tour.IssSasf

public class IssSasf
extends Object

The IssSasf class performs text processing on a Cassini ISS SASF file. It takes an ISS SASF file as input and outputs a Cassini ISS EGSE (Electronic Ground Support Equipment) script file or an ISS IOI file. This is the tour version.

Error messages are printed to standard error.

History

Version 1.0 8/13/2004 Vance Haemmerle: Initial delivery, IOIs limited to non-sep uploads
Version 1.1 12/02/2004 Vance Haemmerle: Use separation=false for getIteration(), fix counts, sep IOIs

Author:
Vance Haemmerle
See Also:
IssParameterSet, IssIoiHeader, IssIeb, IssPef, IssMacro

Nested Class Summary
 class IssSasf.Loop
          The Loop class is an inner class to allow Loops to be treated as objects
 
Constructor Summary
IssSasf()
           
 
Method Summary
 boolean checkTelem(Vector params, Vector isLoop, int telem)
          Return maximum Telemetry rate value for given macro
 boolean checkTelem(Vector nacParams, Vector nacIsLoop, Vector wacParams, Vector wacIsLoop, int telem)
          Return maximum Telemetry rate value for given macro
 void cleanUp(StringBuffer upload)
          Clean Marks from upload script
 void decrementLineNumber()
          Decrement the line counter variable.
 void doComments()
          Generate the EGSE script comments and put into script StringBuffer.
 int findMinTelemetryRate(IssMacro macro, String camera)
          Return maximum Telemetry rate value for given macro
 int getErrorCount()
          Returns the number of errors detected.
 StringBuffer getIoiHeader(IssIoiHeader header)
          Return IOI file text
 int getLineNumber()
          Returns the value of the current line.
 String getMark(StringBuffer upload, String mark)
          Get comment from upload script
 IssTrigger getTelemetryRateTrigger(int trigger)
          Return minimum Telemetry rate value for given trigger from PEF.
 int getWarningCount()
          Returns the number of warnings detected.
 void incrementLineNumber()
          Increment the line counter variable.
 void ioiWrite(IssMacro macro, String camera)
          Write out separate NAC/WAC IOI
 void lineError()
          Print an error message.
 void lineError(String msg)
          Print an error message.
 void lineWarning()
          Print a warning message.
 void lineWarning(String msg)
          Print a warning message.
static void main(String[] Args)
          Main Method.
 StringBuffer nonSepUpload(IssIeb ieb)
          Create the EGSE script for a non-separated upload
 void sepIoiMerge(StringBuffer nacUpload, StringBuffer wacUpload)
          Create the IOIs for a separated upload, recalculate Order Number
 void sepIoiWrite(IssMacro macro)
          Write out separate NAC/WAC IOIs
 StringBuffer sepUpload(IssIeb ieb, String camera)
          Create the EGSE script for a separated upload
 void setEgseFilename(String filename)
          Set the output filename for the EGSE file.
 void setEgseWacFilename(String filename)
          Set the output filename for the wac EGSE file.
 void setIoiFilename(String filename)
          Set the output filename for the Ioi file.
 void setSasfFilename(String filename)
          Set the Sasf input filename
 void setSeparation(boolean separation)
          Set the NAC/WAC separation feature
 void setUploadId(int id)
          Set the uploadId
 void setWacUploadId(int id)
          Set the wacUploadId
 void subsMark(StringBuffer nacUpload, StringBuffer wacUpload)
          Replace Marks from upload script
 void write()
          Writes an EGSE script(s) and IOI file(s) representation of this IssSasf.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IssSasf

public IssSasf()
Method Detail

setSasfFilename

public void setSasfFilename(String filename)
Set the Sasf input filename


setIoiFilename

public void setIoiFilename(String filename)
Set the output filename for the Ioi file.

Parameters:
filename - The output Ioi filename.

setEgseFilename

public void setEgseFilename(String filename)
Set the output filename for the EGSE file.

Parameters:
filename - The output EGSE filename.

setEgseWacFilename

public void setEgseWacFilename(String filename)
Set the output filename for the wac EGSE file.

Parameters:
filename - The output wac EGSE filename.

setSeparation

public void setSeparation(boolean separation)
Set the NAC/WAC separation feature

Parameters:
separation - Boolean, true if separate NAC/WAC output is desired

setUploadId

public void setUploadId(int id)
Set the uploadId

Parameters:
id - The upload ID, valid range is 1-65535

setWacUploadId

public void setWacUploadId(int id)
Set the wacUploadId

Parameters:
id - The WAC upload ID, valid range is 1-65535

write

public void write()
Writes an EGSE script(s) and IOI file(s) representation of this IssSasf. Does checking.


getLineNumber

public int getLineNumber()
Returns the value of the current line.


nonSepUpload

public StringBuffer nonSepUpload(IssIeb ieb)
Create the EGSE script for a non-separated upload


sepUpload

public StringBuffer sepUpload(IssIeb ieb,
                              String camera)
Create the EGSE script for a separated upload


sepIoiMerge

public void sepIoiMerge(StringBuffer nacUpload,
                        StringBuffer wacUpload)
Create the IOIs for a separated upload, recalculate Order Number


sepIoiWrite

public void sepIoiWrite(IssMacro macro)
Write out separate NAC/WAC IOIs


ioiWrite

public void ioiWrite(IssMacro macro,
                     String camera)
Write out separate NAC/WAC IOI


getTelemetryRateTrigger

public IssTrigger getTelemetryRateTrigger(int trigger)
Return minimum Telemetry rate value for given trigger from PEF.

Parameters:
trigger - Trigger number

findMinTelemetryRate

public int findMinTelemetryRate(IssMacro macro,
                                String camera)
Return maximum Telemetry rate value for given macro

Parameters:
macro - IssMacro object
camera - NAC, WAC or BOTH

checkTelem

public boolean checkTelem(Vector params,
                          Vector isLoop,
                          int telem)
Return maximum Telemetry rate value for given macro

Parameters:
params - Vector of parameter sets/loops
isLoop - Vector of booleans telling if vector entry is a loop
telem - Telemetry rate

checkTelem

public boolean checkTelem(Vector nacParams,
                          Vector nacIsLoop,
                          Vector wacParams,
                          Vector wacIsLoop,
                          int telem)
Return maximum Telemetry rate value for given macro

Parameters:
nacParams - Vector of NAC parameter sets/loops
nacIsLoop - Vector of booleans telling if NAC vector entry is a loop
wacParams - Vector of WAC parameter sets/loops
wacIsLoop - Vector of booleans telling if WAC vector entry is a loop
telem - Telemetry rate

getIoiHeader

public StringBuffer getIoiHeader(IssIoiHeader header)
Return IOI file text


getMark

public String getMark(StringBuffer upload,
                      String mark)
Get comment from upload script


subsMark

public void subsMark(StringBuffer nacUpload,
                     StringBuffer wacUpload)
Replace Marks from upload script


cleanUp

public void cleanUp(StringBuffer upload)
Clean Marks from upload script


incrementLineNumber

public void incrementLineNumber()
Increment the line counter variable. Used for keeping track of lines.


decrementLineNumber

public void decrementLineNumber()
Decrement the line counter variable. Used for keeping track of lines.


lineError

public void lineError(String msg)
Print an error message. See lineError() for more information.

Parameters:
msg - The error message to be printed to stdout.

getErrorCount

public int getErrorCount()
Returns the number of errors detected.

Returns:
The number of errors detected.

getWarningCount

public int getWarningCount()
Returns the number of warnings detected.

Returns:
The number of warnings detected.

lineError

public void lineError()
Print an error message.


lineWarning

public void lineWarning()
Print a warning message.


lineWarning

public void lineWarning(String msg)
Print a warning message. See lineWarning() for more information.

Parameters:
msg - The warning message to be printed to stdout.

doComments

public void doComments()
Generate the EGSE script comments and put into script StringBuffer.


main

public static void main(String[] Args)
Main Method. To run this program, type the following on the command line:

IssSasf sasfFile [-script] [-script] [-ioi] [-log logfile] [filename.pef] [-telem rate] [-usecalc] [-debug]