-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcountula.html
More file actions
59 lines (53 loc) · 1.77 KB
/
countula.html
File metadata and controls
59 lines (53 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<script type="text/javascript">
RED.nodes.registerType('countula',{
category: 'common',
color: '#C0C0C0',
align: 'left',
defaults: {
name: {value:""}
},
inputs:1,
outputs:2,
icon: "count.png",
inputLabels: "any",
outputLabels: ["stdout", "count"],
label: function() {
return this.name||"countula";
}
});
</script>
<script type="text/html" data-template-name="countula">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/html" data-help-name="countula">
<p>Counts messages.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">string | buffer</span>
</dt>
<dd> Any ol payload will do. </dd>
<dt class="optional">topic <span class="property-type">string</span></dt>
<dd> set topic to SET or RESET to set the initial count or reset it.</dd>
</dl>
<ol class="node-ports">
<li>Standard output
<dl class="message-properties">
<dt>payload <span class="property-type">string</span></dt>
<dd>The payload that we received.</dd>
</dl>
</li>
<li>Count
<dl class="message-properties">
<dt>payload <span class="property-type">string</span></dt>
<dd>the number of msgs we have seen since RESET or SET.</dd>
</dl>
</li>
</ol>
<h3>Details</h3>
<p><code>msg.payload</code> is used as the payload of the published message.</p>
<p><code>msg.topic</code> can used to SET or RESET or, if left blank, it will just add to the previous value.</p>
</script>