mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Reorganise nodes into new categories
This commit is contained in:
51
packages/node_modules/@node-red/nodes/locales/ja/function/10-function.html
vendored
Normal file
51
packages/node_modules/@node-red/nodes/locales/ja/function/10-function.html
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="function">
|
||||
<p>受信メッセージに対して処理を行うJavaScriptコード(関数の本体)を定義します。</p>
|
||||
<p>入力メッセージは<code>msg</code>という名称のJavaScriptオブジェクトで受け渡されます。</p>
|
||||
<p><code>msg</code>オブジェクトは<code>msg.payload</code>プロパティにメッセージ本体を保持するのが慣例です。</p>
|
||||
<p>通常、コードはメッセージオブジェクト(もしくは複数のメッセージオブジェクト)を返却します。後続フローの実行を停止したい場合は、オブジェクトを返却しなくてもかまいません。</p>
|
||||
<h3>詳細</h3>
|
||||
<p>コードの書き方の詳細については、<a target="_blank" href="http://nodered.org/docs/writing-functions.html">オンラインドキュメント</a>を参照してください。</p>
|
||||
<h4>メッセージの送信</h4>
|
||||
<p>フロー内の次ノードにメッセージを渡すためには、メッセージを返却するか<code>node.send(messages)</code>を呼び出します。</p>
|
||||
<p>返却/sendの対象は次のとおりです:</p>
|
||||
<ul>
|
||||
<li>単一メッセージオブジェクト - 最初の出力に接続されたノードに渡されます</li>
|
||||
<li>メッセージオブジェクトの配列 - 対応する出力に接続されたノードに渡されます</li>
|
||||
</ul>
|
||||
<p>配列要素が配列の場合には、複数のメッセージを対応する出力に送出します。</p>
|
||||
<p>返却方法が単一値か配列要素かにかかわらず、返却値がnullの場合メッセージの送出は行いません。</p>
|
||||
<h4>ログ出力とエラー処理</h4>
|
||||
<p>ログ情報の出力、エラー出力を行うには以下の関数を用います:</p>
|
||||
<ul>
|
||||
<li><code>node.log("ログメッセージ")</code></li>
|
||||
<li><code>node.warn("警告")</code></li>
|
||||
<li><code>node.error("エラー")</code></li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>catchノードを用いてエラー処理が可能です。catchノードで処理させるためには、<code>msg</code>を<code>node.error</code>の第二引数として渡します:</p>
|
||||
<pre>node.error("エラー",msg);</pre>
|
||||
<h4>ノード情報の参照</h4>
|
||||
<p>コード中ではノードのIDおよび名前を以下のプロパティで参照できます:</p>
|
||||
<ul>
|
||||
<li><code>node.id</code> - ノードのID</li>
|
||||
<li><code>node.name</code> - ノードの名称</li>
|
||||
</ul>
|
||||
<h4>環境変数の利用</h4>
|
||||
<p>環境変数は<code>env.get("MY_ENV_VAR")</code>により参照できます。</p>
|
||||
</script>
|
39
packages/node_modules/@node-red/nodes/locales/ja/function/10-switch.html
vendored
Normal file
39
packages/node_modules/@node-red/nodes/locales/ja/function/10-switch.html
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="switch">
|
||||
<p>プロパティの値によってメッセージの振り分けを行います。</p>
|
||||
<h3>詳細</h3>
|
||||
<p>受信したメッセージに対し、指定されたルールを順に評価し、マッチしたルールに対応する出力ポートにメッセージを送出します。</p>
|
||||
<p>最初にルールがマッチしたところで評価を止めることも可能です。</p>
|
||||
<p>評価ルールには、メッセージプロパティ、フローコンテキスト/グローバルコンテキストのプロパティ、環境変数、JSONata式の評価結果が利用できます。</p>
|
||||
<h4>ルール</h4>
|
||||
<p>振り分けルールは以下の4つに分類されます。</p>
|
||||
<ol>
|
||||
<li><b>値(value)</b>ルール - 指定したプロパティに対して評価</li>
|
||||
<li><b>列(sequence)</b>ルール - メッセージ列に対して適用(メッセージ列はsplitノードなどで生成)</li>
|
||||
<li><b>JSONata式</b> - メッセージ全体に対して評価を行い、結果が真の場合にマッチ</li>
|
||||
<li><b>その他</b> - これより前のルールにマッチするものがなかった場合に適用</li>
|
||||
</ol>
|
||||
|
||||
<h4>注釈</h4>
|
||||
<p><code>is true/false</code>と<code>is null</code>のルールは、型に対して厳密な比較を行います。型変換した上での比較はしません。</p>
|
||||
<p><code>is empty</code>のルールは、長さ0の文字列・配列・バッファ、またはプロパティを持たないオブジェクトを出力します。<code>null</code>や<code>undefined</code>は出力しません。</p>
|
||||
|
||||
<h4>メッセージ列の扱い</h4>
|
||||
<p>switchノードは入力メッセージの列に関する情報を保持する<code>msg.parts</code>をデフォルトでは変更しません。</p>
|
||||
<p>「<b>メッセージ列の補正</b>」オプションを指定すると、マッチした各ルールに対して新しいメッセージ列を生成します。このモードでは、switchノードは新たなメッセージ列を送信する前に、入力メッセージ列全体を内部に蓄積します。<b>settings.js</b>の<code>nodeMessageBufferMaxLength</code>を設定すると、蓄積するメッセージ数を制限できます。</p>
|
||||
</script>
|
33
packages/node_modules/@node-red/nodes/locales/ja/function/15-change.html
vendored
Normal file
33
packages/node_modules/@node-red/nodes/locales/ja/function/15-change.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="change">
|
||||
<p>メッセージ、フローコンテキスト、グローバルコンテキストのプロパティを変更、削除、移動します。</p>
|
||||
<p>ルールを複数指定した場合、定義した順に適用します。</p>
|
||||
<h3>詳細</h3>
|
||||
<p>利用可能な処理</p>
|
||||
<dl class="message-properties">
|
||||
<dt>代入</dt>
|
||||
<dd>プロパティをセットします。設定値には、さまざまな型の値、メッセージやコンテキストの既存プロパティを利用できます。<dd>
|
||||
<dt>置換</dt>
|
||||
<dd>プロパティに対して検索と置換を行います。正規表現を指定した場合、「置換後の文字列」には<code>$1</code>のようなキャプチャグループが指定できます。置換処理では、ルールが完全マッチの場合のみプロパティの型を変更できます。</dd>
|
||||
<dt>削除</dt>
|
||||
<dd>プロパティを削除します。</dd>
|
||||
<dt>移動</dt>
|
||||
<dd>プロパティの移動または名前の変更を行います。</dd>
|
||||
</dl>
|
||||
<p>「JSONata式」には<a href="http://jsonata.org/" target="_new">JSONata</a>言語を指定できます。</p>
|
||||
</script>
|
33
packages/node_modules/@node-red/nodes/locales/ja/function/16-range.html
vendored
Normal file
33
packages/node_modules/@node-red/nodes/locales/ja/function/16-range.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="range">
|
||||
<p>数値を異なる範囲の値に変換します。</p>
|
||||
<h3>入力</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload<span class="property-type">数値</span></dt>
|
||||
<dd>数値を指定します。数値以外を指定した場合は、数値に変換します。変換不能な場合はエラーとなります。</dd>
|
||||
</dl>
|
||||
<h3>出力</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>payload <span class="property-type">数値</span></dt>
|
||||
<dd>新しい範囲に変換した結果の値。</dd>
|
||||
</dl>
|
||||
<h3>詳細</h3>
|
||||
<p>このノードは受け取った数値を線形スケーリングします。デフォルトでは、結果の値はノードに設定した範囲内に限定しません。</p>
|
||||
<p>「<i>入力値の範囲外の値を最小値/最大値として拡大/縮小</i>」を指定すると、値が指定した範囲外の値にならないようにします。</p>
|
||||
<p>「<i>入力値の範囲外の値を範囲幅で割った余りとし拡大/縮小</i>」を指定すると、結果を範囲幅で折り返します。</p>
|
||||
</script>
|
49
packages/node_modules/@node-red/nodes/locales/ja/function/80-template.html
vendored
Normal file
49
packages/node_modules/@node-red/nodes/locales/ja/function/80-template.html
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="template">
|
||||
<p>テンプレートに基づいてプロパティを設定します。</p>
|
||||
<h3>入力</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>msg <span class="property-type">オブジェクト</span></dt>
|
||||
<dd>テンプレートを生成するための情報を含むメッセージオブジェクト</dd>
|
||||
<dt class="optional">template <span class="property-type">文字列</span></dt>
|
||||
<dd><code>msg.payload</code>を生成するためのテンプレート。編集パネルでテンプレートを設定しない場合に、出力メッセージとして利用します</dd>
|
||||
</dl>
|
||||
<h3>出力</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>msg <span class="property-type">オブジェクト</span></dt>
|
||||
<dd>指定したテンプレートと入力メッセージのプロパティから生成した値を設定したメッセージ</dd>
|
||||
</dl>
|
||||
<h3>詳細</h3>
|
||||
<p>このノードは<i><a href="http://mustache.github.io/mustache.5.html" target="_blank">mustache</a></i>形式をデフォルトで利用しますが、使用しないようにすることもできます。</p>
|
||||
<p>例えば、
|
||||
<pre>こんにちは{{payload.name}}さん。今日は{{date}}です。</pre>
|
||||
<p>というテンプレートに対して、
|
||||
<pre>{
|
||||
date: "月曜日"
|
||||
payload: {
|
||||
name: "山田",
|
||||
}
|
||||
}</pre>
|
||||
<p>というメッセージを受信した場合、</p>
|
||||
<pre>こんにちは山田さん。今日は月曜日です。</pre>
|
||||
<p>というプロパティが生成されます。</p>
|
||||
<p>フローコンテキストもしくはグローバルコンテキストのプロパティ値を使うこともできます。それぞれ、<code>{{flow.名前}}</code>もしくは<code>{{global.名前}}</code>を用います。もしくは、パーシスタブルストア(<code>store</code>)に対しては、<code>{{flow[store].名前}}</code>もしくは
|
||||
<code>{{global[store].名前}}</code>を用います。
|
||||
</p>
|
||||
<p><b>注: </b>デフォルトでは、<i>mustache</i>形式は置換対象のHTML要素をエスケープします。これを抑止するには<code>{{{三重}}}</code>括弧形式を使います。</p>
|
||||
</script>
|
32
packages/node_modules/@node-red/nodes/locales/ja/function/89-delay.html
vendored
Normal file
32
packages/node_modules/@node-red/nodes/locales/ja/function/89-delay.html
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="delay">
|
||||
<p>ノードを通過するメッセージを遅延もしくは流量を制限します。</p>
|
||||
<h3>入力</h3>
|
||||
<dl class="message-properties">
|
||||
<dt class="optional">delay <span class="property-type">数値</span></dt>
|
||||
<dd>メッセージの遅延時間をミリ秒単位で設定します。これはノードの設定でデフォルトの遅延時間を上書きできるようノードを設定した場合にのみ適用します。</dd>
|
||||
<dt class="optional">reset</dt>
|
||||
<dd>受信メッセージでこのプロパティを任意の値に設定すると、ノードが保持する全ての未送信メッセージをクリアします。</dd>
|
||||
<dt class="optional">flush</dt>
|
||||
<dd>受信メッセージでこのプロパティを任意の値に設定すると、ノードが保持する全ての未送信メッセージを直ちに送信します。</dd>
|
||||
</dl>
|
||||
<h3>詳細</h3>
|
||||
<p>メッセージを遅延させるように設定する場合、遅延時間は固定値、範囲内の乱数値、メッセージ毎の動的な指定値のいずれかを指定できます。</p>
|
||||
<p>流量制御する場合、メッセージは指定した時間間隔内に分散して送信します。キューに残っているメッセージ数はノードのステータスに表示されます。受け取った中間メッセージを破棄することも可能です。</p>
|
||||
<p>流量制御は全てのメッセージに適用することも、<code>msg.topic</code>値でグループ化して適用することも可能です。グループ化すると、中間メッセージは自動的に破棄されます。時間間隔毎に全てのトピックの最新メッセージを送信するか、次のトピックの最新メッセージを送信するかを指定できます。</p>
|
||||
</script>
|
33
packages/node_modules/@node-red/nodes/locales/ja/function/89-trigger.html
vendored
Normal file
33
packages/node_modules/@node-red/nodes/locales/ja/function/89-trigger.html
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="trigger">
|
||||
<p>メッセージを受信すると、別のメッセージの送信を行います。延長もしくは初期化が指定されていない場合には、2つ目のメッセージを送信することもできます。</p>
|
||||
|
||||
<h3>入力</h3>
|
||||
<dl class="message-properties">
|
||||
<dt class="optional">reset</dt>
|
||||
<dd>このプロパティを持つメッセージを受け取ると、仕掛かり中の待機や繰り返しをクリアしメッセージの送信は行いません。</dd>
|
||||
</dl>
|
||||
|
||||
<h3>詳細</h3>
|
||||
<p>フロー内でタイムアウトを作成するのに利用します。メッセージを受け取ると、デフォルトでは<code>payload</code>に<code>1</code>を設定して送信します。送信後250ms待機し、<code>payload</code>を<code>0</code>に設定した2つ目のメッセージを送信します。この機能は、例えばRaspberry PiのGPIOピンに接続したLEDを点滅させるために活用できます。</p>
|
||||
<p>各送信メッセージのペイロードはさまざまな種類の値に設定できます。再送信データなしとすることも可能です。例えば、再送信データを「<i>なし</i>」とし、メッセージを受け取った時に遅延を延長することを選択した場合、triggerノードは監視タイマとして動作します。すなわち、指定間隔内にメッセージを受信しない場合にメッセージを送信します。</p>
|
||||
<p>ペイロードに<i>文字列</i>を指定する場合、mustache形式のテンプレートが利用できます。</p>
|
||||
<p><code>reset</code>プロパティを持つメッセージを受信した場合、もしくは、<code>payload</code>が設定した値にマッチする場合、仕掛かり中の待機や繰り返しをクリアしメッセージの送信は行いません。</p>
|
||||
<p>受信メッセージでリセットするまで一定間隔でメッセージを再送するように指定することもできます。</p>
|
||||
<p><code>msg.topic</code>毎に別のストリームとして扱うように設定することも可能です。</p>
|
||||
</script>
|
74
packages/node_modules/@node-red/nodes/locales/ja/function/90-exec.html
vendored
Normal file
74
packages/node_modules/@node-red/nodes/locales/ja/function/90-exec.html
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-help-name="exec">
|
||||
<p>システムのコマンドを実行し出力を返します。</p>
|
||||
<p>コマンドの完了まで待つか、コマンドが出力を行う毎にメッセージを出力するかを指定できます。</p>
|
||||
<p>実行対象のコマンドは、ノードの設定もしくは受信メッセージで指定します。</p>
|
||||
|
||||
<h3>入力</h3>
|
||||
<dl class="message-properties">
|
||||
<dt class="optional">payload <span class="property-type">文字列</span></dt>
|
||||
<dd>実行コマンドの最後に追加するよう設定できます</dd>
|
||||
<dt class="optional">kill <span class="property-type">文字列</span></dt>
|
||||
<dd>execノードのプロセスに対して送るシグナルの種別を指定します</dd>
|
||||
<dt class="optional">pid <span class="property-type">数値|文字列</span></dt>
|
||||
<dd>シグナル送信対象のexecノードのプロセスIDを指定します</dd>
|
||||
</dl>
|
||||
|
||||
<h3>出力</h3>
|
||||
<ol class="node-ports">
|
||||
<li>標準出力(stdout)
|
||||
<dl class="message-properties">
|
||||
<dt>payload <span class="property-type">文字列</span></dt>
|
||||
<dd>コマンドの標準出力</dd>
|
||||
</dl>
|
||||
<dl class="message-properties">
|
||||
<dt>rc <span class="property-type">オブジェクト</span></dt>
|
||||
<dd>返却コードオブジェクト(3番目の端子でも受取り可能)のコピー(execモードのみ)</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li>標準エラー出力(stderr)
|
||||
<dl class="message-properties">
|
||||
<dt>payload <span class="property-type">文字列</span></dt>
|
||||
<dd>コマンドの標準エラー出力</dd>
|
||||
</dl>
|
||||
<dl class="message-properties">
|
||||
<dt>rc <span class="property-type">オブジェクト</span></dt>
|
||||
<dd>返却コードオブジェクト(3番目の端子でも受取り可能)のコピー(execモードのみ)</dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li>返却コード(return code)
|
||||
<dl class="message-properties">
|
||||
<dt>payload <span class="property-type">オブジェクト</span></dt>
|
||||
<dd>リターンコード、<code>message</code>、<code>signal</code>プロパティを含むオブジェクト(<code>message</code>、<code>signal</code>は利用可能な場合)</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ol>
|
||||
<h3>詳細</h3>
|
||||
<p>デフォルトでは、<code>exec</code>システムコールを用いてコマンドを呼び出してその完了を待ち、出力を返します。例えば、コマンドの実行が成功した場合には、<code>{ code: 0 }</code>と言う返却値を返します。</p>
|
||||
<p><code>spawn</code>を使ってコマンドを実行し、標準出力および標準エラー出力へ出力を返すようにすることもできます。この場合、通常1行毎に値を返します。コマンドの実行が完了すると、3番目の端子にオブジェクトを出力します。例えば、コマンドの実行が成功した場合には、<code>{ code: 0 }</code>という返却値を返します。</p>
|
||||
<p>エラー発生時には、3番目の端子の<code>msg.payload</code>に<code>message</code>、<code>signal</code>など付加情報を返します。</p>
|
||||
<p>実行対象のコマンドはノード設定で定義します。<code>msg.payload</code>や追加引数をコマンドに追加することもできます。</p>
|
||||
<p>コマンドもしくはパラメータが空白を含む場合には、引用符で囲みます。- <code>"これは一つのパラメータです"</code></p>
|
||||
<p>返却する<code>payload</code>は通常<i>文字列</i>ですが、UTF8文字以外が存在すると<i>バッファ</i>となります。</p>
|
||||
<p>ノードが実行中の場合、ステータスアイコンとPIDを表示します。この状態変化は<code>Status</code>ノードで検知できます。</p>
|
||||
<h4>プロセスの停止</h4>
|
||||
<p><code>msg.kill</code>を受信すると、実行中のプロセスを停止することができます。<code>msg.kill</code>には送出するシグナルの種別を指定します。例えば、<code>SIGINT</code>、<code>SIGQUIT</code>、<code>SIGHUP</code>などです。空の文字列を指定した場合には、<code>SIGTERM</code>を指定したものとみなします。</p>
|
||||
<p>ノードが1つ以上のプロセスを実行している場合、<code>msg.pid</code>に停止対象のPIDを指定しなければなりません。</p>
|
||||
<p><code>タイムアウト</code>フィールドに値を指定すると、指定した秒数以内にコマンドが完了しない場合、プロセスを自動的に停止します。</p>
|
||||
<p>ヒント: Pythonアプリケーションを実行する場合、<code>-u</code>を指定すると出力がバッファされるのを抑止できます。</p>
|
||||
</script>
|
Reference in New Issue
Block a user