mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
update snap node docs to make outputs more obvious
This commit is contained in:
parent
9539c3674f
commit
5a95e9c404
@ -12,7 +12,6 @@ Run the following command in the user directory of your Node-RED install.
|
|||||||
|
|
||||||
npm install node-red-node-snmp
|
npm install node-red-node-snmp
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
@ -20,20 +19,21 @@ Usage
|
|||||||
|
|
||||||
SNMP oids fetcher. Can fetch a single or comma separated list of oids. Triggered by any input.
|
SNMP oids fetcher. Can fetch a single or comma separated list of oids. Triggered by any input.
|
||||||
|
|
||||||
**msg.oid** may contain a comma separated list of oids to search for. (no spaces)
|
`msg.oid` may contain a comma separated list of oids to search for. (no spaces)
|
||||||
|
|
||||||
The oids confgured in the edit config will override msg.oid. Leave blank if you
|
The oids confgured in the edit config will override msg.oid. Leave blank if you
|
||||||
want to use msg.oid to provide input.
|
want to use msg.oid to provide input.
|
||||||
|
|
||||||
Outputs **msg.payload** containing a table of objects. Values depends on the oids being requested.
|
Outputs `msg.payload` containing a table of objects, and the requested `msg.oid`.
|
||||||
|
Values depends on the oids being requested.
|
||||||
|
|
||||||
###snmp-table
|
###snmp-table
|
||||||
|
|
||||||
Simple SNMP table oid fetcher. Triggered by any input.
|
Simple SNMP table oid fetcher. Triggered by any input.
|
||||||
|
`msg.oid` may contain the oid of a single table to search for.
|
||||||
**msg.oid** may contain the oid of a single table to search for.
|
|
||||||
|
|
||||||
The oid confgured in the edit config will override msg.oid. Leave blank if you
|
The oid confgured in the edit config will override msg.oid. Leave blank if you
|
||||||
want to use msg.oid to provide input.
|
want to use msg.oid to provide input.
|
||||||
|
|
||||||
Outputs **msg.payload** containing the table of objects. Values depends on the oids being requested.
|
Outputs `msg.payload` containing the table of objects, and the requested `msg.oid`.
|
||||||
|
Values depends on the oids being requested.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-snmp",
|
"name" : "node-red-node-snmp",
|
||||||
"version" : "0.0.3",
|
"version" : "0.0.4",
|
||||||
"description" : "A Node-RED node that looks for SNMP oids.",
|
"description" : "A Node-RED node that looks for SNMP oids.",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"net-snmp" : "1.1.13"
|
"net-snmp" : "1.1.13"
|
||||||
|
@ -43,7 +43,8 @@
|
|||||||
|
|
||||||
<script type="text/x-red" data-help-name="snmp">
|
<script type="text/x-red" data-help-name="snmp">
|
||||||
<p>Simple SNMP oid or oid list fetcher. Triggered by any input.</p>
|
<p>Simple SNMP oid or oid list fetcher. Triggered by any input.</p>
|
||||||
<p><b>msg.oid</b> may contain a comma separated list of oids to request. (no spaces)</p>
|
<p><code>msg.oid</code> may contain a comma separated list of oids to request. (no spaces)</p>
|
||||||
|
<p>The node will output <code>msg.payload</code> and <code>msg.oid</code>.</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -99,7 +100,8 @@
|
|||||||
|
|
||||||
<script type="text/x-red" data-help-name="snmp table">
|
<script type="text/x-red" data-help-name="snmp table">
|
||||||
<p>Simple SNMP oid table fetcher. Triggered by any input.</p>
|
<p>Simple SNMP oid table fetcher. Triggered by any input.</p>
|
||||||
<p><b>msg.oid</b> may contain the oid of a table to request.</p>
|
<p><code>msg.oid</code> may contain the oid of a table to request.</p>
|
||||||
|
<p>The node will output <code>msg.payload</code> and <code>msg.oid</code>.</p>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -104,7 +104,7 @@ module.exports = function(RED) {
|
|||||||
this.on("input",function(msg) {
|
this.on("input",function(msg) {
|
||||||
var oids = node.oids || msg.oid;
|
var oids = node.oids || msg.oid;
|
||||||
if (oids) {
|
if (oids) {
|
||||||
msg.oids = oids;
|
msg.oid = oids;
|
||||||
node.session.table(oids, maxRepetitions, responseCb);
|
node.session.table(oids, maxRepetitions, responseCb);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user