[AGENT++] boolean representation

Jonathan Black jblack at ridgewaysystems.com
Thu Oct 16 11:32:41 CEST 2003


The OctetString route would work but is unnecessarily awkward for your
agent.

Define an enumerated type. For example:
BooleanType ::= INTEGER { false(0), true(1) }

With regards to your "best practices" question, I always recommend
"Understanding SNMP MIBs" - Perkins & McGinnis, Prentice Hall, ISBN
0-13-437708-7

Regards
Jon

-----Original Message-----
From: Joel Realubit [mailto:joel at voxsant.com] 
Sent: 16 October 2003 09:47
To: agentpp at agentpp.org
Subject: [AGENT++] boolean representation


hello:

I'm writing an agent for manipulating a server's configuration files, 
and some of the parameters there take on 'TRUE' / 'FALSE' values. Given 
that, as far as i know (I could be wrong), SNMP doesnt support any kind 
of boolean data type, what is the best way to represent boolean values? 
For example, should I have a MibLeaf object that takes on OctetStr 
values and just do some kind of validation code so that it accepts only 
"TRUE"/"FALSE" values? are there any prescribed "best practices" rules 
about this?

thanks in advance,
Joel Realubit


_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://agentpp.org/mailman/listinfo/agentpp





More information about the AGENTPP mailing list