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/ko/function/10-function.html
vendored
Normal file
51
packages/node_modules/@node-red/nodes/locales/ko/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>의 제2 인수로 전달합니다:</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/ko/function/10-switch.html
vendored
Normal file
39
packages/node_modules/@node-red/nodes/locales/ko/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> - 메세지 전체에 대해 평가를 수행하여, 결과가 true인 경우에 매치</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/ko/function/15-change.html
vendored
Normal file
33
packages/node_modules/@node-red/nodes/locales/ko/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/ko/function/16-range.html
vendored
Normal file
33
packages/node_modules/@node-red/nodes/locales/ko/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/ko/function/80-template.html
vendored
Normal file
49
packages/node_modules/@node-red/nodes/locales/ko/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>{{{3중}}}</code>괄호형식을 사용해야 합니다.</p>
|
||||
</script>
|
30
packages/node_modules/@node-red/nodes/locales/ko/function/89-delay.html
vendored
Normal file
30
packages/node_modules/@node-red/nodes/locales/ko/function/89-delay.html
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<!--
|
||||
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>
|
||||
</dl>
|
||||
<h3>상세</h3>
|
||||
<p>메세지를 지연시키도록 설정한 경우, 지연시간은 고정값, 범위내의 난수값, 메세지 마다의 동적인 지정값 중 하나를 지정할 수 있습니다.</p>
|
||||
<p>유량을 제한할 경우, 메세지는 지정된 시간간격내에 분산되어 송신합니다. 큐에 남은 메세지 수는 노드의 스테이터스에 표시됩니다. 받은 중간 메세지를 파기할 수도 있습니다.</p>
|
||||
<p>유량제한은 모든 메세지에 적용할 수도, <code>msg.topic</code>값으로 그룹화하여 적용할 수도 있습니다. 그룹화하면, 중간메세지는 자동적으로 파기됩니다. 시간간격별로 모든 토픽의 최신메세지를 송신할지, 다음 토픽의 최신메세지를 송신할지 지정할 수 있습니다.</p>
|
||||
</script>
|
33
packages/node_modules/@node-red/nodes/locales/ko/function/89-trigger.html
vendored
Normal file
33
packages/node_modules/@node-red/nodes/locales/ko/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/ko/function/90-exec.html
vendored
Normal file
74
packages/node_modules/@node-red/nodes/locales/ko/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