[ libohymos | Source | Keywords | Summary | Ancestors | All Members | Descendants ]
Back to the top of Input_port
This is the base class from which the user creates his own input port models.
Do not confuse Input_port with Receive_port.
全体系モデルは,この基本型入力端子のクラスを継承してユーザが作成した
入力端子を通じてデータを入手するものとして設計されています。
全体系の内部に対して入力端子が入力データを受けとる役割をするという意
味では,入力端子は,基本型要素モデルの受信端子に似ていますが,全く別
のものと考えた方がよいです。
全体系モデルは, ファイル入出力, ネットワークによる入出力, キーボード
入力, CRT 出力など, 種々雑多なデータの入出力に対応しなければなりませ
ん。全体系モデルは, こうした雑多なデータを系の内部に取り込む時は, 全
て Data_pack 型のデータに変換しなければなりません。また,シミュレー
ション結果をシミュレーション実行者に提供する時は, Data_pack 型で蓄積
されているデータをシミュレーション実行者の望むデータ形式に変換しなけ
ればなりません。このようなデータの変換に関する具体的処理は, ユーザが
作成する入力端子, 出力端子で行うことにし, 全体系モデルの方では, 入力
端子・出力端子を一定の手続きで操作することにしました。すなわち,入力
端子,出力端子は,内部の定型的な処理と外部の処理との仲立ちをすること
になります。
Back to the top of Input_port
char* Data_pack_type(void) ;
Returns the string which shows data-type treated by the current
input-port. Because this is pure virtual, the function must be
defined in derived classes from this class.
We call the string returned by this funcion "data_pack_type".
純粋仮想関数です. Input_port の派生クラスで, 入力データパック型を
表す文字列へのポインタを返すように必ず定義して下さい.
例えば, 入力データパック型が "INT" である派生クラスでは,
接続時には, この端子と送信先端子とで Data_pack_type が一致するこ
とを確認します.
char* Data_pack_type(void) { return "INT"; }
のように定義します.
RETURN:
・char* 入力データパック型を表す文字列へのポインタ.
virtual char* Data_pack_type(void) = NULL;
Back to the top of Input_port
各入力端子で, 入力データからデータパックを作成し, データパックを送
信する関数を定義して下さい.
void Input_data(void) ;
virtual void Input_data(void) = NULL;
Back to the top of Input_port
void Creq(void) ;
void Creq(void) ;
Function is currently defined inline.
Back to the top of Input_port
Boolean Init(char* p_name, int p_num) ;
Execute Send_port::Init and returns a Boolean value which is
returned by Send_port::Init
Send_port::Init を実行します.
RETURN:
・YES 初期化が成功した場合.
・NO 二重に初期化された場合. (Object::Init)
EXIT:
・5 object_name の記憶領域が確保できない場合.
(Object::Init)
Boolean Init(char* p_name, int p_num) ;
Function is currently defined inline.
Back to the top of Input_port
Input_port( char* p_name, int p_num );
Constructor. Constructs by the use of default constructor of base
class Send_port and initializes the data members by the use of
Input_port::Init.
・class_name : "Input_port"
・object_name : p_name (ヒープにコピー)
・object_number : p_num
・owner : NULL
・buffer_list : ヒープに確保する. (接続作業用)
・receiver_array : NULL
・number_of_receivers : -1
・data_pack_array : NULL
・number_of_data_packs : -1
Input_port( char* p_name, // object_name int p_num // object_number );
Back to the top of Input_port
Input_port(void);
Constructor
デフォルトコンストラクタは, Input_port::Init を実行しません. その結
果, 以下の設定となります.
その他のメンバに対する処理は, 引数つきコンストラクタと同じです.
この場合, Input_port::Init を用いてメンバを初期化して下さい.
・object_name : NULL
・object_number : -1
Input_port(void);
Back to the top of Input_port
~Input_port(void);
Destructor
~Input_port(void);
Back to the top of Input_port
Back to the top of Input_port
Back to the top of Input_port
Back to the top of Input_port
Report problems to jkotula@stratasys.com