clarion.options.transfer
Class Transfer

java.lang.Object
  extended byclarion.options.transfer.Transfer
Direct Known Subclasses:
AcsTransfer, DimsTransfer, InterTransfer, NacsTransfer, RtTransfer, SubsysTransfer, SuperTransfer, TaskSpecTransfer

public class Transfer
extends java.lang.Object


Field Summary
protected  int AMN
          for generic input/output format.
protected  int BL
           
protected  int GKS
          for generic input/output format.
protected  Global global
          Global settings.
protected  int INPUT
          for generic input/output format.
protected  java.io.RandomAccessFile loadedFile
          the files for loading or saving the user option-selecting data.
protected  java.lang.String loadedFileName
          the names of files for loading or saving the user option-selecting data.
protected  TransferManager manager
           
protected  int OFF
           
protected  int ON
           
protected  int OUTPUT
          for generic input/output format.
protected  int SAVE_TO_FILE
          constants indicates save options to associated Global object or persistent storage
protected  int SAVE_TO_GLOBAL
          constants indicates save options to associated Global object or persistent storage
protected  int saveCode
           
protected  java.io.RandomAccessFile savedFile
          the files for loading or saving the user option-selecting data.
protected  java.lang.String savedFileName
          the names of files for loading or saving the user option-selecting data.
protected  java.lang.String subsysPath
           
protected static java.io.File sysDir
           
protected  Option[][][][][][] sysOptions
          used to store the user and system default options.
protected static java.lang.String sysPath
          variables for locating files.
protected  java.io.File sysSettingDir
           
protected  java.lang.String sysSettingPath
           
protected  int TL
           
protected  Option[][][][][][] userOptions
          used to store the user and system default options.
protected  int WM
          for generic input/output format.
 
Constructor Summary
Transfer(TransferManager manager, Global global)
          constructor.
 
Method Summary
 Option[] getOptions(int dim1, int dim2, int dim3, int dim4, int dim5)
          Get an array of particular options.
 Option getOptions(int dim1, int dim2, int dim3, int dim4, int dim5, int dim6)
          Get a particular option.
 void load()
          The process of loading options.
 Option[] loadOptions(java.lang.String path)
          load options from persistent storage with particulary path.
 void save()
          The process of saving options.
 void saveOptions(java.lang.String path, Option[] opts)
          save the options to persistent storage with particular path.
 java.lang.String searchFile(java.lang.String subSysName)
          search a most suitable setting directory for a particular subystem.
 java.lang.String searchFile(java.lang.String subSysName, java.lang.String fileName)
          search a most suitable setting directory for a particular subystem name and file name for a component in that subsystem.
 void setGlobal(Global global)
          Sets the associated Global object.
 void setSaveCode(int code)
          Set the mode of saving options: 0: save to Global object; 1: save to persistent storage.
 void setupGenericFormat(int compType, int inOut, int netIdx, Option opt)
          Sets up the inpt/output dimension information for WM, GKS, AMN.
 void update()
          the process of update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SAVE_TO_GLOBAL

protected final int SAVE_TO_GLOBAL
constants indicates save options to associated Global object or persistent storage

See Also:
Constant Field Values

SAVE_TO_FILE

protected final int SAVE_TO_FILE
constants indicates save options to associated Global object or persistent storage

See Also:
Constant Field Values

WM

protected final int WM
for generic input/output format.

See Also:
Constant Field Values

GKS

protected final int GKS
for generic input/output format.

See Also:
Constant Field Values

AMN

protected final int AMN
for generic input/output format.

See Also:
Constant Field Values

INPUT

protected final int INPUT
for generic input/output format.

See Also:
Constant Field Values

OUTPUT

protected final int OUTPUT
for generic input/output format.

See Also:
Constant Field Values

ON

protected final int ON
See Also:
Constant Field Values

OFF

protected final int OFF
See Also:
Constant Field Values

TL

protected final int TL
See Also:
Constant Field Values

BL

protected final int BL
See Also:
Constant Field Values

manager

protected TransferManager manager

global

protected Global global
Global settings.


saveCode

protected int saveCode

loadedFileName

protected java.lang.String loadedFileName
the names of files for loading or saving the user option-selecting data.


savedFileName

protected java.lang.String savedFileName
the names of files for loading or saving the user option-selecting data.


loadedFile

protected java.io.RandomAccessFile loadedFile
the files for loading or saving the user option-selecting data.


savedFile

protected java.io.RandomAccessFile savedFile
the files for loading or saving the user option-selecting data.


userOptions

protected Option[][][][][][] userOptions
used to store the user and system default options.


sysOptions

protected Option[][][][][][] sysOptions
used to store the user and system default options.


sysPath

protected static java.lang.String sysPath
variables for locating files.


sysDir

protected static java.io.File sysDir

sysSettingPath

protected java.lang.String sysSettingPath

sysSettingDir

protected java.io.File sysSettingDir

subsysPath

protected java.lang.String subsysPath
Constructor Detail

Transfer

public Transfer(TransferManager manager,
                Global global)
constructor. instantiated with the associated TransferManager object and Global object.

Method Detail

setGlobal

public void setGlobal(Global global)
Sets the associated Global object.

Parameters:
global - the Global object to set.

load

public void load()
The process of loading options.


save

public void save()
The process of saving options.


update

public void update()
the process of update. This process is necessary because some options or Global variables cannot be configured correctly at first time due to lack of information which can be known lately.


getOptions

public Option[] getOptions(int dim1,
                           int dim2,
                           int dim3,
                           int dim4,
                           int dim5)
Get an array of particular options. arguments dim1 through dim5 are all indices on a 6-dimension array which stores all options of a particular subsystem.


getOptions

public Option getOptions(int dim1,
                         int dim2,
                         int dim3,
                         int dim4,
                         int dim5,
                         int dim6)
Get a particular option. arguments dim1 through dim6 are all indices on a 6-dimension array which stores all options of a particular subsystem.


setSaveCode

public void setSaveCode(int code)
Set the mode of saving options: 0: save to Global object; 1: save to persistent storage.

Parameters:
code - the mode of saving options.

loadOptions

public Option[] loadOptions(java.lang.String path)
load options from persistent storage with particulary path.


saveOptions

public void saveOptions(java.lang.String path,
                        Option[] opts)
save the options to persistent storage with particular path.


setupGenericFormat

public void setupGenericFormat(int compType,
                               int inOut,
                               int netIdx,
                               Option opt)
Sets up the inpt/output dimension information for WM, GKS, AMN.


searchFile

public java.lang.String searchFile(java.lang.String subSysName)
search a most suitable setting directory for a particular subystem.

Parameters:
subSysName - the name of the subsystem.

searchFile

public java.lang.String searchFile(java.lang.String subSysName,
                                   java.lang.String fileName)
search a most suitable setting directory for a particular subystem name and file name for a component in that subsystem.

Parameters:
subSysName - the name of the subsystem.
fileName - file name for component.