Merge branch 'master' into dev

This commit is contained in:
Nick O'Leary
2021-05-04 11:19:05 +01:00
53 changed files with 581 additions and 205 deletions

View File

@@ -52,10 +52,11 @@
pass <code>msg</code> as a second argument to <code>node.error</code>:</p>
<pre>node.error("Error",msg);</pre>
<h4>Accessing Node Information</h4>
<p>In the function block, id and name of the node can be referenced using the following properties:</p>
<p>The following properties are available to access information about the node:</p>
<ul>
<li><code>node.id</code> - id of the node</li>
<li><code>node.name</code> - name of the node</li>
<li><code>node.outputCount</code> - number of node outputs</li>
</ul>
<h4>Using environment variables</h4>
<p>Environment variables can be accessed using <code>env.get("MY_ENV_VAR")</code>.</p>

View File

@@ -227,6 +227,7 @@
"error": {
"externalModuleNotAllowed": "Function node not allowed to load external modules",
"moduleNotAllowed": "Module __module__ not allowed",
"externalModuleLoadError": "Function node failed to load external modules",
"moduleLoadError": "Failed to load module __module__: __error__",
"moduleNameError": "Invalid module variable name: __name__",
"moduleNameReserved": "Reserved variable name: __name__",
@@ -877,6 +878,7 @@
},
"encoding": {
"none": "default",
"setbymsg": "set by msg.encoding",
"native": "Native",
"unicode": "Unicode",
"japanese": "Japanese",

View File

@@ -91,7 +91,7 @@
</ul>
</dd>
<dt class="optional">complete</dt>
<dd>If set, the node will append the payload, and then send the output message in its current state.
<dd>If set, the node will append the payload, and then send the output message in its current state.
If you don't wish to append the payload, delete it from the msg.</dd>
</dl>
<h3>Details</h3>
@@ -150,6 +150,7 @@
<p>By default, the reduce expression is applied in order, from the first
to the last message of the sequence. It can optionally be applied in
reverse order.</p>
<p>$N is the number of messages that arrive - even if they are identical.</p>
</dl>
<p><b>Example:</b> the following settings, given a sequence of numeric values,
calculates the average value:

View File

@@ -21,6 +21,8 @@
<dl class="message-properties">
<dt class="optional">filename <span class="property-type">string</span></dt>
<dd>If not configured in the node, this optional property sets the name of the file to be updated.</dd>
<dt class="optional">encoding <span class="property-type">string</span></dt>
<dd>If encoding is configured to be set by msg, then this optional property can set the encoding.</dt>
</dl>
<h3>Output</h3>
<p>On completion of write, input message is sent to output port.</p>