Using SNMP4J, I want to set the time in a switch using the switch vendor's proprietary OID for the current time. Performing a MIB walk on the switch (as well as sniffing the SNMP traffic while setting the time with the switch's web interface) revealed the type of the parameter to be timeticks-value(3). I thought this meant i should use the TimeTicks variable type in SNMP4J. My problem is I simply cannot assign a TimeTicks object a value once created.
One of the TimeTicks constructors takes in a long argument; this constructor is not documented(!) and throws an exception because the argument is not an UnsignedInteger32 type. There is also a fromMilliseconds(long) method, which does the exact same thing: an IllegalArgumentException is thrown because the argument is not an UnsignedInteger32 type.
My question is, is it possible to set a TimeTicks value with SNMP4J?