How to handle a MIB table with no INDEX?

Hi Frank,
We have a MIB table as below, which has no INDEX.

cadQosServiceClassTable OBJECT-TYPE
        SYNTAX      SEQUENCE OF CadQosServiceClassEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            "This table extends the docQosServiceClassTable and adds 1 object
             which is the peak traffic rate shaped to while traffic still conforms to
             the policing parameters. "
        ::= { cadMacMib 19 }

cadQosServiceClassEntry OBJECT-TYPE
        SYNTAX      CadQosServiceClassEntry
        MAX-ACCESS  not-accessible
        STATUS      current
        DESCRIPTION
            ""
        AUGMENTS { docsQosServiceClassEntry }
        ::= { cadQosServiceClassTable 1 }

CadQosServiceClassEntry ::= SEQUENCE {
       cadQosServiceClassPeakTrafficRate        BitRate,
       cadQosServiceClassLatencyControlledFlowFlag  TruthValue
       }

cadQosServiceClassPeakTrafficRate OBJECT-TYPE
    SYNTAX          BitRate
    MAX-ACCESS      read-create
    STATUS          current
    DESCRIPTION    
        "Peak traffic rate shaped to while traffic still conforms to the policing
         parameters (Tmax and Burst). If the peak rate is set to a value greater 
         than Tmax, then the traffic will be shaped to the peak rate until the 
         traffic is non-conforming to the policing parameters (Tmax and Burst), 
         and then the traffic will be shaped to the Tmax rate. If the peak rate
         is less than the Tmax for a flow, then all traffic for that flow will 
         shaped to the Tmax rate, regardless of the Burst parameter. Setting the
         peak rate to a value of 0 will result no peak rate limiting and flows
         having virtually unlimited bandwidth until their burst size is used up."
    DEFVAL { 0 }
       ::= { cadQosServiceClassEntry 1 }

cadQosServiceClassLatencyControlledFlowFlag OBJECT-TYPE
    SYNTAX      TruthValue
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
     "This object indicated whether the flow should be should be latency-controlled.
      If this flag is not true than the legacy (bitrate-based) scheduler will be
      used."
    DEFVAL { false }
       ::= { cadQosServiceClassEntry 2 }

And we generated code from AgenPro:

private void createCadQosServiceClassEntry(MOFactory moFactory) {
        // Index definition
        cadQosServiceClassEntryIndexes = new MOTableSubIndex[] {

        };

        cadQosServiceClassEntryIndex = moFactory.createIndex(cadQosServiceClassEntryIndexes, false,
            new MOTableIndexValidator() {
                public boolean isValidIndex(OID index) {
                    boolean isValidIndex = true;
                    // --AgentGen BEGIN=cadQosServiceClassEntry::isValidIndex
                    // --AgentGen END
                    return isValidIndex;
                }
            });

        // Columns
        MOColumn[] cadQosServiceClassEntryColumns = new MOColumn[2];
        cadQosServiceClassEntryColumns[idxCadQosServiceClassPeakTrafficRate] = new MOMutableColumn<UnsignedInteger32>(
            colCadQosServiceClassPeakTrafficRate, SMIConstants.SYNTAX_GAUGE32,
            moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_CREATE), new UnsignedInteger32(0)
        // --AgentGen BEGIN=cadQosServiceClassPeakTrafficRate::auxInit
        // --AgentGen END
        );
        ((MOMutableColumn) cadQosServiceClassEntryColumns[idxCadQosServiceClassPeakTrafficRate])
            .addMOValueValidationListener(new CadQosServiceClassPeakTrafficRateValidator());
        cadQosServiceClassEntryColumns[idxCadQosServiceClassLatencyControlledFlowFlag] = new MOMutableColumn<Integer32>(
            colCadQosServiceClassLatencyControlledFlowFlag, SMIConstants.SYNTAX_INTEGER,
            moFactory.createAccess(MOAccessImpl.ACCESSIBLE_FOR_READ_CREATE), new Integer32(2)
        // --AgentGen BEGIN=cadQosServiceClassLatencyControlledFlowFlag::auxInit
        // --AgentGen END
        );
        ValueConstraint cadQosServiceClassLatencyControlledFlowFlagVC = new EnumerationConstraint(new int[] { 1, 2 });
        ((MOMutableColumn) cadQosServiceClassEntryColumns[idxCadQosServiceClassLatencyControlledFlowFlag])
            .addMOValueValidationListener(new ValueConstraintValidator(cadQosServiceClassLatencyControlledFlowFlagVC));
        ((MOMutableColumn) cadQosServiceClassEntryColumns[idxCadQosServiceClassLatencyControlledFlowFlag])
            .addMOValueValidationListener(new CadQosServiceClassLatencyControlledFlowFlagValidator());
        // Table model
        cadQosServiceClassEntryModel = moFactory.createTableModel(oidCadQosServiceClassEntry,
            cadQosServiceClassEntryIndex, cadQosServiceClassEntryColumns);
        ((MOMutableTableModel<CadQosServiceClassEntryRow>) cadQosServiceClassEntryModel)
            .setRowFactory(new CadQosServiceClassEntryRowFactory());
        cadQosServiceClassEntry = moFactory.createTable(oidCadQosServiceClassEntry, cadQosServiceClassEntryIndex,
            cadQosServiceClassEntryColumns, cadQosServiceClassEntryModel);
    }

But the agent failed to be initialized due to the null definition of cadQosServiceClassEntryIndexes.

Question is, how should we handle this scenario?
Thanks.

The table does have an INDEX! It has the same INDEX as docsQosServiceClassEntry. The only reason why the corresponding constant generated by AgenPro is empty I could image, is a missing MIB module import or a SMI syntax error in the docsQosServiceClassEntry definition.

In with cases, AgenPro will not generate any code in both cases, if it is run in strict mode - which I strongly recommend to everyone.
If AgenPro’s MIB compiler is run in lenient mode, such errors are ignored, but as you can see necessary information from the MIB cannot be extracted, which can lead to problems with the generated code.

Get it. Have fixed the issue.
Thanks Frank.