AW: Re: [SNMP4J] cannot print out date properly

Sam Chen csam2ca at yahoo.com
Sat Oct 1 17:28:15 CEST 2005


Hi Frank,
   I don't understand what you meant.  Can you give me
some examples?  Or can anyone help me.  Thanks

Sam

--- Frank Fock <fock at agentpp.com> wrote:

> Hi Sam,
> 
> Of course, you can implement your own code. The
> DISPLAY-HINT TC is well defined in the RFCs, but
> you will always know the corresponding MIB
> definition
> for a particular object!
> 
> Best regards,
> Frank
> 
> Sam Chen wrote:
> 
> > Hi Frank,
> >    Why some of the DisplayString shows correctly
> like
> > Device Description, and some don't, like Interface
> > Description.  Is there any way to format these
> values
> > without using JASMI?  I am only encountering two
> types
> > of values not showing proper formatted string, and
> I
> > don't want to use JASMI just to format these two
> > values correctly.  Any thoughts Frank?
> > 
> > Sam
> > 
> > --- fock at agentpp.com wrote:
> > 
> > 
> >>Hi Ron,
> >>
> >>The formatting and displaying of SNMP values is
> not
> >>part of the protocol API. Such functions should be
> >>placed one level higher. You can use JASMI 
> >>(http://www.mibdesigner.com) or other
> >>Java SMI APIs to implement such functionality.
> >>
> >>Best regards,
> >>Frank
> >>
> >>
> >>>
> >>>I would suspect the MIB object in question
> >>
> >>(1.3.6.1.2.1.25.6.3.1.5) is
> >>
> >>>defined with a TimeAndDate display hint, which
> has
> >>
> >>a base syntax of OCTET
> >>
> >>>STRING.
> >>>
> >>>It would be the responsibility of the manager
> >>
> >>application, using SNMP4J, to
> >>
> >>>format the OCTET STRING appropriately.
> >>>
> >>>Regards,
> >>>Ron
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>Matthieu Casanova
> >>
> >><chocolat.mou at gmail.com>@agentpp.org on
> >>09/02/2005
> >>
> >>>01:58:22 AM
> >>>
> >>>Sent by:    snmp4j-bounces at agentpp.org
> >>>
> >>>
> >>>To:    Sam Chen <csam2ca at yahoo.com>
> >>>cc:    snmp4j at agentpp.org
> >>>Subject:    Re: [SNMP4J] cannot print out date
> >>
> >>properly
> >>
> >>>
> >>>2005/9/2, Sam Chen <csam2ca at yahoo.com>:
> >>>>
> >>>> Hi,
> >>>> When I tried to get the software table and
> >>
> >>tried to
> >>
> >>>> print out the result for
> >>>> installed_date(1.3.6.1.2.1.25.6.3.1.5) by
> >>
> >>using the
> >>
> >>>> following code:
> >>>>
> >>>> ////////////////////////////////////////////
> >>>> VariableBinding[] variables =
> >>
> >>tableEvent.getColumns();
> >>
> >>>> String value =
> >>
> >>variables[3].getVariable().toString();
> >>
> >>>> system.out.println(value);
> >>>> /////////////////////////////////
> >>>> and it prints out the value like
> >>>> 07:d5:07:15:17:08:20:00
> >>>>
> >>>> I was expecting values like a date format of
> >>
> >>string.
> >>
> >>>> How can I convert that to a string that is
> in
> >>
> >>the date
> >>
> >>>> format?
> >>>
> >>>
> >>>Are you sure that it is the good variable index ?
> >>>Because this looks like a MAC address isn't it ?
> >>>
> >>>Matthieu
> >>>_______________________________________________
> >>>SNMP4J mailing list
> >>>SNMP4J at agentpp.org
> >>><a target="_blank" 
> >>
>
>>href="http://lists.agentpp.org/mailman/listinfo/snmp4j">http://lists.agentpp.or
> >>
> >>>g/mailman/listinfo/snmp4j</a>
> >>>
> >>>
> >>>
> >>>
> >>>_______________________________________________
> >>>SNMP4J mailing list
> >>>SNMP4J at agentpp.org
> >>><a target="_blank" 
> >>
>
>>href="http://lists.agentpp.org/mailman/listinfo/snmp4j">http://lists.agentpp.or
> >>
> >>>g/mailman/listinfo/snmp4j</a>
> >>
> >>_______________________________________________
> >>SNMP4J mailing list
> >>SNMP4J at agentpp.org
> >>http://lists.agentpp.org/mailman/listinfo/snmp4j
> >>
> > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> > http://mail.yahoo.com 
> > _______________________________________________
> > SNMP4J mailing list
> > SNMP4J at agentpp.org
> > http://lists.agentpp.org/mailman/listinfo/snmp4j
> 
> 
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



More information about the SNMP4J mailing list