[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mibble-users] How to print Enum names
From: |
Srinivasan, Muralikrishna (Murali Krishna) |
Subject: |
[Mibble-users] How to print Enum names |
Date: |
Mon, 20 Mar 2006 14:01:07 +0530 |
Hi,
I am currently using the 2.6 version of mibble with a --debug option to
produce a fully RESOLVED text.
When enumerated values are resolved
e.g
abcAction OBJECT-TYPE
SYNTAX INTEGER { none(0),
restart(1),
shutdown(2)
}
MIBBLE PRODUCES:
VALUE abcAction OBJECT-TYPE (
Syntax: [UNIVERSAL 2] INTEGER (0 | 1 | 2 )
I WANT the name of the Enums to be produced as well such as
VALUE abcAction OBJECT-TYPE (
Syntax: [UNIVERSAL 2] INTEGER (none,0 | restart,1 | shutdown,2 )
I want none, restart and shutdown to be printed as well.
How can this be done?
I tried changing ValueConstraint.java as
public String toString() {
StringBuffer buf = new StringBuffer();
buf.append(value.getName());
buf.append(",");
buf.append(value.toString());
return buf.toString();
//return value.toString();
}
but found that the values are all NumberValue and so do not have a "name".
Pls Help me out on this.
Thanks
MK.
- [Mibble-users] How to print Enum names,
Srinivasan, Muralikrishna (Murali Krishna) <=