mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
major change to snmp node to not stringify octet string type.
This commit is contained in:
parent
bd15c5d6dd
commit
a55be34bc0
@ -9,6 +9,9 @@ fetch values from SNMP enabled hosts. Supports v1, v2c and v3.
|
||||
* SNMP table - Simple SNMP oid table fetcher
|
||||
* SNMP walker - Simple SNMP oid walker fetcher
|
||||
|
||||
## v2 Breaking Change
|
||||
v2 has a breaking change in that the single snmp node no longer tries to stringify an octet string type (04). This makes it consistent with the other nodes in this bundle. this means the user now has to convert to a string if required but has better control of how they wish to do that.
|
||||
|
||||
Install
|
||||
-------
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
{
|
||||
"name" : "node-red-node-snmp",
|
||||
"version" : "1.0.6",
|
||||
"version" : "2.0.0",
|
||||
"description" : "A Node-RED node that gets and sets SNMP oid values. Supports v1, v2c and v3",
|
||||
"dependencies" : {
|
||||
"net-snmp" : "^3.8.2"
|
||||
"net-snmp" : "^3.9.0"
|
||||
},
|
||||
"repository" : {
|
||||
"type":"git",
|
||||
|
@ -253,9 +253,9 @@ module.exports = function (RED) {
|
||||
node.error(SNMP.varbindError(vb), msg);
|
||||
vb._error = SNMP.varbindError(vb); //add _error to msg so users can determine the varbind is not valid
|
||||
}
|
||||
else {
|
||||
if (vb.type == 4) { vb.value = vb.value.toString(); }
|
||||
}
|
||||
// else {
|
||||
// if (vb.type == 4) { vb.value = vb.value.toString(); }
|
||||
// }
|
||||
vb.tstr = SNMP.ObjectType[vb.type];
|
||||
}
|
||||
msg.payload = varbinds;
|
||||
|
Loading…
x
Reference in New Issue
Block a user