[AGENT++] SNMP++v3.2.10: SmiUINT32 get_syntax( ), how do I get the syntax?

Jochen Katz katz at agentpp.com
Mon Mar 1 20:59:21 CET 2004


Hello,

> 	Hello, I believe this is a simple question, I would like to know
> what type of data a vb contain, the SmiUINT32 get_syntax( ) is the
> solution but it keeps returning a number instead the type for example
> for octet string it returns 4 instead of sNMP_SYNTAX_OCTETS string,
> since I’m using Qt I use the following line to accomplish this:
> QTextEdit->append(QString(“%1”).arg(vb.get_syntax()));
> Like I said I get a number instead of the type, in the vb.h says that I
> will get the exception status if it is set otherwise I will get the
> syntax, I’m not sure how to accomplish this, but I’m getting the
> exception status and I don’t know what to do with it. Thanks a lot
> again.

you will have to write a function that has the same switch-case 
construct like Vb::set_syntax(SmiUINT32 syntax). It just returns the 
desired string for each syntax value and for each exception value.

Regards,
   Jochen



More information about the AGENTPP mailing list