[SNMP4J] String Index of SNMP Table.

Frank Fock fock at agentpp.com
Fri Oct 20 08:39:04 CEST 2006


Hi Guang,

The Variable.fromSubIndex(..) is what you are looking for:
http://www.snmp4j.org/doc/org/snmp4j/smi/OctetString.html#fromSubIndex(org.snmp4j.smi.OID, 
boolean)

More comfortable is MOTableIndex.getIndexValues(OID index):
http://www.snmp4j.org/agent/doc/org/snmp4j/agent/mo/MOTableIndex.html#getIndexValues(org.snmp4j.smi.OID)

Hope this helps.

Best regards,
Frank

Guang Yang wrote:
> Dears,
> 
>  
> 
> I need your great help. It there anyone trying to use the OctetString or
> DisplayString as index in SNMP4J Agent?
> 
>  
> 
> As we all know the String index is decoded to x.x.x.x format as well in
> SNMP, however, it seems a bit difficult for me to un-decode the index
> back to a read-able string, it seems I am missing to find this kind of
> API. In principle I hope the class CellInfo could make this work. 
> 
>  
> 
> Is there anybody could give me a hint on how to convert the
> DisplayString based index back into java.lang.String? I'd like to write
> this kind of API for my implementation. Meanwhile, if there already
> exists this kind of implementation in package SNMP4J, I will be very
> appreciated if anybody could tell me. :-)
> 
>  
> 
> Thanks and best regards,
> 
> Grant.
> 
>  
> 
> Grant Yang)
> 
> ----------------------------------------
> BEA Telecommunication Technique Center
> Software Engineer
> ----------------------------------------
> 
>  
> 
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list