"value_ok" method for BITS type
l.borelli____cpr.it
l.borelli____cpr.it
Wed Apr 9 15:18:32 CEST 2003
Another problem:
I'm trying to use a BITS type MIB object (with 3 values), as defined below,
----------------------------------------
tcTransparencyBits OBJECT-TYPE
SYNTAX BITS { pathVc (1), lineMs(2), sectionRs(3) }
MAX-ACCESS read-create
STATUS current
DESCRIPTION
"xxx"
REFERENCE
"xxx"
DEFVAL { {pathVc} }
::= { tcEntry 37 }
----------------------------------------
The generated code for "value_ok" method appears as below,
----------------------------------------
OctetStr v;
vb.get_value(v);
if (( !(v[1%8] & (1<<(7-(1%8)))))
&& (!(v[2%8] & (1<<(7-(2%8)))))
&& (!(v[3%8] & (1<<(7-(3%8)))))) return FALSE;
return TRUE;
----------------------------------------
This results in a bad check during execution. Perhaps the '%' into v[x%8] should be replaced by a '/'.
Thanks in advance
Leonardo
More information about the AGENTPP
mailing list