update info text of function node

This commit is contained in:
Hiroyasu Nishiyama
2020-10-06 13:45:00 +09:00
parent 5e63471983
commit 379b8ada61
2 changed files with 4 additions and 0 deletions

View File

@@ -23,6 +23,7 @@
to return nothing in order to halt a flow.</p> to return nothing in order to halt a flow.</p>
<p>The <b>Setup</b> tab contains code that will be run whenever the node is started. <p>The <b>Setup</b> tab contains code that will be run whenever the node is started.
The <b>Close</b> tab contains code that will be run when the node is stopped.</p> The <b>Close</b> tab contains code that will be run when the node is stopped.</p>
<p>If an promise object is returned from the setup code, input message processing starts after its completion.</p>
<h3>Details</h3> <h3>Details</h3>
<p>See the <a target="_blank" href="http://nodered.org/docs/writing-functions.html">online documentation</a> <p>See the <a target="_blank" href="http://nodered.org/docs/writing-functions.html">online documentation</a>
for more information on writing functions.</p> for more information on writing functions.</p>
@@ -34,6 +35,7 @@
<li>a single message object - passed to nodes connected to the first output</li> <li>a single message object - passed to nodes connected to the first output</li>
<li>an array of message objects - passed to nodes connected to the corresponding outputs</li> <li>an array of message objects - passed to nodes connected to the corresponding outputs</li>
</ul> </ul>
<p>Note: The setup code is executed during the initialization of nodes. Therefore, if <code>node.send</code> is called in the setup tab, subsequent nodes may not be able to receive the message.</p>
<p>If any element of the array is itself an array of messages, multiple <p>If any element of the array is itself an array of messages, multiple
messages are sent to the corresponding output.</p> messages are sent to the corresponding output.</p>
<p>If null is returned, either by itself or as an element of the array, no <p>If null is returned, either by itself or as an element of the array, no

View File

@@ -20,6 +20,7 @@
<p><code>msg</code><code>msg.payload</code></p> <p><code>msg</code><code>msg.payload</code></p>
<p>通常コードはメッセージオブジェクト(もしくは複数のメッセージオブジェクト)を返却します後続フローの実行を停止したい場合はオブジェクトを返却しなくてもかまいません</p> <p>通常コードはメッセージオブジェクト(もしくは複数のメッセージオブジェクト)を返却します後続フローの実行を停止したい場合はオブジェクトを返却しなくてもかまいません</p>
<p>Node-REDの開始時もしくはフローの設定をデプロイした際実行される初期化コードを<b>初期化処理</b><b></b></p> <p>Node-REDの開始時もしくはフローの設定をデプロイした際実行される初期化コードを<b>初期化処理</b><b></b></p>
<p>初期化処理タブの返却値としてPromiseを返却すると入力メッセージの処理を開始する前にその完了を待ちます</p>
<h3>詳細</h3> <h3>詳細</h3>
<p>コードの書き方の詳細については<a target="_blank" href="http://nodered.org/docs/writing-functions.html">オンラインドキュメント</a></p> <p>コードの書き方の詳細については<a target="_blank" href="http://nodered.org/docs/writing-functions.html">オンラインドキュメント</a></p>
<h4>メッセージの送信</h4> <h4>メッセージの送信</h4>
@@ -29,6 +30,7 @@
<li>単一メッセージオブジェクト - 最初の出力に接続されたノードに渡されます</li> <li>単一メッセージオブジェクト - 最初の出力に接続されたノードに渡されます</li>
<li>メッセージオブジェクトの配列 - 対応する出力に接続されたノードに渡されます</li> <li>メッセージオブジェクトの配列 - 対応する出力に接続されたノードに渡されます</li>
</ul> </ul>
<p>: 初期化処理の実行はノードの初期化中に行われますそのため初期化処理タブにsendを記述した場合に後続ードでメッセージを受け取れないことがあります</p>
<p>配列要素が配列の場合には複数のメッセージを対応する出力に送出します</p> <p>配列要素が配列の場合には複数のメッセージを対応する出力に送出します</p>
<p>返却方法が単一値か配列要素かにかかわらず返却値がnullの場合メッセージの送出は行いません</p> <p>返却方法が単一値か配列要素かにかかわらず返却値がnullの場合メッセージの送出は行いません</p>
<h4>ログ出力とエラー処理</h4> <h4>ログ出力とエラー処理</h4>