• 検索結果がありません。

public class EventFlag 標準仕様 イベントフラグアタッチクラス。

ドキュメント内 JTRON 2.1仕様 (ページ 142-148)

ITRON イベントフラグを操作するためのクラスである。

■クラス定義

package org.jtron.attach;

public class EventFlag {

public EventFlag(int flgid);

public EventFlag(int flgid, T_CFLG pk_cflg);

public EventFlag(T_CFLG pk_cflg);

public int getId();

public void delete();

public void set(int setptn);

public void clear(int clrptn);

public int waitFlag(int waiptn, int wfmode);

public int poll(int waiptn, int wfmode);

public int waitFlag(int waiptn, int wfmode, int tmout);

public T_RFLG refer();

public static final int TWF_ANDW = 0x00, TWF_ORW = 0x01;

}

■コンストラクタ

 

public EventFlag(int flgid) throws JtronException;

【パラメータ】

int flgid 既存の接続対象のイベントフラグID

番号(★)

【例外】

JtronException JTRON 例外クラス(ITRON による例 外クラスまたはJTRONによる例外ク ラス)

【機能】

イベントフラグIDを指定して、既存のイベントフラグに接続するイン スタンスを生成する。

public EventFlag(int flgid, T_CFLG pk_cflg)

throws ItronCauseException;

【パラメータ】

int flgid 生成対象のイベントフラグのID番号 (★)

T_CFLG pk_cflg イベントフラグ生成情報クラス

【例外】

ItronCauseException ITRONによる例外クラス

【機能】

cre_flgサービスコール呼び出しに相当する。

イベントフラグを生成し、接続するインスタンスを生成する。

public EventFlag(T_CFLG pk_cflg)

throws ItronCauseException;

128 

【パラメータ】

T_CFLG pk_cflg イベントフラグ生成情報クラス

【例外】

ItronCauseException ITRONによる例外クラス

【機能】

acre_flgサービスコール呼び出しに相当する。

イベントフラグを生成し、接続するインスタンスを生成する。

■メソッド

public int getId();

【戻り値】

int イベントフラグID(★)

【機能】

接続しているイベントフラグのイベントフラグIDを返す。

public void delete() throws ItronCauseException;

【例外】

ItronCauseException ITRONによる例外クラス

【機能】

del_flgサービスコール呼び出しに相当する。

public void set(int setptn) throws ItronCauseException;

【パラメータ】

int setptn セットするビットパターン(★)

 

【例外】

ItronCauseException ITRONによる例外クラス

【機能】

set_flgサービスコール呼び出しに相当する。

public void clear(int clrptn) throws ItronCauseException;

【パラメータ】

int clrptn クリアするビットパターン(ビット毎 の反転値)(★)

【例外】

ItronCauseException ITRONによる例外クラス

【機能】

clr_flgサービスコール呼び出しに相当する。

public int waitFlag(int waiptn, int wfmode)

throws ItronCauseException;

【パラメータ】

int waiptn 待ちビットパターン(★) int wfmode 待ちモード(★)

【戻り値】

int 待ち解除時のビットパターン(★)

【例外】

ItronCauseException ITRONによる例外クラス

【機能】

wai_flgサービスコール呼び出しに相当する。

130 

public int poll(int waiptn, int wfmode)

throws ItronCauseException;

【パラメータ】

int waiptn 待ちビットパターン(★) int wfmode 待ちモード(★)

【戻り値】

int 待ち解除時のビットパターン(★)

【例外】

ItronCauseException ITRONによる例外クラス

【機能】

pol_flgサービスコール呼び出しに相当する。

public int waitFlag(int waiptn, int wfmode, int tmout) throws ItronCauseException;

【パラメータ】

int waiptn 待ちビットパターン(★) int wfmode 待ちモード(★)

int tmout タイムアウト指定(単位:ms)(★)

【戻り値】

int 待ち解除時のビットパターン(★)

【例外】

ItronCauseException ITRONによる例外クラス

【機能】

twai_flgサービスコール呼び出しに相当する。

public int T_RFLG refer() throws JtronException;

 

【戻り値】

T_RFLG イベントフラグ状態のパケット形式

クラス

【例外】

JtronException JTRON 例外クラス(ITRON による例 外クラスまたはJTRONによる例外ク ラス)

【機能】

ref_flgサービスコール呼び出しに相当する。

■定数

TWF_ANDW 0x00 イベントフラグのAND待ち TWF_ORW 0x01 イベントフラグのOR待ち

【JTRON1.0仕様との相違および仕様決定の理由】

・referStatus()は名称が冗長なのでrefer()に変更した。

132 

4.2.7.2 イベントフラグ生成情報クラス(T_CFLG)

java.lang.Object

org.jtron.attach.T_CFLG

public class T_CFLG

標準仕様

ドキュメント内 JTRON 2.1仕様 (ページ 142-148)