mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #2442 from node-red-hitachi/master-zhcn
Add zn-CN translation for all nodes
This commit is contained in:
commit
be3dd63360
34
packages/node_modules/@node-red/nodes/locales/zh-CN/common/20-inject.html
vendored
Normal file
34
packages/node_modules/@node-red/nodes/locales/zh-CN/common/20-inject.html
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<!--
|
||||||
|
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="inject">
|
||||||
|
<p>手动或定期得将消息注入流中。消息的有效荷载可以为多种类型,包括字符串,JavaScript对象或当前时间。</p>
|
||||||
|
<h3>输出</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">various</span></dt>
|
||||||
|
<dd>指定的消息的有效荷载。</dd>
|
||||||
|
<dt class="optional">topic <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>可以在节点中配置的可选属性。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>通过使用特定的有效荷载,注入节点可以启动流。默认有效荷载是当前时间的时间戳(以毫秒为单位,自1970年1月1日起)。</p>
|
||||||
|
<p>该节点还支持注入字符串,数字,布尔值,JavaScript对象或流/全局上下文值。</p>
|
||||||
|
<p>默认情况下,节点可以通过在编辑器中单击节点按钮来手动触发。同时也可以被设置为定期或按计划注入。</p>
|
||||||
|
<p>另一个可选的设置是在每次启动流时注入一次。</p>
|
||||||
|
<p>可以指定的最大<i>间隔</i>约为596小时/24天。 但是,如果对于间隔超过一天的那些间隔,建议您使用scheduler节点来应对断电或重启。</p>
|
||||||
|
<p><b>注意</b>:选项<i>“时间间隔” </i>和<i>“特定时间” </i>使用了标准cron系统。这意味着因此“20分钟”并不表示在此之后20分钟,而是每小时的20分钟,40分钟。如果您希望设定为从现在开始的每20分钟,那么请使用<i>“间隔” </i>选项。</p>
|
||||||
|
<p><b>注意</b>: 如果您想在字符串中包含换行符,必须使用“功能”节点创建有效荷载。</p>
|
||||||
|
</script>
|
25
packages/node_modules/@node-red/nodes/locales/zh-CN/common/21-debug.html
vendored
Normal file
25
packages/node_modules/@node-red/nodes/locales/zh-CN/common/21-debug.html
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<!--
|
||||||
|
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="debug">
|
||||||
|
<p>在“调试”侧边栏选项卡和运行时日志中显示选定的消息属性。 默认情况下,它会显示<code>msg.payload</code>的值,但您也可以将其设置成显示任意属性,完整消息或JSONata表达式的结果。</p>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>调试侧边栏会提供已发消息的结构化视图,方便您查询消息的结构。</p>
|
||||||
|
<p>JavaScript对象和数组可以根据需要来折叠或扩展。缓冲区对象可以显示为原始数据,也可以显示为字符串。</p>
|
||||||
|
<p>对任意条消息,调试侧边栏还会显示接收消息的时间,发送消息的节点以及消息类型等信息。单击源节点ID将在工作区中显示该节点。</p>
|
||||||
|
<p>节点上的按钮可用于启用或禁用其输出。建议禁用或删除所有未使用的调试节点。</p>
|
||||||
|
<p>还可以通过配置节点,将所有消息发送到运行时的日志,或将简短的数据(32个字符内)在调试节点下的状态文本上显示。</p>
|
||||||
|
</script>
|
24
packages/node_modules/@node-red/nodes/locales/zh-CN/common/24-complete.html
vendored
Normal file
24
packages/node_modules/@node-red/nodes/locales/zh-CN/common/24-complete.html
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!--
|
||||||
|
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="complete">
|
||||||
|
<p>当另一个节点完成对消息的处理时触发流。</p>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>如果一个节点通知运行时它已完成消息的处理,该节点可用于触发第二个流。</p>
|
||||||
|
<p>这个节点可以与没有输出端口的节点一起使用,例如在使用电子邮件发送节点来发送邮件后触发一个流。</p>
|
||||||
|
<p>此节点只能被设置为处理流中某个所选节点的事件。与Catch节点不同,您不能指定“所有节点”模式并以流中的所有节点为目标。</p>
|
||||||
|
<p>并非所有节点都会触发此事件。这取决于它们是否支持于Node-RED 1.0中引入的此功能。</p>
|
||||||
|
</script>
|
36
packages/node_modules/@node-red/nodes/locales/zh-CN/common/25-catch.html
vendored
Normal file
36
packages/node_modules/@node-red/nodes/locales/zh-CN/common/25-catch.html
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<!--
|
||||||
|
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="catch">
|
||||||
|
<p>捕获由同一标签页上的节点引发的错误。</p>
|
||||||
|
<h3>输出</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>error.message <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>错误消息。</dd>
|
||||||
|
<dt>error.source.id <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>引发错误的节点的ID。</dd>
|
||||||
|
<dt>error.source.type <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>引发错误的节点的类型。</dd>
|
||||||
|
<dt>error.source.name <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>引发错误的节点的名称。(如果已设置)</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>如果节点在处理消息时抛出错误,则流程通常会停止。该节点可用于捕获那些错误并通过专用流程进行处理。</p>
|
||||||
|
<p>默认情况下,该节点将捕获同一标签页上任何节点抛出的错误。或者,它可以针对特定节点,或配置为仅捕获另一个“目标”捕获节点尚未捕获的错误。</p>
|
||||||
|
<p>当错误发生时,所有匹配的catch节点都会收到错误消息。</p>
|
||||||
|
<p>如果在子流中发送了错误,则该错误将由子流中的任意捕获节点处理。如果子流中不存在捕获节点,则那错误将被传播到子流实例所在的标签页。</p>
|
||||||
|
<p>如果消息已经具有<code>error</code>属性,则将该<code>error</code>复制为<code>_error</code>。</p>
|
||||||
|
</script>
|
33
packages/node_modules/@node-red/nodes/locales/zh-CN/common/25-status.html
vendored
Normal file
33
packages/node_modules/@node-red/nodes/locales/zh-CN/common/25-status.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="status">
|
||||||
|
<p>获取在同一标签页上的其他节点的状态消息。</p>
|
||||||
|
<h3>输出</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>status.text <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>状态文本。</dd>
|
||||||
|
<dt>status.source.type <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>报告状态的节点的类型。</dd>
|
||||||
|
<dt>status.source.id <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>报告状态的节点的ID。</dd>
|
||||||
|
<dt>status.source.name <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>报告状态的节点的名称(如果已设置)。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>该节点不包含<code>有效荷载</code>。</p>
|
||||||
|
<p>默认情况下,节点会获取同一工作空间标签页上报告所有节点的状态。可以通过配置来设定目标节点。</p>
|
||||||
|
</script>
|
31
packages/node_modules/@node-red/nodes/locales/zh-CN/common/60-link.html
vendored
Normal file
31
packages/node_modules/@node-red/nodes/locales/zh-CN/common/60-link.html
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<!--
|
||||||
|
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="link in">
|
||||||
|
<p>在流之间创建虚拟连线。</p>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>该节点可以连接到任何标签页上存在的任何<code>link out</code>节点。连接后,它们的行为就像连接在一起。</p>
|
||||||
|
<p>仅当选择链接节点时,才会显示链接节点之间的链接。如果有指向另一个选项卡的链接,则显示一个虚拟节点。单击该虚拟节点将带您到相应的选项卡。</p>
|
||||||
|
<p><b>注意:</b>无法创建进入或离开子流的链接。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="link out">
|
||||||
|
<p>在流之间创建虚拟连线。</p>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>该节点可以连接到任何标签页上存在的任何<code>link in</code>节点。连接后,它们的行为就像连接在一起。</p>
|
||||||
|
<p>仅当选择链接节点时,才会显示链接节点之间的链接。如果有指向另一个选项卡的链接,则显示一个虚拟节点。单击该虚拟节点将带您到相应的选项卡。</p>
|
||||||
|
<p><b>注意:</b>无法创建进入或离开子流的链接。</p>
|
||||||
|
</script>
|
21
packages/node_modules/@node-red/nodes/locales/zh-CN/common/90-comment.html
vendored
Normal file
21
packages/node_modules/@node-red/nodes/locales/zh-CN/common/90-comment.html
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<!--
|
||||||
|
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="comment">
|
||||||
|
<p>可用于向流添加注释的节点。</p>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>编辑面板接受Markdown语法。输入的文本将在信息侧面板中显示。</p>
|
||||||
|
</script>
|
24
packages/node_modules/@node-red/nodes/locales/zh-CN/common/98-unknown.html
vendored
Normal file
24
packages/node_modules/@node-red/nodes/locales/zh-CN/common/98-unknown.html
vendored
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<!--
|
||||||
|
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="unknown">
|
||||||
|
<p>您安装的Node-RED无法识别该节点的类型。</p>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p><i>如果在此状态下部署节点,其配置会被保存。但是在安装缺少的类型之前,流不会开始。</i></p>
|
||||||
|
<p>使用<code> Menu-Manage Palette </code>选项来搜索并安装节点,或者使用<b>npm install <module></b>来安装所有缺少的节点,并重新启动Node-Red来导入这些节点。</p>
|
||||||
|
<p>另一种可能是,您已经安装了此节点类型,但是缺少必须的依赖项。您应检查Node-RED的启动日志中是否有与缺少节点有关的错误消息。</p>
|
||||||
|
<p>以上方法都不适用时,您可以联系该流的作者以获取缺少的节点类型的副本。</p>
|
||||||
|
</script>
|
51
packages/node_modules/@node-red/nodes/locales/zh-CN/function/10-function.html
vendored
Normal file
51
packages/node_modules/@node-red/nodes/locales/zh-CN/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>无论return方法是单个值还是数组元素,如果返回值为null,则不会发送任何消息。</p>
|
||||||
|
<h4>日志输出和错误处理</h4>
|
||||||
|
<p>使用以下功能输出日志信息和输出错误:</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>node.log("Log message")</code></li>
|
||||||
|
<li><code>node.warn("Warning")</code></li>
|
||||||
|
<li><code>node.error("Error")</code></li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
<p>使用catch节点可以进行错误处理。 要由catch节点处理,请将<code>msg</code>作为<code>node.error</code>的第二个参数传递:</p>
|
||||||
|
<pre>node.error("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>
|
37
packages/node_modules/@node-red/nodes/locales/zh-CN/function/10-switch.html
vendored
Normal file
37
packages/node_modules/@node-red/nodes/locales/zh-CN/function/10-switch.html
vendored
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
<!--
|
||||||
|
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>有四种规则:</p>
|
||||||
|
<ol>
|
||||||
|
<li><b>值</b>根据配置的属性评估规则</li>
|
||||||
|
<li><b>顺序</b>可用于消息序列的规则,例如由“拆分”节点生成的规则</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>规则与零字节的字符串,数组,缓冲区或没有属性的对象相匹配。与<code>null</code>或者<code>undefined</code>等不匹配。</p>
|
||||||
|
<h4>处理消息序列</h4>
|
||||||
|
<p>默认情况下,节点不会修改<code>msg.parts</code>属性。</p>
|
||||||
|
<p>可以启用<b>重建消息序列</b>选项来为每条匹配的规则生成新的消息序列。在这种模式下,节点将在发送新序列之前对整个传入序列进行缓存。运行时的设定<code>nodeMessageBufferMaxLength</code>可以用来限制可缓存的消息数目。</p>
|
||||||
|
</script>
|
33
packages/node_modules/@node-red/nodes/locales/zh-CN/function/15-change.html
vendored
Normal file
33
packages/node_modules/@node-red/nodes/locales/zh-CN/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>搜索并替换属性。 如果启用了正则表达式,则可以为“replace with”属性指定捕获组,例如<code>$1</code>。 在替换过程中,仅当规则完全匹配时才能更改属性类型。</dd>
|
||||||
|
<dt>删除</dt>
|
||||||
|
<dd>删除一个属性</dd>
|
||||||
|
<dt>移动</dt>
|
||||||
|
<dd>移动或者重命名一个属性</dd>
|
||||||
|
</dl>
|
||||||
|
<p>类型"expression"使用<a href="http://jsonata.org/" target="_new">JSONata</a>语言。</p>
|
||||||
|
</script>
|
40
packages/node_modules/@node-red/nodes/locales/zh-CN/function/16-range.html
vendored
Normal file
40
packages/node_modules/@node-red/nodes/locales/zh-CN/function/16-range.html
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<!--
|
||||||
|
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>有效荷载<i>一定</i>得是一个数值. 否则则会映射失败。</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>
|
||||||
|
<p>例如,输入0-10映射到0-100。</p>
|
||||||
|
<table style="outline-width:#888 solid thin">
|
||||||
|
<tr><th width="80px">模式</th><th width="80px">输入</th><th width="80px">输出</th></tr>
|
||||||
|
<tr><td><center>scale</center></td><td><center>12</center></td><td><center>120</center></td></tr>
|
||||||
|
<tr><td><center>limit</center></td><td><center>12</center></td><td><center>100</center></td></tr>
|
||||||
|
<tr><td><center>wrap</center></td><td><center>12</center></td><td><center>20</center></td></tr>
|
||||||
|
</table>
|
||||||
|
</script>
|
46
packages/node_modules/@node-red/nodes/locales/zh-CN/function/80-template.html
vendored
Normal file
46
packages/node_modules/@node-red/nodes/locales/zh-CN/function/80-template.html
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<!--
|
||||||
|
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">object</span></dt>
|
||||||
|
<dd>一个msg对象,其中包含着用于填充模板的信息。</dd>
|
||||||
|
<dt class="optional">template <span class="property-type">string</span></dt>
|
||||||
|
<dd>由<code>msg.payload</code>填充的模板。如果未在编辑面板中配置,则可以将设为msg的属性。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Outputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>msg <span class="property-type">object</span></dt>
|
||||||
|
<dd>由来自传入msg的属性来填充已配置的模板后输出的带有属性的msg。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>默认情况下使用<i><a href="http://mustache.github.io/mustache.5.html" target="_blank">mustache</a></i>格式。如有需要也可以切换其他格式。</p>
|
||||||
|
<p>例如:
|
||||||
|
<pre>Hello {{payload.name}}. Today is {{date}}</pre>
|
||||||
|
<p>receives a message containing:
|
||||||
|
<pre>{
|
||||||
|
date: "Monday",
|
||||||
|
payload: {
|
||||||
|
name: "Fred"
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<p>输出的消息将会是:
|
||||||
|
<pre>Hello Fred. Today is Monday</pre>
|
||||||
|
<p>也可以使用流上下文或全局上下文中的属性:<code>{{flow.name}}</code>或者<code>{{global.name}}</code>,或者为了持久储存<code>store</code>,可以使用<code>{{flow[store].name}}</code>或<code>{{global[store].name}}</code>。
|
||||||
|
<p><b>注意:</b>默认情况下,<i>mustache</i>将在其替换的值中转义任何非字母数字或HTML实体。为了防止这种情况,请使用<code>{{{triple}}}</code>大括号。
|
||||||
|
</script>
|
32
packages/node_modules/@node-red/nodes/locales/zh-CN/function/89-delay.html
vendored
Normal file
32
packages/node_modules/@node-red/nodes/locales/zh-CN/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/zh-CN/function/89-trigger.html
vendored
Normal file
33
packages/node_modules/@node-red/nodes/locales/zh-CN/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>触发后,将会发送一条消息。如果被拓展或重置,则可以选择发送第二条消息。</p>
|
||||||
|
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt class="optional">reset</dt>
|
||||||
|
<dd>如果收到带有此属性的消息,则将清除当前正在进行的任何超时或重复,且不会触发任何消息。</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>该节点可用于在流中创建一个超时。 默认情况下,当它收到一条消息时,它将发送一条带有<code>1</code>的有效荷载的消息。然后它将等待250毫秒,再发送第二条消息,其有效荷载为<code>0</code>。这可以用于使连接到Raspberry Pi GPIO引脚的LED闪烁等例子上。</p>
|
||||||
|
<p>可以将发送的每个消息的有效荷载配置为各种值,包括不发送任何内容的选项。例如,将初始消息设置为<i>nothing</i>,然后选择将计时器与每个收到的消息一起扩展的选项,则该节点将充当看门狗计时器;仅在设置的间隔内未收到任何消息时才发送消息。</p>
|
||||||
|
<p>如果设置为<i>字符串</i>类型,则该节点支持<i>mustache</i>模板语法。</p>
|
||||||
|
<p>如果节点收到具有<code>reset</code>属性或与节点中配置的匹配的<code>有效荷载</code>的消息,则将清除当前正在进行的任何超时或重复,并且不会触发任何消息。</p>
|
||||||
|
<p>可以将节点配置为以固定的时间间隔重新发送消息,直到被收到的消息重置为止。</p>
|
||||||
|
<p>(可选)可以将节点配置为将带有<code>msg.topic</code>的消息视为独立的流。</p>
|
||||||
|
</script>
|
74
packages/node_modules/@node-red/nodes/locales/zh-CN/function/90-exec.html
vendored
Normal file
74
packages/node_modules/@node-red/nodes/locales/zh-CN/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节点进程的kill信号类型。</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">object</span></dt>
|
||||||
|
<dd>(仅执行模式)一个返回代码对象的副本(在端口3上也可用)</dd>
|
||||||
|
</dl>
|
||||||
|
</li>
|
||||||
|
<li>标准error输出(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">object</span></dt>
|
||||||
|
<dd>(仅执行模式)一个返回代码对象的副本(在端口3上也可用)</dd>
|
||||||
|
</dl>
|
||||||
|
</li>
|
||||||
|
<li>返回代码
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload <span class="property-type">object</span></dt>
|
||||||
|
<dd>一个包含返回代码以及<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>代替,它会在命令运行时从stdout和stderr返回输出,通常一次一行。完成后,它将在第三个端口上返回一个对象。例如,成功的命令应返回<code>{code:0}</code>。</p>
|
||||||
|
<p>错误可能会在第三个端口<code>msg.payload</code>上返回额外的信息,例如<code>message</code>字符串,<code>signal</code>字符串。</p>
|
||||||
|
<p>运行的命令是在节点内定义的,带有附加<code>msg.payload</code>的选项和另外一组参数。</p>
|
||||||
|
<p>带空格的命令或参数应该用引号引起来:<code>“这是一个参数”</code></p>
|
||||||
|
<p>返回的<code>有效荷载</code>通常是<i>字符串</i>类型,除非检测到非UTF8字符,在这种情况下,它会是<i>buffer</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>如果节点有多个进程在运行,则还必须设置<code>msg.pid</code>并设置要杀死的PID的值。</p>
|
||||||
|
<p>如果<code>超时</code>字段提供了一个值,则如果在指定的秒数过去后进程尚未完成,则该进程将自动终止。</p>
|
||||||
|
<p>提示:如果运行Python应用程序,则可能需要使用<code>-u</code>参数来停止对输出进行缓存。</p>
|
||||||
|
</script>
|
19
packages/node_modules/@node-red/nodes/locales/zh-CN/network/05-tls.html
vendored
Normal file
19
packages/node_modules/@node-red/nodes/locales/zh-CN/network/05-tls.html
vendored
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<!--
|
||||||
|
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="tls-config">
|
||||||
|
<p>TLS连接的配置选项。</p>
|
||||||
|
</script>
|
22
packages/node_modules/@node-red/nodes/locales/zh-CN/network/06-httpproxy.html
vendored
Normal file
22
packages/node_modules/@node-red/nodes/locales/zh-CN/network/06-httpproxy.html
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<!--
|
||||||
|
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="http proxy">
|
||||||
|
<p>HTTP代理的配置选项。</p>
|
||||||
|
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>访问代理例外列表中的主机时,将不使用任何代理。</p>
|
||||||
|
</script>
|
71
packages/node_modules/@node-red/nodes/locales/zh-CN/network/10-mqtt.html
vendored
Normal file
71
packages/node_modules/@node-red/nodes/locales/zh-CN/network/10-mqtt.html
vendored
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
<!--
|
||||||
|
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="mqtt in">
|
||||||
|
<p>连接到MQTT代理并订阅来自指定主题的消息。</p>
|
||||||
|
<h3>输出</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload <span class="property-type">字符串 | buffer</span></dt>
|
||||||
|
<dd>如果不是二进制buffer的话就是字符串</dd>
|
||||||
|
<dt>topic <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>MQTT主题,使用<code>/</code>作为层次结构分隔符。</dd>
|
||||||
|
<dt>qos <span class="property-type">数值</span> </dt>
|
||||||
|
<dd>QoS服务质量:0, 最多一次; 1, 最少一次; 2, 只一次。</dd>
|
||||||
|
<dt>retain <span class="property-type">布尔值</span></dt>
|
||||||
|
<dd>值为true时表示消息已保留且可能是旧的。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>订阅主题可以包括MQTT通配符(+:一个级别,#:多个级别)。</p>
|
||||||
|
<p>使用该节点您首先需要建立与MQTT代理的连接。通过单击铅笔图标来进行配置。</p>
|
||||||
|
<p>如有需要,几个MQTT节点(输入或输出)可以共享相同的代理连接。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="mqtt out">
|
||||||
|
<p>连接到MQTT代理并发布消息。</p>
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload <span class="property-type">字符串 | buffer</span></dt>
|
||||||
|
<dd>要发布的有效负载。如果未设置此属性,则不会发送任何消息。要发送空白消息,请将此属性设置为空字符串。</dd>
|
||||||
|
|
||||||
|
<dt class="optional">topic <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>要发布的MQTT主题。</dd>
|
||||||
|
|
||||||
|
<dt class="optional">qos <span class="property-type">number</span></dt>
|
||||||
|
<dd>QoS服务质量:0, 最多一次; 1, 最少一次; 2, 只一次。默认值为0。</dd>
|
||||||
|
|
||||||
|
<dt class="optional">retain <span class="property-type">布尔值</span></dt>
|
||||||
|
<dd>设置为<code>true</code>来将消息保留在代理上。默认值为<code>false</code>。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p><code>msg.payload</code>用作已发布消息的有效载荷。如果包含Object,则会在发送之前将其转换为JSON字符串。如果它包含二进制buffer,则消息将按原样发布。</p>
|
||||||
|
<p>可以在节点中配置所使用的主题,或者如果留为空白,则可以通过<code>msg.topic</code>进行设置。</p>
|
||||||
|
<p>同样,可以在节点中配置QoS和保留值,或者如果保留空白,则分别由<code>msg.qos</code>和<code>msg.retain</code>设置。要清除先前存储在代理中的主题,请设置保留标志并向该主题发布空消息。</p>
|
||||||
|
<p>该节点需要与要配置的MQTT代理的连接。通过单击铅笔图标进行配置。</p>
|
||||||
|
<p>如果需要,几个MQTT节点(输入或输出)可以共享相同的代理连接。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="mqtt-broker">
|
||||||
|
<p>与MQTT代理的连接设置。</p>
|
||||||
|
<p>创建与代理的连接设置。可以在<code>MQTT In</code>和<code>MQTT Out</code>节点中重复利用这些设置。</p>
|
||||||
|
<p>如果未为该节点设置客户端ID,并且设置了会话初始化,则将生成一个随机客户端ID。设置客户端ID时,请确保它对于连接目标处的代理是唯一的。</p>
|
||||||
|
<h4>Birth Message</h4>
|
||||||
|
<p>建立连接后发布在以配置主题中的消息。</p>
|
||||||
|
<h4>Close Message</h4>
|
||||||
|
<p>在连接正常结束之前重新部署或者关闭了节点时,发布在以配置主题中的消息。</p>
|
||||||
|
<h4>Will Message</h4>
|
||||||
|
<p>当节点意外丢失连接时由代理发布的消息</p>
|
||||||
|
<h4>WebSockets</h4>
|
||||||
|
<p>可以将节点配置成使用WebSocket连接。使用WebSocket时,请在服务器字段中以完整格式描述连接目标的URI。 例如:</p>
|
||||||
|
<pre>ws://example.com:4000/mqtt</pre>
|
||||||
|
|
||||||
|
</script>
|
81
packages/node_modules/@node-red/nodes/locales/zh-CN/network/21-httpin.html
vendored
Normal file
81
packages/node_modules/@node-red/nodes/locales/zh-CN/network/21-httpin.html
vendored
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
<!--
|
||||||
|
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="http in">
|
||||||
|
<p>创建用于创建Web服务的HTTP端点。</p>
|
||||||
|
<h3>输出</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload</dt>
|
||||||
|
<dd>GET请求包含任何查询字符串参数的对象。或者包含HTTP请求正文。</dd>
|
||||||
|
<dt>req<span class="property-type">object</span></dt>
|
||||||
|
<dd>HTTP请求对象。该对象包含有关请求信息的多个属性。
|
||||||
|
<ul>
|
||||||
|
<li><code>body</code> - 传入请求的正文。格式将取决于请求。</li>
|
||||||
|
<li><code>headers</code> - 包含HTTP请求标头的对象。</li>
|
||||||
|
<li><code>query</code> - 包含任何查询字符串参数的对象。</li>
|
||||||
|
<li><code>params</code> - 包含任何路由参数的对象。</li>
|
||||||
|
<li><code>cookies</code> - 包含请求cookie的对象。</li>
|
||||||
|
<li><code>files</code> - 如果节点启用了文件上传,则为包含了上传的文件的对象。</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
<dt>res<span class="property-type">object</span></dt>
|
||||||
|
<dd>HTTP响应对象。此属性不应直接使用;<code>HTTP Response</code>节点记录了如何响应请求。该属性必须保留在传递给响应节点的消息上。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>节点将在配置的路径上监听特定类型的请求。路径可以完全指定,例如<code>/user</code>,或包括可以接受任何值的命名参数,例如<code>/user/:name</code>。 使用命名参数时,可以在<code>msg.req.params</code>下访问其在请求中的实际值。</p>
|
||||||
|
<p>对于包含正文的请求(例如POST或PUT),请求的内容将作为<code>msg.payload</code>提供。</p>
|
||||||
|
<p>如果可以确定请求的内容类型,则正文将被解析为任何适当的类型。例如,<code>application/json</code>将被解析为其JavaScript对象表示。</p>
|
||||||
|
<p><b>注意:</b>该节点不发送对请求的任何响应。该流必须包含HTTP响应节点才能完成请求。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="http response">
|
||||||
|
<p>将响应发送回从HTTP输入节点接收的请求。</p>
|
||||||
|
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload <span class="property-type">string</span></dt>
|
||||||
|
<dd>响应的正文。</dd>
|
||||||
|
<dt class="optional">statusCode <span class="property-type">数值</span></dt>
|
||||||
|
<dd>如果设置,则用作响应状态代码。默认值:200。</dd>
|
||||||
|
<dt class="optional">headers <span class="property-type">object</span></dt>
|
||||||
|
<dd>如果设置,则提供HTTP头以包含在响应中。</dd>
|
||||||
|
<dt class="optional">cookies <span class="property-type">object</span></dt>
|
||||||
|
<dd>如果设置,则可用于设置或删除cookie。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>还可以在节点本身内设置<code>statusCode</code>和<code>headers</code>。如果在节点内设置了属性,则不能被相应的message属性覆盖。</p>
|
||||||
|
<h4>Cookie处理</h4>
|
||||||
|
<p><code>cookies</code>属性必须是名称/值对的对象。该值可以是使用默认选项设置cookie值的字符串,也可以是options对象。<p>
|
||||||
|
<p>下面的示例设置两个cookie-一个名为<code>name</code>的值为<code>nick</code>,另一个名为<code>session</code>的值为<code>1234</code>,并且有效期设置为15分钟。</p>
|
||||||
|
<pre>
|
||||||
|
msg.cookies = {
|
||||||
|
name: 'nick',
|
||||||
|
session: {
|
||||||
|
value: '1234',
|
||||||
|
maxAge: 900000
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
<p>有效选项包括:</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>domain</code> - (字符串) Cookie的域名</li>
|
||||||
|
<li><code>expires</code> - (日期) GMT标准时间的到期日。如果未指定或设置为0,则创建会话cookie</li>
|
||||||
|
<li><code>maxAge</code> - (字符串) 相对于当前时间的到期日期(以毫秒为单位)</li>
|
||||||
|
<li><code>path</code> - (字符串) Cookie的路径。默认为/</li>
|
||||||
|
<li><code>value</code> - (字符串) Cookie使用的值</li>
|
||||||
|
</ul>
|
||||||
|
<p>要删除Cookie,请将其<code>value</code>设置为<code>null</code>。</p>
|
||||||
|
|
||||||
|
</script>
|
78
packages/node_modules/@node-red/nodes/locales/zh-CN/network/21-httprequest.html
vendored
Normal file
78
packages/node_modules/@node-red/nodes/locales/zh-CN/network/21-httprequest.html
vendored
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
<!--
|
||||||
|
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="http request">
|
||||||
|
<p>发送HTTP请求并返回响应。</p>
|
||||||
|
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt class="optional">url <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>如果未在节点中配置,则此可选属性设置请求的url。</dd>
|
||||||
|
<dt class="optional">method <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>如果未在节点中配置,则此可选属性设置请求的HTTP方法。必须是<code>GET</code>,<code>PUT</code>,<code>POST</code>,<code>PATCH</code>或<code>DELETE</code>之一。</dd>
|
||||||
|
<dt class="optional">headers <span class="property-type">object</span></dt>
|
||||||
|
<dd>设置请求的HTTP头。</dd>
|
||||||
|
<dt class="optional">cookies <span class="property-type">object</span></dt>
|
||||||
|
<dd>如果设置,则可用于发送带有请求的cookie。</dd>
|
||||||
|
<dt class="optional">payload</dt>
|
||||||
|
<dd>发送为请求的正文。</dd>
|
||||||
|
<dt class="optional">rejectUnauthorized</dt>
|
||||||
|
<dd>如果设置为<code>false</code>,则允许对使用自签名证书的https站点进行请求。</dd>
|
||||||
|
<dt class="optional">followRedirects</dt>
|
||||||
|
<dd>如果设置为<code>false</code>,则阻止遵循重定向(HTTP 301)。默认情况下为<code>true</code></dd>
|
||||||
|
<dt class="optional">requestTimeout</dt>
|
||||||
|
<dd>如果设置为正数毫秒,将覆盖全局设置的<code>httpRequestTimeout</code>参数。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>输出</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload <span class="property-type">字符串 | object | buffer</span></dt>
|
||||||
|
<dd>响应的正文。可以将节点配置为以字符串形式返回主体,尝试将其解析为JSON字符串或将其保留为二进制buffer。</dd>
|
||||||
|
<dt>statusCode <span class="property-type">数值</span></dt>
|
||||||
|
<dd>响应的状态码,如果请求无法完成,则返回错误码。</dd>
|
||||||
|
<dt>headers <span class="property-type">object</span></dt>
|
||||||
|
<dd>包含响应头的对象。</dd>
|
||||||
|
<dt>responseUrl <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>如果在处理请求时发生任何重定向,则此属性为最终重定向的URL。否则则为原始请求的URL。</dd>
|
||||||
|
<dt>responseCookies <span class="property-type">object</span></dt>
|
||||||
|
<dd>如果响应包含cookie,则此属性是每个cookie的‘名称/值’键值对的对象。</dd>
|
||||||
|
<dt>redirectList <span class="property-type">数组</span></dt>
|
||||||
|
<dd>如果请求被重定向了一次或多次,则累积的信息将被添加到此属性。“location”是下一个重定向目标。cookie是从重定向源返回的cookie。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>在节点内配置后,URL属性可以包含<a href="http://mustache.github.io/mustache.5.html" target="_blank">mustache样式</a>标签。 这些标签允许使用传入消息的值来构造url。例如,如果url设置为<code>example.com/{{{{topic}}}</code>,它将自动插入<code>msg.topic</code>的值。使用{{{...}}}可以防止mustache转义/ &等字符。</p>
|
||||||
|
<p>节点可以选择自动将<code>msg.payload</code>编码为GET请求的查询字符串参数,在这种情况下,<code>msg.payload</code>必须是一个对象。</p>
|
||||||
|
<p><b>注意:</b>如果使用了代理,则应设置<code>http_proxy=...</code>环境变量并重新启动Node-RED,或使用“代理配置”。如果设置了代理配置,则配置优先于环境变量。</p>
|
||||||
|
<h4>使用多个HTTP请求节点</h4>
|
||||||
|
<p>为了在一个流程中多次使用该节点,必须要注意<code>msg.headers</code>属性的处理。通常在第一个节点在响应头中设置此属性,而不期望在下一个节点的请求头中使用此属性。如果节点之间的<code>msg.headers</code>属性保持不变,则第二个节点将忽略它。要设置自定义标题,首先应删除<code>msg.headers</code>或将其重置为空对象:<code>{}</code>。</p>
|
||||||
|
<h4>Cookie处理</h4>
|
||||||
|
<p>传递给节点的<code>cookies</code>属性必须是‘名称/值’键值对的对象。该值可以是设置cookie值的字符串,也可以是具有单个<code>value</code>属性的对象。</p>
|
||||||
|
<p>请求返回的所有cookie都将在<code>responseCookies</code>属性下传递回去。</p>
|
||||||
|
<h4>内容类型处理</h4>
|
||||||
|
<p>如果<code>msg.payload</code>是一个对象,则节点将自动将请求的内容类型设置为<code>application/json</code>并对其进行编码。</p>
|
||||||
|
<p>要将请求编码为表单数据,应将<code>msg.headers[“content-type”]</code>设置为<code>application/x-www-form-urlencoded</code>。</p>
|
||||||
|
<h4>文件上传</h4>
|
||||||
|
<p>要执行文件上传,应将<code>msg.headers["content-type"]</code>设置为<code>multipart/form-data</code>和<code>msg.payload</code>传递给节点的必须是具有以下结构的对象:</p>
|
||||||
|
<pre><code>{
|
||||||
|
"KEY": {
|
||||||
|
"value": FILE_CONTENTS,
|
||||||
|
"options": {
|
||||||
|
"filename": "FILENAME"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}</code></pre>
|
||||||
|
<p><code>KEY</code>,<code>FILE_CONTENTS</code>和<code>FILENAME</code>的值应设置为适当的值。</p>
|
||||||
|
|
||||||
|
</script>
|
35
packages/node_modules/@node-red/nodes/locales/zh-CN/network/22-websocket.html
vendored
Normal file
35
packages/node_modules/@node-red/nodes/locales/zh-CN/network/22-websocket.html
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<!--
|
||||||
|
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="websocket in">
|
||||||
|
<p>WebSocket输入节点。</p>
|
||||||
|
<p>默认情况下,从WebSocket接收的数据将位于<code>msg.payload</code>中。可以将套接字配置为期望格式正确的JSON字符串,在这种情况下,它将解析JSON并将结果对象作为整个消息发送。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="websocket out">
|
||||||
|
<p>WebSocket输出节点。</p>
|
||||||
|
<p>默认情况下,<code>msg.payload</code>将通过WebSocket发送。可以将套接字配置为将整个<code>msg</code>对象编码为JSON字符串,然后通过WebSocket发送。</p>
|
||||||
|
<p>如果到达此节点的消息是从WebSocket In节点开始的,则该消息将发送回触发流程的客户端。否则,消息将广播给所有连接的客户端。</p>
|
||||||
|
<p>如果要广播从“WebSocket输入”节点开始的消息,则可以应该删除流中的<code>msg._session</code>属性。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="websocket-listener">
|
||||||
|
<p>此配置节点使用指定的路径创建WebSocket服务器端点。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="websocket-client">
|
||||||
|
<p>此配置节点将WebSocket客户端连接到指定的URL。</p>
|
||||||
|
</script>
|
35
packages/node_modules/@node-red/nodes/locales/zh-CN/network/31-tcpin.html
vendored
Normal file
35
packages/node_modules/@node-red/nodes/locales/zh-CN/network/31-tcpin.html
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<!--
|
||||||
|
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="tcp in">
|
||||||
|
<p>提供TCP输入选择。可以连接到远程TCP端口,或接受传入连接。</p>
|
||||||
|
<p><b>注意:</b>在某些系统上,您可能需要root或管理员权限来访问低于1024的端口。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="tcp out">
|
||||||
|
<p>提供TCP输出的选择。可以连接到远程TCP端口,接受传入的连接,或回复从TCP In节点收到的消息。</p>
|
||||||
|
<p>仅发送<code>msg.payload</code>。</p>
|
||||||
|
<p>如果<code>msg.payload</code>是包含二进制数据的Base64编码的字符串,则Base64解码选项将导致它在发送之前先转换回二进制。</p>
|
||||||
|
<p>如果不存在<code>msg._session</code>,则有效负载将发送到<b>所有</b>连接的客户端。</p>
|
||||||
|
<p><b>注意:</b>在某些系统上,您可能需要root或管理员权限来访问低于1024的端口。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="tcp request">
|
||||||
|
<p>一个简单的TCP请求节点。将<code>msg.payload</code>发送到服务器tcp端口,并期望得到响应。</p>
|
||||||
|
<p>连接到服务器,发送“请求”并接收“响应”。 可以从固定数量的字符,与指定字符匹配的字符中选择操作,从第一个答复到达起等待指定的时间,等待数据到达,发送数据并立即取消连接而无需等待答复等操作中进行选择。</p>
|
||||||
|
<p>响应将在<code>msg.payload</code>中作为buffer输出,因此您可能需要对它进行<code>.toString()</code>操作。</p>
|
||||||
|
<p>如果将tcp主机或端口留空,则必须使用<code>msg.host</code>和<code>msg.port</code>属性进行设置。</p>
|
||||||
|
</script>
|
28
packages/node_modules/@node-red/nodes/locales/zh-CN/network/32-udp.html
vendored
Normal file
28
packages/node_modules/@node-red/nodes/locales/zh-CN/network/32-udp.html
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<!--
|
||||||
|
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="udp in">
|
||||||
|
<p>UDP输入节点。在<code>msg.payload</code>中生成Buffer,字符串或Base64编码的字符串。支持组播。</p>
|
||||||
|
<p>在<code>msg.ip</code>和<code>msg.port</code>中设置接收到的消息的IP地址和端口。</p>
|
||||||
|
<p><b>注意:</b>在某些系统上,您可能需要root或管理员权限才能使用低于1024的端口或广播。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="udp out">
|
||||||
|
<p>该节点将<code>msg.payload</code>发送到指定的UDP主机和端口。支持组播。</p>
|
||||||
|
<p>您也可以使用<code>msg.ip</code>和<code>msg.port</code>设置目标值,但是静态配置的值具有优先权。</p>
|
||||||
|
<p>如果选择广播,则将地址设置为本地广播IP地址。或者也可以尝试使用全局广播地址255.255.255.255。</p>
|
||||||
|
<p><b>注意:</b>在某些系统上,您可能需要root或管理员权限才能使用低于1024的端口或广播。</p>
|
||||||
|
</script>
|
43
packages/node_modules/@node-red/nodes/locales/zh-CN/parsers/70-CSV.html
vendored
Normal file
43
packages/node_modules/@node-red/nodes/locales/zh-CN/parsers/70-CSV.html
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<!--
|
||||||
|
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="csv">
|
||||||
|
<p>在CSV格式的字符串及其JavaScript对象表示形式之间进行相互转换。</p>
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">object | 数组 | 字符串</span></dt>
|
||||||
|
<dd>JavaScript对象,数组或CSV字符串。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>输出</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">object | 数组 | 字符串</span></dt>
|
||||||
|
<dd>
|
||||||
|
<ul>
|
||||||
|
<li>如果输入是字符串,它将尝试将其解析为CSV,并为每行创建键/值对的JavaScript对象。然后该节点将为每行发送一条消息,或者发送一条包含对象数组的消息。</li>
|
||||||
|
<li>如果输入是JavaScript对象,它将尝试构建CSV字符串。</li>
|
||||||
|
<li>如果输入是简单值的数组,则将构建单行CSV字符串。</li>
|
||||||
|
<li>如果输入是数组数组或对象数组,则会创建多行CSV字符串。</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>列模板可以包含列名称的有序列表。将CSV转换为对象时,列名将用作属性名称。或者也可以从CSV的第一行中获取列名称。</p>
|
||||||
|
<p>转换为CSV时,列模板用于标识从对象中提取的属性以及提取的顺序。</p>
|
||||||
|
<p>如果输入是数组,则列模板仅用于有选择地生成一行列标题。</p>
|
||||||
|
<p>只要正确设置<code>parts</code>属性,该节点就可以接受多部分输入。</p>
|
||||||
|
<p>如果输出多个消息,则将设置其<code>parts</code>属性并形成完整的消息序列。</p>
|
||||||
|
<p><b>注意:</b>列模板必须用逗号分隔,即使数据中已有了其他分隔符。</p>
|
||||||
|
</script>
|
33
packages/node_modules/@node-red/nodes/locales/zh-CN/parsers/70-HTML.html
vendored
Normal file
33
packages/node_modules/@node-red/nodes/locales/zh-CN/parsers/70-HTML.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="html">
|
||||||
|
<p>使用CSS选择器从<code>msg.payload</code>中保存的html文档中提取元素。</p>
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>从中提取元素的html字符串。</dd>
|
||||||
|
<dt class="optional">select <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>如果未在编辑面板中配置,则可以将选择器设置为msg的属性。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Output</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload <span class="property-type">数组 | 字符串</span></dt>
|
||||||
|
<dd>结果可以是有效载荷中包含匹配元素的数组的单个消息;也可以是多条消息,每条消息都包含匹配元素。发送多条消息时,需要为消息设置<code>parts</code>。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>该节点支持CSS和jQuery选择器的组合。查看<a href="https://github.com/fb55/CSSselect#user-content-supported-selectors" target="_blank">css-select documentation</a> 来获得更多信息。</p>
|
||||||
|
</script>
|
43
packages/node_modules/@node-red/nodes/locales/zh-CN/parsers/70-JSON.html
vendored
Normal file
43
packages/node_modules/@node-red/nodes/locales/zh-CN/parsers/70-JSON.html
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<!--
|
||||||
|
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="json">
|
||||||
|
<p>在JSON字符串及其JavaScript对象表示形式之间相互转换。</p>
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">object | 字符串</span></dt>
|
||||||
|
<dd>JavaScript对象或JSON字符串。</dd>
|
||||||
|
<dt>schema<span class="property-type">object</span></dt>
|
||||||
|
<dd>可选的JSON Schema对象用于验证有效负载。在将<code>msg</code>发送到下一个节点之前,将删除该属性。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Outputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">object | 字符串</span></dt>
|
||||||
|
<dd>
|
||||||
|
<ul>
|
||||||
|
<li>如果输入是JSON字符串,它将尝试将其解析为JavaScript对象。</li>
|
||||||
|
<li>如果输入是JavaScript对象,它将创建一个JSON字符串。并可以选择对此JSON字符串进行整形。</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
<dt>schemaError<span class="property-type">数组</span></dt>
|
||||||
|
<dd>如果JSON模式验证失败,则catch节点将具有包含错误数组的<code>schemaError</code>属性。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>默认的转换目标是<code>msg.payload</code>,但是也可以转换消息的其它属性。</p>
|
||||||
|
<p>您可以将其设置为仅执行特定的转换,而不是自动选择双向转换。例如,即使对<code>HTTP In</code>节点的请求未正确设置‘content-type’,也可以使用它来确保JSON节点的转换结果是JavaScript对象</p>
|
||||||
|
<p>如果指定了转换为JSON字符串,则不会对收到的字符串进行进一步的检查。也就是说,即使指定了格式化选项,它也不会检查字符串是否正确为JSON或对JSON执行整形。</p>
|
||||||
|
<p>有关JSON模式的更多详细信息,请查阅<a href="http://json-schema.org/latest/json-schema-validation.html">规范</a>.</p>
|
||||||
|
</script>
|
48
packages/node_modules/@node-red/nodes/locales/zh-CN/parsers/70-XML.html
vendored
Normal file
48
packages/node_modules/@node-red/nodes/locales/zh-CN/parsers/70-XML.html
vendored
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<!--
|
||||||
|
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="xml">
|
||||||
|
<p>在XML字符串及其JavaScript对象表示形式之间进行相互转换。</p>
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">object | 字符串</span></dt>
|
||||||
|
<dd>JavaScript对象或XML字符串。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>输出</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">object | 字符串</span></dt>
|
||||||
|
<dd>
|
||||||
|
<ul>
|
||||||
|
<li>如果输入是字符串,它将尝试将其解析为XML并创建一个JavaScript对象。</li>
|
||||||
|
<li>如果输入是JavaScript对象,它将尝试构建XML字符串。</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
<dt class="optional">options <span class="property-type">object</span></dt>
|
||||||
|
<dd>可以将选项传递给内部使用的XML转换库。请参见<a href="https://github.com/Leonidas-from-XIV/node-xml2js/blob/master/README.md#options" target="_blank"> xml2js文档</a> 来获取更多信息。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>在XML和对象之间进行转换时,默认情况下XML属性会添加到名为<code>$</code>的属性中。将文本内容添加到名为<code>_</code>的属性中。这些属性名称可以在节点设置中更改。</p>
|
||||||
|
<p>例如,将如下所示转换以下XML:</p>
|
||||||
|
<pre><p class="tag">Hello World</p></pre>
|
||||||
|
<pre>{
|
||||||
|
"p": {
|
||||||
|
"$": {
|
||||||
|
"class": "tag"
|
||||||
|
},
|
||||||
|
"_": "Hello World"
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
</script>
|
34
packages/node_modules/@node-red/nodes/locales/zh-CN/parsers/70-YAML.html
vendored
Normal file
34
packages/node_modules/@node-red/nodes/locales/zh-CN/parsers/70-YAML.html
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<!--
|
||||||
|
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="yaml">
|
||||||
|
<p>在YAML格式的字符串及其JavaScript对象表示形式之间相互转换。</p>
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">object | 字符串</span></dt>
|
||||||
|
<dd>JavaScript对象或YAML字符串。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>Outputs</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">object | 字符串</span></dt>
|
||||||
|
<dd>
|
||||||
|
<ul>
|
||||||
|
<li>如果输入是YAML字符串,它将尝试将其解析为JavaScript对象。</li>
|
||||||
|
<li>如果输入是JavaScript对象,它将创建一个YAML字符串。</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</script>
|
133
packages/node_modules/@node-red/nodes/locales/zh-CN/sequence/17-split.html
vendored
Normal file
133
packages/node_modules/@node-red/nodes/locales/zh-CN/sequence/17-split.html
vendored
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
<!--
|
||||||
|
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="split">
|
||||||
|
<p>将一条消息拆分为一系列消息。</p>
|
||||||
|
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload<span class="property-type">object | 字符串 | 数组 | buffer</span></dt>
|
||||||
|
<dd>节点的行为由<code>msg.payload</code>的类型决定:
|
||||||
|
<ul>
|
||||||
|
<li><b>字符串</b>/<b>buffer</b> - 使用指定的字符(默认值:<code>\n</code>),缓冲区序列或固定长度将消息拆分。</li>
|
||||||
|
<li><b>数组</b> - 消息被拆分为单个数组元素或固定长度的数组。</li>
|
||||||
|
<li><b>object</b> - 将为对象的每个键/值对发送一条消息。</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>输出</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>parts<span class="property-type">object</span></dt>
|
||||||
|
<dd>此属性包含有关如何将消息与原始消息分开的信息。如果传递给<b>join</b>节点,则可以将序列重组为单个消息。该属性具有以下属性:
|
||||||
|
<ul>
|
||||||
|
<li><code>id</code> - 一组消息的标识符</li>
|
||||||
|
<li><code>index</code> - 组中的位置</li>
|
||||||
|
<li><code>count</code> - 如果已知组中的邮件总数。请参阅下面的“流媒体模式”</li>
|
||||||
|
<li><code>type</code> - 消息的类型-字符串/数组/对象/buffer</li>
|
||||||
|
<li><code>ch</code> - 对于字符串或buffer,用于将消息拆分为字符串或字节数组的数据</li>
|
||||||
|
<li><code>key</code> - 对于对象,创建此消息的属性的键。可以将节点配置为也将此值复制到另一个消息属性,例如<code>msg.topic</code></li>
|
||||||
|
<li><code>len</code> - 使用固定长度值拆分消息时,每段子消息的长度</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>在使用<b>join</b>节点将序列重新组合为单个消息之前,推荐使用此节点来轻松地创建跨消息序列,执行通用操作的流。</p>
|
||||||
|
<p>它使用<code>msg.parts</code>属性跟踪序列的各个部分。</p>
|
||||||
|
<h4>流媒体模式</h4>
|
||||||
|
<p>该节点还可以用于重排消息流。例如,发送换行符终止命令的串行设备可能会传递一条消息,并在其末尾带有部分命令。 在“流模式”下,此节点将拆分一条消息并发送每个完整的段。如果末尾有部分片段,则该节点将保留该片段,并将其添加到收到的下一条消息之前。</p>
|
||||||
|
<p>在此模式下运行时,该节点将不会设置<code>msg.parts.count</code>属性,因为流中期望的消息数还是未知的。这意味着它不能在自动模式下与<b>join</b>节点一起使用。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="join">
|
||||||
|
<p>将消息序列合并为一条消息.</p>
|
||||||
|
<p>共有三种模式:</p>
|
||||||
|
<dl>
|
||||||
|
<dt>自动模式</dt>
|
||||||
|
<dd>与<b>split</b>节点配对时,它将自动将已被拆分的消息进行合并。</dd>
|
||||||
|
<dt>手动模式</dt>
|
||||||
|
<dd>手动地以各种方式合并消息序列。</dd>
|
||||||
|
<dt>列聚合模式</dt>
|
||||||
|
<dd>对消息列中的所有消息应用表达式以将其简化为单个消息。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt class="optional">parts<span class="property-type">object</span></dt>
|
||||||
|
<dd>使用自动模式时,所有的消息都应包含此属性。<b>split</b>节点会生成此属性,但也可以手动进行设置。该属性具有以下属性:
|
||||||
|
<ul>
|
||||||
|
<li><code>id</code> - 消息组的标识符</li>
|
||||||
|
<li><code>index</code> - 组中的位置</li>
|
||||||
|
<li><code>count</code> - 如果已知组中的邮件总数。请参阅下面的“流媒体模式”</li>
|
||||||
|
<li><code>type</code> - 消息的类型-字符串/数组/对象/buffer</li>
|
||||||
|
<li><code>ch</code> - 对于字符串或buffer,用于将消息拆分为字符串或字节数组的数据</li>
|
||||||
|
<li><code>key</code> - 对于对象,创建此消息的属性的键。可以将节点配置为也将此值复制到另一个消息属性,例如<code>msg.topic</code>/li>
|
||||||
|
<li><code>len</code> - 使用固定长度值拆分消息时,每段子消息的长度</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
<dt class="optional">complete</dt>
|
||||||
|
<dd>如果设置,则节点将以其当前状态发送其输出消息。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
|
||||||
|
<h4>自动模式</h4>
|
||||||
|
<p>自动模式使用传入消息的<code>parts</code>属性来确定应如何连接序列。这使它可以自动逆转<b>split</b>节点的操作。</p>
|
||||||
|
|
||||||
|
<h4>手动模式</h4>
|
||||||
|
<p>设置为以手动模式时,该节点能以各种不同的方法来处理消息:</p>
|
||||||
|
<ul>
|
||||||
|
<li><b>字符串</b>或<b>缓冲区</b>-通过将每条消息的选定属性与指定的连接字符或缓冲区连接起来。</li>
|
||||||
|
<li><b>数组</b> - 通过将每个选定的属性或整个消息添加到输出数组</li>
|
||||||
|
<li><b>键/值对象</b> - 通过使用每个消息的属性来确定存储所需值的键。</li>
|
||||||
|
<li><b>merged object</b> - 通过将每个消息的属性合并到一个对象下。</li>
|
||||||
|
</ul>
|
||||||
|
<p>输出消息的其他属性都取自发送结果前的最后一条消息。</p>
|
||||||
|
<p>可以用<i>计数</i>来确定应接收多少条消息来进行合并。对于对象输出,可以设置为达到此计数后的每条后续消息都发送一条输出。</p>
|
||||||
|
<p>可以用<i>超时</i>来设置发送新消息之前的等待时间。</p>
|
||||||
|
<p>如果收到设置了<b>msg.complete</b>属性的消息时发送输出消息并重置消息列数。</p>
|
||||||
|
<p>如果收到设置了<b>msg.reset</b>属性的消息,则部分收到的消息将被删除而不发送,同时重置消息列数。</p>
|
||||||
|
|
||||||
|
<h4>列聚合模式</h4>
|
||||||
|
<p>选择列聚合模式时,将表达式应用于组成消息列的每条消息,并使用聚合值组成一条消息。</p>
|
||||||
|
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>初始值</dt>
|
||||||
|
<dd>累积值的初始值(<code>$A</code>)。</dd>
|
||||||
|
<dt>聚合表达式</dt>
|
||||||
|
<dd>序列中的每个消息调用的JSONata表达式。结果将作为累加值传递到表达式的下一个调用。在表达式中,可以使用以下特殊变量:
|
||||||
|
<ul>
|
||||||
|
<li><code>$A</code>: 累计值 </li>
|
||||||
|
<li><code>$I</code>: 消息在序列中的索引</li>
|
||||||
|
<li><code>$N</code>: 序列中的消息数</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
<dt>最终调整式子</dt>
|
||||||
|
<dd>可选的JSONata表达式,在将聚合表达式应用于序列中的所有消息之后应用。在表达式中,可以使用以下特殊变量:
|
||||||
|
<ul>
|
||||||
|
<li><code>$A</code>: 累计值</li>
|
||||||
|
<li><code>$N</code>: 消息在序列中的索引</li>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
<p>默认情况下,按顺序从序列的第一条消息到最后一条消息应用聚合表达式。也可以选择以相反的顺序应用聚合表达式。</p>
|
||||||
|
</dl>
|
||||||
|
<p><b>例子:</b>给定一系列数字值,以下设置将计算平均值:
|
||||||
|
<ul>
|
||||||
|
<li><b>聚合表达式</b>: <code>$A+payload</code></li>
|
||||||
|
<li><b>初始值</b>: <code>0</code></li>
|
||||||
|
<li><b>最终调整式</b>: <code>$A/$N</code></li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
<h4>储存讯息</h4>
|
||||||
|
<p>该节点将在内部缓存消息,以便跨序列工作。运行时设置<code>nodeMessageBufferMaxLength</code>可用于设定缓存的消息数。</p>
|
||||||
|
</script>
|
41
packages/node_modules/@node-red/nodes/locales/zh-CN/sequence/18-sort.html
vendored
Normal file
41
packages/node_modules/@node-red/nodes/locales/zh-CN/sequence/18-sort.html
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<!--
|
||||||
|
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="sort">
|
||||||
|
<p>对消息属性或消息序列进行排序的函数。</p>
|
||||||
|
<p>当配置为对消息属性进行排序时,节点将对指定消息属性所指向的数组数据进行排序。</p>
|
||||||
|
<p>当配置为对消息序列排序时,它将对消息重新排序。</p>
|
||||||
|
<p>排序顺序可以是:</p>
|
||||||
|
<ul>
|
||||||
|
<li><b>升序</b></li>
|
||||||
|
<li><b>降序</b></li>
|
||||||
|
</ul>
|
||||||
|
<p>对于数字,可以通过复选框指定数字顺序。</p>
|
||||||
|
<p>排序键可以是元素值,也可以是JSONata表达式来对属性值进行排序,还可以是message属性或JSONata表达式来对消息序列进行排序。<p>
|
||||||
|
<p>在对消息序列进行排序时,排序节点依赖于接收到的消息来设置<code>msg.parts</code>。拆分节点将生成此属性,但也可以手动创建。它具有以下属性:</p>
|
||||||
|
<p>
|
||||||
|
<ul>
|
||||||
|
<li><code>id</code> - 消息组的标识符</li>
|
||||||
|
<li><code>index</code> - 组中的位置</li>
|
||||||
|
<li><code>count</code> - 群组中的邮件总数</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
<p><b>注意:</b>在此节点的处理中,消息在内部存储。通过指定要累积的最大消息数,可以防止意外的高内存使用。默认设置是不限制消息数量。
|
||||||
|
<ul>
|
||||||
|
<li><code>nodeMessageBufferMaxLength</code>属性在<b>settings.js</b>中设置。</li>
|
||||||
|
</ul>
|
||||||
|
</p>
|
||||||
|
</script>
|
34
packages/node_modules/@node-red/nodes/locales/zh-CN/sequence/19-batch.html
vendored
Normal file
34
packages/node_modules/@node-red/nodes/locales/zh-CN/sequence/19-batch.html
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<!--
|
||||||
|
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="batch">
|
||||||
|
<p>根据各种规则创建消息序列。</p>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>有三种创建消息序列的模式:</p>
|
||||||
|
<dl>
|
||||||
|
<dt>讯息数</dt>
|
||||||
|
<dd>将消息分组为给定长度的序列。 <b>overlap</b>(重叠)选项指定在一个序列的末尾应重复多少消息。</dd>
|
||||||
|
|
||||||
|
<dt>时间间隔</dt>
|
||||||
|
<dd>对在指定时间间隔内到达的邮件进行分组。如果在该时间间隔内没有消息到达,则该节点可以选择发送空消息。</dd>
|
||||||
|
|
||||||
|
<dt>串联序列</dt>
|
||||||
|
<dd>通过串联输入序列来创建消息序列。每条消息必须具有<code>msg.topic</code>属性和标识其序列的<code>msg.parts</code>属性。该节点配置有<code>topic</code>值列表,以标识所连接的顺序序列。
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<h4>储存讯息</h4>
|
||||||
|
<p>该节点将在内部缓冲消息,以便跨序列工作。运行时设置<code>nodeMessageBufferMaxLength</code>可用于限制节点将缓存多少消息。</p>
|
||||||
|
</script>
|
59
packages/node_modules/@node-red/nodes/locales/zh-CN/storage/10-file.html
vendored
Normal file
59
packages/node_modules/@node-red/nodes/locales/zh-CN/storage/10-file.html
vendored
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
<!--
|
||||||
|
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="file">
|
||||||
|
<p>将<code>msg.payload</code>写入文件,添加到末尾或替换现有内容。或者,它也可以删除文件。</p>
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt class="optional">filename<span class="property-type">字符串</span></dt>
|
||||||
|
<dd>如果未在节点中配置,则此可选属性可以设置文件名。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>输出</h3>
|
||||||
|
<p>写入完成后,输入消息将发送到输出端口。</p>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>每个消息的有效荷载将添加到文件的末尾,可以选择在每个消息之间添加一个换行符(\n)。</p>
|
||||||
|
<p>如果使用<code>msg.filename</code>,则每次写入后文件都会关闭。为了获得最佳体验,请使用固定的文件名。</p>
|
||||||
|
<p>可以将其配置为覆盖整个文件,而不是在文件后添加段落。例如,在将二进制数据写入文件(例如图像)时,应使用此选项,并且应禁用添加换行符的选项。</p>
|
||||||
|
<p>可以从编码列表中指定写入文件的数据的编码。</p>
|
||||||
|
<p>您可以将此节点配置为删除文件。</p>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script type="text/x-red" data-help-name="file in">
|
||||||
|
<p>以字符串或二进制缓冲区的形式读取文件的内容。</p>
|
||||||
|
<h3>输入</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt class="optional">filename<span class="property-type">字符串</span></dt>
|
||||||
|
<dd>如果未在节点配置中设置,该属性可以选择要读取的文件名。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>输出</h3>
|
||||||
|
<dl class="message-properties">
|
||||||
|
<dt>payload <span class="property-type">字符串 | buffer</span></dt>
|
||||||
|
<dd>文件的内容可以是字符串,也可以是二进制的buffer。</dd>
|
||||||
|
<dt class="optional">filename <span class="property-type">字符串</span></dt>
|
||||||
|
<dd>如果未在节点配置中设置,该属性可以选择要读取的文件名。</dd>
|
||||||
|
<dt class="optional">error <span class="property-type">object</span></dt>
|
||||||
|
<dd><i>已不推荐使用</i>: 如果在节点中启用,则当节点在读取文件时遇到错误时,它将发送一条没有<code>有效荷载</code>的消息,且将消息的<code>error</code>属性设置为错误的详细信息。在默认情况下,此行为模式已弃用且未启用。 请参阅下面的详细信息。</dd>
|
||||||
|
</dl>
|
||||||
|
<h3>详细</h3>
|
||||||
|
<p>文件名应该是绝对路径,否则将相对于Node-RED进程的工作目录。</p>
|
||||||
|
<p>在Windows上,可能需要使用转义路径分隔符,例如:<code>\\Users\\myUser</code>。</p>
|
||||||
|
<p>可以选择将文本文件拆分为几行,每行输出一条消息,或者将二进制文件拆分为较小的buffer块-块大小取决于操作系统,但通常为64k(Linux/Mac)或41k(Windows)。</p>
|
||||||
|
<p>当拆分为多条消息时,每条消息将具有<code>parts</code>属性集,从而形成完整的消息序列。</p>
|
||||||
|
<p>如果输出格式为字符串,则可以从编码列表中指定输入数据的编码。</p>
|
||||||
|
<h4>旧版的错误处理</h4>
|
||||||
|
<p>在Node-RED 0.17之前,如果此节点在读取文件时遇到错误,它将发送一条不包含<code>msg.payload</code>,但包含<code>msg.error</code>的消息。在<code>msg.error</code>中记录详细的错误内容。但这是模式已被弃用,默认未启用。如有需要,您可以在节点配置中重新启用该模式。</p>
|
||||||
|
<p>应该使用Catch节点来捕获并处理错误。</p>
|
||||||
|
</script>
|
25
packages/node_modules/@node-red/nodes/locales/zh-CN/storage/23-watch.html
vendored
Normal file
25
packages/node_modules/@node-red/nodes/locales/zh-CN/storage/23-watch.html
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<!--
|
||||||
|
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="watch">
|
||||||
|
<p>监视目录或文件中的更改。</p>
|
||||||
|
<p>您可以输入用逗号分隔的目录和/或文件的列表。您需要在所有带有空格的地方加上引号“...”。</p>
|
||||||
|
<p>在Windows上,必须在任何目录名称中使用双反斜杠<code>\\</code>。</p>
|
||||||
|
<p>实际更改的文件的完整文件名将放入<code>msg.payload</code>和<code>msg.filename</code>中,而监视列表的字符串化版本将在<code>msg.topic</code>中返回。</p>
|
||||||
|
<p><code>msg.file</code>仅包含已更改文件的短文件名。<code>msg.type</code>更改了事物的类型,通常是<i>file</i>或<i>directory</i>,而<code>msg.size</code>保留了文件的大小(以字节为单位)。</p>
|
||||||
|
<p>当然,在Linux中,<i>everything</i>也是一个文件,因此可以监视</p>
|
||||||
|
<p><b>注意:</b>该目录或文件必须存在才能被监视。如果文件或目录被删除,即使重新创建它也可能不再被监视。</p>
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user