ohymosj
クラス OhScfTotalSystem

java.lang.Object
  拡張ohymosj.OhObject
      拡張ohymosj.OhElement
          拡張ohymosj.OhSubSystem
              拡張ohymosj.OhTotalSystem
                  拡張ohymosj.OhScfTotalSystem

public class OhScfTotalSystem
extends OhTotalSystem

構造定義ファイルを使用して構成される全体系を表すクラスです。

このクラスは、端子や構成要素の構成をファイル "Structure Configuration File" から 読みとって作りあげる全体系のクラスです。

ScfTotalSystem; Total system class configured from a "structure configuration file".

バージョン:
$Revision: 1.13 $ $Date: 2004/03/08 17:03:02 $
作成者:

フィールドの概要
protected  OhElement[] _elements
          Usual(Non-iterate) Components.
protected  OhElement[] _iterators
          Iterator Components.
protected  int _numOfElements
          Number of usual components.
protected  int _numOfIterators
          Number of iterator components.
protected  int _numOfReceivePorts
          Number of relay ports for receiving data.
protected  int _numOfSendPorts
          Number of relay ports for sending data.
protected  OhPort[] _receivePorts
          The array where relay ports for receiveing data are stored.
protected  java.lang.String _scfFile
          "Structure Configuration File" Name.
protected  OhPort[] _sendPorts
          The array where relay ports for sending data are stored.
 
クラス ohymosj.OhTotalSystem から継承したフィールド
_mediumTermTargetTime, _newestDataTimeCol, _terminalTime
 
クラス ohymosj.OhSubSystem から継承したフィールド
_componentArray, _iteratorArray, _numberOfComponents, _numberOfIterators, _numberOfIteratorSets
 
クラス ohymosj.OhElement から継承したフィールド
_calReqP, _currentTime, _dataString, _fixedTime, _initialWorkDoneP, _numberOfObjects, _numberOfReceivePorts, _numberOfSendPorts, _objectArray, _objectList, _receivePortArray, _sendPortArray, _shareInfoDoneP, _targetTime, _timeStep
 
クラス ohymosj.OhObject から継承したフィールド
_className, _objectName, _objectNumber, _owner, NEWLINE
 
コンストラクタの概要
OhScfTotalSystem(java.lang.String aFileName)
           デフォルトコンストラクタです。
 
メソッドの概要
 void connectComponents()
           部分系モデル内部の直接通信接続を OhElement.register(Object, int) を用いて定義します。
 void connectPorts()
           部分系モデル内部の端子の接続を OhSubSystem.connect() を用いて定義します。
 void registerComponents()
           全構成要素のうち、反復計算を行なわない構成オブジェクトのアドレスを _componentArray に登録します。
 void registerInputPorts()
           受信側中継端子を登録します。
 void registerIterators()
           このメソッドは、全構成要素のうち、反復計算を行なう要素のアドレスを _iteratorArray に登録します。
 void registerOutputPorts()
           送信側中継端子を登録します。
 void registerReceivePorts()
           OhScfTotalSystem.registerOutputPorts() を実行します。
 void registerSendPorts()
           OhScfTotalSystem.registerInputPorts() を実行します。
 void setInitialState(OhBufferedReader aBr)
           文字入力ストリーム aBr から _currentTime を読み込みます。
 
クラス ohymosj.OhTotalSystem から継承したメソッド
addNewestDataTime, calculate, calculateTimeStep, canYouInputDataTime, deliverDataString, doShareInfo, getMediumTermTargetTime, getNecessaryTimeFrom, getNecessaryTimeTo, getNewestDataTimeCol, getTerminalTime, init, init, init, init, initialOutput, initialWork, inputData, makeDataString, outputData, printInputs, printInputs, printOutputs, printOutputs, readInitialStateFile, readParameterFile, readSendPortFile, saveTerminalState, setOhymosjOption, work, writeSendPortStock, writeTerminalState
 
クラス ohymosj.OhSubSystem から継承したメソッド
areYouReady, calculateIterationStep, canYouCalculate, canYouRenewCurrentTime, canYouSwitch, clearDataString, connect, connect, connect, connect, connect, connect, connect, construct, doInitialWork, doYouConverge, doYouReachTargetTime, flushData, getComponent, getComponent, getInitialState, getNecessaryTimeFrom, getNecessaryTimeTo, getParameter, init, init, init, init, init, initializeIteratorArray, initializeTargetTime, isInitialTime, printComponents, printComponents, register, register, register, renewFixedTime, renewTargetTime, rewindCurrentTime, saveSendPortStock, setParameter, terminalState
 
クラス ohymosj.OhElement から継承したメソッド
calculateIterationStep, calReq, canYouCalculate0, canYouCalculate1, canYouGetDataString, canYouRenewCurrentTime, canYouSetObjectArray, canYouShareInfo, create, doYouConverge, doYouReachTargetTime, flushData, getComponent, getComponent, getCurrentTime, getFixedTime, getFromArray, getFromArray, getFromList, getFromList, getNecessaryTimeFrom, getNecessaryTimeTo, getNextTime, getObject, getObject, getReceivePort, getReceivePort, getReceivePort, getReceivePort, getSendPort, getSendPort, getSendPort, getSendPort, getTargetTime, getTimeStep, init, makeObjectArray, printConnection, printConnection, printConnection, printConnection, printObjects, printReceivePorts, printReceivePorts, printReceivePorts, printReceivePorts, printSendPorts, printSendPorts, printSendPorts, printSendPorts, printStatus, recordStatus, reduceDataPackStock, renewFixedTime, renewTargetTime, restoreSendPortStock, rewindCurrentTime, sendStockedData, setCur2Fix2Tar, setDataPackArray, work0, work1, work2
 
クラス ohymosj.OhObject から継承したメソッド
cPrint, getAbsName, getClassName, getObjectName, getObjectNumber, getOwner, getTopOwner, objCompare, objCompare, objCompare, oPrint, setOwner
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

_receivePorts

protected OhPort[] _receivePorts
The array where relay ports for receiveing data are stored.


_numOfReceivePorts

protected int _numOfReceivePorts
Number of relay ports for receiving data.


_sendPorts

protected OhPort[] _sendPorts
The array where relay ports for sending data are stored.


_numOfSendPorts

protected int _numOfSendPorts
Number of relay ports for sending data.


_elements

protected OhElement[] _elements
Usual(Non-iterate) Components.


_numOfElements

protected int _numOfElements
Number of usual components.


_iterators

protected OhElement[] _iterators
Iterator Components.


_numOfIterators

protected int _numOfIterators
Number of iterator components.


_scfFile

protected java.lang.String _scfFile
"Structure Configuration File" Name.

コンストラクタの詳細

OhScfTotalSystem

public OhScfTotalSystem(java.lang.String aFileName)
                 throws OhError
デフォルトコンストラクタです。

パラメータ:
aFileName - a String value
例外:
OhError - if an error occurs
メソッドの詳細

registerInputPorts

public void registerInputPorts()
                        throws OhError
受信側中継端子を登録します。 OhSubSystem.construct() から呼ばれます。 登録されていない受信側中継端子は接続できません。

定義:
クラス OhTotalSystem 内の registerInputPorts
例外:
OhError - if an error occurs

registerReceivePorts

public void registerReceivePorts()
                          throws OhError
OhScfTotalSystem.registerOutputPorts() を実行します。

オーバーライド:
クラス OhTotalSystem 内の registerReceivePorts
例外:
OhError - if an error occurs

registerOutputPorts

public void registerOutputPorts()
                         throws OhError
送信側中継端子を登録します。 OhSubSystem.construct() から呼ばれます。 登録されていない送信側中継端子は接続できません。

定義:
クラス OhTotalSystem 内の registerOutputPorts
例外:
OhError - if an error occurs

registerSendPorts

public void registerSendPorts()
                       throws OhError
OhScfTotalSystem.registerInputPorts() を実行します。

オーバーライド:
クラス OhTotalSystem 内の registerSendPorts
例外:
OhError - if an error occurs

registerComponents

public void registerComponents()
                        throws OhError
全構成要素のうち、反復計算を行なわない構成オブジェクトのアドレスを _componentArray に登録します。

登録されていない構成オブジェクトには、計算実行命令を送ることができません。

例えば、派生クラスで構成オブジェクト abc をメンバ変数として定義した場合、 次のように abc を登録します。

   public void registerComponents() {
     register((Object)abc);
   }
 
この時、必ず abc を Object 型にキャストして下さい。

これにより abc は、一時的に _objectList に収録された後、 最終的に Object 型配列 _componentArray 中に記憶されます。 (OhSubSystem.construct() 参照)

定義:
クラス OhTotalSystem 内の registerComponents
例外:
OhError - if an error occurs

registerIterators

public void registerIterators()
                       throws OhError
このメソッドは、全構成要素のうち、反復計算を行なう要素のアドレスを _iteratorArray に登録します。 反復計算を行なう部分系モデルを新に作成するプログラマが、このメソッドを定義しなければなりません。

定義:
クラス OhTotalSystem 内の registerIterators
例外:
OhError - if an error occurs

connectPorts

public void connectPorts()
                  throws OhError
部分系モデル内部の端子の接続を OhSubSystem.connect() を用いて定義します。

定義:
クラス OhTotalSystem 内の connectPorts
例外:
OhError - if an error occurs

connectComponents

public void connectComponents()
                       throws OhError
部分系モデル内部の直接通信接続を OhElement.register(Object, int) を用いて定義します。
 [ConnectComponents]
 c 2 c 3 0 # mElmnt[2]->Register((void*)mElmnt[3], 0)
 i 0 i 1 2 # mIte[0]->Register((void*)mIte[1], 2);
 z # end mark
 

定義:
クラス OhTotalSystem 内の connectComponents
例外:
OhError - if an error occurs

setInitialState

public void setInitialState(OhBufferedReader aBr)
                     throws OhError
文字入力ストリーム aBr から _currentTime を読み込みます。 ファイルから _currentTime を読み取る場合がほとんどと思われます。

Set initial state by reading a file.

オーバーライド:
クラス OhTotalSystem 内の setInitialState
パラメータ:
aBr - an OhBufferedReader value
例外:
OhError - if an error occurs