ohymosj
クラス OhScfSubSystem

java.lang.Object
  拡張ohymosj.OhObject
      拡張ohymosj.OhElement
          拡張ohymosj.OhSubSystem
              拡張ohymosj.OhScfSubSystem

public class OhScfSubSystem
extends OhSubSystem

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

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

ScfSubSystem; Sub system class configured from a "structure configuration file".

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

フィールドの概要
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.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
 
コンストラクタの概要
OhScfSubSystem()
           デフォルトコンストラクタです。
 
メソッドの概要
 void connectComponents()
           部分系モデル内部の直接通信接続を OhElement.register(Object, int) を用いて定義します。
 void connectPorts()
           部分系モデル内部の端子の接続を OhSubSystem.connect() を用いて定義します。
 boolean init(java.lang.String aObjName, int aObjNum, OhBufferedReader aBr)
          Initialize the element with the information obtained from the file.
 void registerComponents()
           全構成要素のうち、反復計算を行なわない構成オブジェクトのアドレスを _componentArray に登録します。
 void registerIterators()
           このメソッドは、全構成要素のうち、反復計算を行なう要素のアドレスを _iteratorArray に登録します。
 void registerReceivePorts()
           受信側中継端子を登録します。
 void registerSendPorts()
           送信側中継端子を登録します。
 
クラス ohymosj.OhSubSystem から継承したメソッド
areYouReady, calculate, calculateIterationStep, calculateTimeStep, canYouCalculate, canYouRenewCurrentTime, canYouSwitch, clearDataString, connect, connect, connect, connect, connect, connect, connect, construct, doInitialWork, doShareInfo, doYouConverge, doYouReachTargetTime, flushData, getComponent, getComponent, getInitialState, getNecessaryTimeFrom, getNecessaryTimeTo, getParameter, init, init, init, init, init, init, initializeIteratorArray, initializeTargetTime, initialOutput, initialWork, isInitialTime, printComponents, printComponents, register, register, register, renewFixedTime, renewTargetTime, rewindCurrentTime, saveSendPortStock, saveTerminalState, setInitialState, setParameter, terminalState, work
 
クラス ohymosj.OhElement から継承したメソッド
calculateIterationStep, calReq, canYouCalculate0, canYouCalculate1, canYouGetDataString, canYouRenewCurrentTime, canYouSetObjectArray, canYouShareInfo, create, doYouConverge, doYouReachTargetTime, flushData, getComponent, getComponent, getCurrentTime, getFixedTime, getFromArray, getFromArray, getFromList, getFromList, getMediumTermTargetTime, getNecessaryTimeFrom, getNecessaryTimeTo, getNextTime, getObject, getObject, getReceivePort, getReceivePort, getReceivePort, getReceivePort, getSendPort, getSendPort, getSendPort, getSendPort, getTargetTime, getTerminalTime, getTimeStep, 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.

コンストラクタの詳細

OhScfSubSystem

public OhScfSubSystem()
デフォルトコンストラクタです。

メソッドの詳細

init

public boolean init(java.lang.String aObjName,
                    int aObjNum,
                    OhBufferedReader aBr)
             throws OhError
Initialize the element with the information obtained from the file.
 [in] objectname -- object name
 [in] objnum     -- object number
 [in] fp         -- file pointer
 

オーバーライド:
クラス OhElement 内の init
パラメータ:
aObjName - a String value
aObjNum - an int value
aBr - an OhBufferedReader value
戻り値:
a boolean value
例外:
OhError - if an error occurs

registerReceivePorts

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

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

registerSendPorts

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

定義:
クラス OhSubSystem 内の 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() 参照)

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

registerIterators

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

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

connectPorts

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

定義:
クラス OhSubSystem 内の 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
 

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