OHyMoS.NET Class Library

OhElement.canYouCalculate メソッド 

計算開始の可・不可の判断をします。

Judgment whether calculation can be started or not.
public abstract bool canYouCalculate();

戻り値

a bool value

 ・true --> When calculation execution is possible. ・false -> When calculation execution is impossible. When calculation has finished. 

解説

まず、_currentTime が _terminalTime 以上の場合、計算済みと判断し false を返します。

次に、全ての所有受信端子が getNecessaryTimeFrom(), getNecessaryTimeTo() 間の データパックを取得可能であることを確認します。 取得可能な場合、計算実行可能と判断して true を返します。 取得不可能な場合、計算実行不可と判断して false を返します。

データが取得不可能であると返事をしてきた受信端子に対して計算要求を出します。 具体的には、受信端子に calReq() メッセージを送ります。
 [戻り値] ・true --> 計算実行可能の場合。 ・false -> 計算実行不可能の場合、または計算済みの場合。 

In classes derived from class Element, its definition should be given.

First, when "_currentTime" is more than "_terminalTime", it is judged that calculation has finished, and "false" is returned.

Next, it checks that all possession receiving ports can acquire the data pack between "getNecessaryTimeFrom" and "getNecessaryTimeTo". It is judged that calculation execution is possible the case of being acquirable, "true" is returned. It is judged that calculation execution is impossible the case of being unacquirable, "false" is returned.

A calculation request is advanced to the receiving port which will have replied that data is unacquirable. In particular, a calculation request message is sent to a receiving port.

例外

例外の種類条件
OhCannotGetDataErrorif an error occurs
OhErrorif an error occurs

参照

OhElement クラス | OhymosNet 名前空間