[SNMP4J] How to create a DateAndTime Variable?
lemar at canada.com
lemar at canada.com
Thu Aug 19 22:44:12 CEST 2004
Hi Frank,
I think that that will work fine.
Thank you for the quick response.
-Ian
On Tue, 17 Aug 2004 22:28:32 +0200, Frank Fock wrote:
>
> Ian,
>
> If you have already the bytes then you can
> create a byte array and assign the values
> for each byte. Then you can use the
> OctetString(byte[]) to create an octet string
> from it (which is a Variable).
>
> If you have the hex string as shown below,
> then you can use
>
> Variable v =
>
>
OctetString.fromHexString("07:D4:08:11:0F:30:00:00:2D:05:00",':');
>
> Does this answer your question?
>
> Best regards,
> Frank
>
>
> lemar at canada.com wrote:
>
> >All,
> >
> >I'm looking to create a Variable which follows the
> >"DateAndTime" format from SNMPv2-TC.mib .
> >
> >If today's date is Tuesday August 17, 2004 at
15:48:00
> >EDT, how do I create the OctetString?
> >
> >I've figured out that today's date would be
represented
> >as:
> >
> >07:D4:08:11:0F:30:00:00:2D:05:00
> >
> >Now how do I create a Variable so that I can send
this
> >field? If possible, I think that I'd like to use the
> >createOctetString function.
> >
> >thanks in advance,
> >
> >-Ian
> >_______________________________________________
> >SNMP4J mailing list
> >SNMP4J at agentpp.org
>
>http://p15141779.pureserver.info/mailman/listinfo/snmp4j
> >
> >
> >
More information about the SNMP4J
mailing list