「PIONEコマンドのTIPS」の版間の差分

提供: Eospedia
移動: 案内検索
(pione定義書、パッケージ)
行12: 行12:
 
<pre>
 
<pre>
 
$ pione clean
 
$ pione clean
 +
</pre>
 +
<br>
 +
 +
==== デバッグモード実行 ====
 +
pioneで始まる[[PIONE]]のコマンドのほとんどは--debugを付けるとデバッグモードで起動することができます。エラー報告の情報の一つとして利用できます。<br>
 +
<pre>
 +
$ pione-client HelloWorld.pione --debug
 +
debug: "pione-client" has executed an item "validate_task_worker_size" at the phase "". [/Eos/pione/lib/rootage/core.rb:425:in `execute_item'] (2014-12-05T17:01:42.709+09:00, #22178)
 +
debug: "pione-client" has executed an item "stream_location" at the phase "". [/Eos/pione/lib/rootage/core.rb:425:in `execute_item'] (2014-12-05T17:01:42.710+09:00, #22178)
 +
debug: "pione-client" has executed an item "option" at the phase "init". [/Eos/pione/lib/rootage/core.rb:425:in `execute_item'] (2014-12-05T17:01:42.710+09:00, #22178)
 +
debug: "pione-client" has executed an item "argument" at the phase "init". [/Eos/pione/lib/rootage/core.rb:425:in `execute_item'] (2014-12-05T17:01:42.710+09:00, #22178)
 +
 +
-後略-
 
</pre>
 
</pre>
 
<br>
 
<br>

2014年12月5日 (金) 08:04時点における版

 PIONEコマンド作成に関するTIPSを示します。実装例はPIONEチュートリアルPIONEチュートリアル-PNML、実行例はPIONE Webclientチュートリアルをご覧下さい。

pione定義書、パッケージ

pione定義書やパッケージの実行

ログ(pione-process.log)の見方

主にpione log formatを使用して出力されたファイルをProMで閲覧すると見やすいです。詳しくはPIONEチュートリアル-XESをご覧下さい。

不要ファイルを削除したい

下記のコマンドでPIONE動作時に作成される作業ファイルのうち使用していないものを削除することができます。動作が遅いときやメンテナンスしたいときに使用してみましょう。

$ pione clean


デバッグモード実行

pioneで始まるPIONEのコマンドのほとんどは--debugを付けるとデバッグモードで起動することができます。エラー報告の情報の一つとして利用できます。

$ pione-client HelloWorld.pione --debug
debug: "pione-client" has executed an item "validate_task_worker_size" at the phase "". [/Eos/pione/lib/rootage/core.rb:425:in `execute_item'] (2014-12-05T17:01:42.709+09:00, #22178)
debug: "pione-client" has executed an item "stream_location" at the phase "". [/Eos/pione/lib/rootage/core.rb:425:in `execute_item'] (2014-12-05T17:01:42.710+09:00, #22178)
debug: "pione-client" has executed an item "option" at the phase "init". [/Eos/pione/lib/rootage/core.rb:425:in `execute_item'] (2014-12-05T17:01:42.710+09:00, #22178)
debug: "pione-client" has executed an item "argument" at the phase "init". [/Eos/pione/lib/rootage/core.rb:425:in `execute_item'] (2014-12-05T17:01:42.710+09:00, #22178)

-後略-


アクションファイル

デバッグ方法

pione action

アクションファイルのテスト・デバッグのためにpione actionを利用することができます。

list

pione action listはアクションファイル内のルール(transition)名をリストとして出力します。

/PIONE-PNML$ pione action list Basic2/Serial2.md 
First
Second


print

pione action printはアクションファイル内の指定したルール(transition)のコードを出力します。

/PIONE-PNML$ pione action print Basic2/Serial2.md First
awk '{print $1*2}' {$I[1]} > {$O[1]}
/PIONE-PNML$ pione action print Basic2/Serial2.md Second
awk '{print $1+1}' {$I[1]} > {$O[1]}


exec

pione action execはアクションファイル内の指定したルール(transition)のコードを実行します。

/PIONE-PNML$ pione action exec Basic1/HelloWorld.md Hello
/PIONE-PNML$ cat {[1]}
Hello PIONE world !