Thanks to both the Norcal-SNMP and Embr-SNMP teams for their efforts to make their SNMP drivers work. I have tested both successfully (read only, v2c) in the office with some of our rapid deployment field equipment where SNMP is the only monitoring we’ve got (and very limited at that). The field failure risk is relatively high (esp for power) due to the rapid, limited, compromised and temporary nature of the deployments so hopefully we can monitor, alarm and intervene before failure. It will also enable to log data on the equipment’s performance over time to optimise specs.
I’ve updated this today, it now includes an option to use a privacy key for encryption, along with many error reporting improvements, and an updated readme.
Add system.snmp.agent.readTable for reading tables as datasets.
You are expected to provide the columns of the table, and optionally lower/upper bound indexes for the section of the table you'd like to access.
system.snmp.agent.read and system.snmp.agent.walk now return lists of QualifiedOidValues. You've got the standard QualifiedValue stuff, plus an attached .oid/.getOid().
system.snmp.agent.write now returns a list of QualityCodes.
Full keyword argument support.
Next step before release is Blocking/Async versions.
The QualifiedOidValues now use a custom Oid class instead of directly using SNMP4J's OID type.
PyCompletableFuture
In order to execute asynchronously this function returns a PyCompletableFuture. This is wrapper around a Java CompletableFuture with convenience functions for interacting with Python scripting. PyCompletableFuture functions very similarly to the Promise objects returned from system.net.httpClient calls.
Methods
Signature
Returns
Description
getFuture()
CompletableFuture
Returns the raw underlying CompletableFuture.
cancel()
Boolean
Cancels the completion of this future.
isDone()
Boolean
Checks if the future is complete.
then(callback)
PyCompletableFuture
Return a new PyCompletableFuture that wraps this one's return value in a Python callable.
handleException(callback)
PyCompletableFuture
Return a new PyCompletableFuture that will run the provided callback in the event of an exception, to attempt graceful error handling.
whenComplete(callback)
None
Call callback, asynchronously, whenever this future completes.