CBL_CTF_DEST

コンポネントもしくはデフォルトのエミッタリストからのエミッタの関連付けを行う(もしくは分離する)ことによって出力先を指定する。

構文:
call "CBL_CTF_DEST" using by value     flags
                          by reference component-id
                          by reference emitter-name
                             returning status-code
パラメタ:
呼び出しプロトタイプ使用時 ( 説明の読み方) PIC (32bitシステム)
flags cblt-x4-comp5 pic x(4) comp-5
component-id pic x(n) pic x(n)
emitter-name pic x(n) pic x(n)
status-code 説明の読み方 参照
入力パラメタ:
flags 制御フラグ:
ビット 内容
0 0 emitter-nameをcomponent-idに関連付ける。
1 emitter-nameをcomponent-idから分離する。
1 0 ペアレントからエミッタを引き継ぐ。
1 ペアレントからエミッタを引き継がない。ビット0が設定されている場合もしくはデフォルトのエミッタリストが指定されている場合は、無視される。
2-27 今後の使用のために予約済み。値は0であること。
28 0 emitter-nameはスペース終了。
1 emitter-nameはナル終了。
29 今後の使用のために予約済み。値は0であること。
30 0 component-idはスペース終了。
1 component-idはナル終了。ビット31が設定されていない場合は無視される。
31 0 component-idはCBL_CTF_TRACER_GETへの呼出しから返されたpic x(4) comp-5 トレーサ処理。
1 component-idはpic x(n)テキスト文字列。終了文字はビット30にて定義される。
component-id コンポネント一意名。フラッグのビット31が設定されていなければpic x(4) comp-5 トレーサ処理(CBL_CTF_TRACER_GETより)、設定されていればpic x(n)テキスト一意名になる。component-idがナルもしくは空白の文字列が指定されていれば、emitter-nameはデフォルトのエミッタリストに追加(もしくはエミッタリストから削除)される。
emitter-name スペースもしくはナル終了(ビット28の設定による)、大文字小文字の区別のないエミッタ名。
出力パラメタ:
status-code 以下のうちの1つ
  • 78-CTF-RET-EMITTER-NOT-FOUND
  • 78-CTF-RET-INVALID-COMP-NAME
  • 78-CTF-RET-INVALID-EMITTER-NAME
  • 78-CTF-RET-INVALID-TRACE-HANDLE
  • 78-CTF-RET-NOT-ENOUGH-MEMORY
  • 78-CTF-RET-SUCCESS
説明:

CBL_CTF_DESTにはmftrace.destおよびmftrace.dest.component-name設定ファイルエントリへの等価機能がある。

デフォルトのエミッタリストには常に1つ以上のエントリがある。デフォルトリストから最後のエントリが削除されると、TextFileエミッタが暗黙的に追加される。コンポネントのエミッタリストが空になると、ビット1フラッグが設定されていてペアレントからの引継ぎがないと表示されていても、ペアレントのエミッタが暗黙的に引き継がれる。

例:
 copy "cbltypes.cpy".
 copy "mfctf.cpy".

 01 component-name  pic x(4).
 01 emitter-name    pic x(10).
 01 flags           pic x(4) comp-5.

*> 1) Add TextFile to the default trace emitter list.

 ...
 move "TextFile" to emitter-name
 compute flags = 78-CTF-FLAG-DEST-ADD

 call "CBL_CTF_DEST" using by value flags
                          by value 0
                          by reference emitter-name
 ...

*> 2) Remove TextFile from the default trace emitter list.

 ...
 move "TextFile" to emitter-name
 compute flags = 78-CTF-FLAG-DEST-REMOVE

 call "CBL_CTF_DEST" using by value flags
                           by value 0
                           by reference emitter-name
 ...

*> 3) Associate the BinFile trace emitter with the RTS component.
*>    The RTS component will inherit the default trace emitters.

 ...
 move "RTS" to component-name
 move "ES" to emitter-name
 compute flags = 78-CTF-FLAG-DEST-ADD b-or
                 78-CTF-FLAG-COMPID-STRING

 call "CBL_CTF_DEST" using by value flags
                           by reference component-name
                           by reference emitter-name
 ...

*> 4) Make the BinFile trace emitter the only emitter the
*>    RTS component will use; that is, the RTS component will
*>    not inherit the default trace emitters.

 ...
 move "RTS" to component-name
 move "BinFile" to emitter-name
 compute flags = 78-CTF-FLAG-DEST-ADD b-or
                 78-CTF-FLAG-DEST-NOINHERIT
                 78-CTF-FLAG-COMPID-STRING

 call "CBL_CTF_DEST" using by value flags
                           by reference component-name
                           by reference emitter-name
 ...

関連項目