snmpSession
- Description:
- The Created SNMP Session for the device.
Methods
(static) get(oids, snmpCallback)
- Description:
- Executes SNMP Get for a list of OIDs towards the device
Example
D.device.createSNMPSession().get(['1.3.6.1.2.1.1.5.0', '1.3.6.1.2.1.1.7.0'], cb)
See SNMP Driver Examples
Parameters:
Name |
Type |
Description |
oids |
Array.<string>
|
A list of OID strings to execute an SNMP Get towards. |
snmpCallback |
callback
|
Properties
Name |
Type |
Attributes |
Description |
output |
Object.<string, string>
|
<optional>
|
The output object from the snmp query execution as a key-value pair for each oid and it corresponding value |
error |
ErrorResult
|
<optional>
|
Will be present if the snmp query resulted in an error.* @readonly |
|
(static) set(oid, value, snmpCallback)
- Description:
- Executes SNMP Set for an OID with its respective value and OID type defined.
Example
D.device.createSNMPSession().set('1.3.6.1.2.1.1.5.0', 'new-snmp-name', cb)
See SNMP Driver Examples
Parameters:
Name |
Type |
Description |
oid |
string
|
The OID to perform the snmp set for. Must be writable. |
value |
string
|
int
|
The new value to set on that OID |
snmpCallback |
callback
|
Properties
Name |
Type |
Attributes |
Description |
output |
Object.<string, string>
|
<optional>
|
The output object from the snmp query execution as a key-value pair for each oid and it corresponding value |
error |
ErrorResult
|
<optional>
|
Will be present if the snmp query resulted in an error.* @readonly |
|
(static) walk(oid, snmpCallback)
- Description:
- Executes an SNMP Walk for an OID towards the device
Example
D.device.createSNMPSession().walk('1.3.6.1.2.1.1', cb)
See SNMP Driver Examples
Parameters:
Name |
Type |
Description |
oid |
string
|
The OID to perform the snmp walk for. |
snmpCallback |
callback
|
Properties
Name |
Type |
Attributes |
Description |
output |
Object.<string, string>
|
<optional>
|
The output object from the snmp query execution as a key-value pair for each oid and it corresponding value |
error |
ErrorResult
|
<optional>
|
Will be present if the snmp query resulted in an error.* @readonly |
|