-
-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to decode Float class generated by pyasn1? #158
Comments
Well, this Compiler-wise, it seems to behave as it should. |
I've looked at the RFC and and those definitions while similar are not what my MIB uses, and even then that RFC still doesn't have a display hint defined for it. I am also not able to find any actual, working examples of using display hints with octet streams and not integers. Further, I'm not entirely sure what you mean by the compiler is doing what it should? Is my MIB definition incomplete? I feel something is wrong here, or perhaps in pysnmp? Net-SNMP and two different proprietary applications not based on Net-SNMP are able to decode the Float type automatically without any issues. |
The description of TEXTUAL-CONVENTION suggests that value interpretation should happen at implementation time. That makes me think that we need to add rfc6340.py module to pysnmp/smi/mibs with hand written code parsing and possibly building Float values. |
My MIB file defines the following:
And pyasn1 generates the following code in the pysnmp compiled MIB file:
preforming an SNMP get on on values that use this data type return the following:
This is not what I expected, I expected a human readable number based off of the specification and the library generated Class. How do I display the decoded number? snap-get seems to handle this seamlessly.
The text was updated successfully, but these errors were encountered: