[SNMP4J] Problem with AgenPro 2.7

Tzahi Bergman tzahi at alcarmel.com
Mon Feb 16 13:48:34 CET 2009


Hello,
I've created snmp4j agent using Agenpro and snmp4j.
The problem is that the agenpro generated a field that has two
validators and each validator conflict with the other.
one validator check for length to be 4.
The other validator check for value that is enumerated(0-23).
I think that this is a bug of the AgenPro.
In any case which of the validators is the right one?


Here is a segment code that the AgenPro generated:

wmanIf2BsOfdmaUplinkChannelEntryColumns[idxWmanIf2BsOfdmaTxPowerReport]=new
MOMutableCo(colWmanIf2BsOfdmaTxPowerReport, SMIConstants.SYNTAX_BITS,
moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_WRITE),
null);
ValueConstraint wmanIf2BsOfdmaTxPowerReportVC = new
EnumerationConstraint(                          new int[] { 0, 1, 2, 3,
4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14,                                         15, 16, 17, 18,
19, 20, 21, 22, 23 });
((MOMutableColumn)wmanIf2BsOfdmaUplinkChannelEntryColumns[idxWmanIf2BsOfdmaTxPowerReport]).addMOValueValidationListener(new ValueConstraintValidator(                                           wmanIf2BsOfdmaTxPowerReportVC));
((MOMutableColumn)wmanIf2BsOfdmaUplinkChannelEntryColumns[idxWmanIf2BsOfdmaTxPowerReport]).addMOValueValidationListener(new WmanIf2BsOfdmaTxPowerReportValidator());


Here is the segment from the mib:


WmanIf2TxPowerReport ::= TEXTUAL-CONVENTION
        STATUS      current
        DESCRIPTION     
            "Bits 0-3: Tx_Power_Report_Threshold, It is unsigned integer
                       and shall be read in dB scale.
             Bits 4-7: It is unsigned integer whose value is d. Its
                       value 'd' shall be interpreted as
                       Tx_Power_Report_Interval = 2 ^ d.
             Bits 8-11: ap_avg in multiples of 1/16 (range [1/16,16/16])
             Bits 12-15: Tx_Power_Report_Threshold, It is unsigned
                         integer and shall be read in dB scale. It shall
                         be used when CQICH is allocated to the SS.
             Bits 16-19: It is unsigned integer whose value is d. Its
                         value 'd' shall be interpreted as
                         Tx_Power_Report_Interval = 2 ^ d frames. It
                         shall be used when CQICH is allocated to the
SS.
             Bits 20-23: ap_avg in multiples of 1/16 (range
[1/16,16/16])                         , It shall be used when CQICH is
allocated to
                         the SS."
        REFERENCE
            "Table 539"
        SYNTAX      BITS {tprThreshold0(0),
                          tprThreshold1(1),
                          tprThreshold2(2),
                          tprThreshold3(3),
                          tprInterval0(4),
                          tprInterval1(5),
                          tprInterval2(6),
                          tprInterval3(7),
                          tprApAvg0(8),
                          tprApAvg1(9),
                          tprApAvg2(10),
                          tprApAvg3(11),
                          cqichTprThreshold0(12),
                          cqichTprThreshold1(13),
                          cqichTprThreshold2(14),
                          cqichTprThreshold3(15),
                          cqichTprInterval0(16),
                          cqichTprInterval1(17),
                          cqichTprInterval2(18),
                          cqichTprInterval3(19),
                          cqichTprApAvg0(20),
                          cqichTprApAvg1(21),
                          cqichTprApAvg2(22),
                          cqichTprApAvg3(23)}


wmanIf2BsOfdmaTxPowerReport OBJECT-TYPE
        SYNTAX      WmanIf2TxPowerReport
        MAX-ACCESS  read-write
        STATUS      current
        DESCRIPTION
            "Tx Power Report."   
        ::= { wmanIf2BsOfdmaUplinkChannelEntry 41 }


Thanks,
Tzahi





More information about the SNMP4J mailing list