|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ireasoning.protocol.snmp.SnmpUInt | +--com.ireasoning.protocol.snmp.SnmpGauge32
This class represents 32-bit Snmp Gauge32 type object. The Gauge32 type represents a non-negative integer, which may increase or decrease, but shall never exceed a maximum value. The maximum value can not be greater than 2^32-1 (4294967295 decimal). The value of a Gauge has its maximum value whenever the information being modeled is greater or equal to that maximum value; if the information being modeled subsequently decreases below the maximum value, the Gauge also decreases.
Field Summary | |
static SnmpGauge32 |
MAX_VALUE
A constant holding the maximum value a SnmpGauge32 can have |
Fields inherited from interface com.ireasoning.protocol.snmp.SnmpDataType |
BITS, BITSTRING, COUNTER32, COUNTER64, END_OF_MIB_VIEW, END_OF_MIB_VIEW_OBJECT, GAUGE32, INTEGER, IPADDRESS, NO_SUCH_INSTANCE, NO_SUCH_INSTANCE_OBJECT, NO_SUCH_OBJECT, NO_SUCH_OBJECT_OBJECT, NULL, OCTETSTRING, OID, OPAQUE, PDU, SEQUENCE, SEQUENCEOF, TIMETICKS, UNSIGNED32, VARBIND |
Fields inherited from interface com.ireasoning.protocol.Msg |
ERROR_TYPE |
Constructor Summary | |
SnmpGauge32()
Default constructor |
|
SnmpGauge32(long l)
Constructs a SnmpGauge32 object with the passed-in l. |
|
SnmpGauge32(SnmpGauge32 gauge32)
Makes a copy of passed in gauge32 object |
|
SnmpGauge32(SnmpUInt uint)
Makes a copy of passed in uint32 object |
|
SnmpGauge32(String value)
Constructs a SnmpGauge32 object with the passed-in string value. |
Method Summary | |
SnmpDataType |
copy()
Makes a copy of itself |
void |
dec()
Decrements gauge value by 1 |
void |
dec(int val)
Decrements gauge value by passed val |
int |
encode(com.ireasoning.protocol.snmp.SnmpEncoder encoder)
For internal use |
int |
getType()
Returns SnmpDataType.GAUGE32 |
String |
getTypeString()
Returns "Gauge" |
void |
inc()
Increments gauge value by 1, it remains latched at max value. |
void |
inc(long val)
Increases gauge value by passed val, it remains latched at max value. |
void |
setValue(long value)
Sets a new value |
String |
toString()
|
Methods inherited from class com.ireasoning.protocol.snmp.SnmpUInt |
equals, getValue, hashCode |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final SnmpGauge32 MAX_VALUE
Constructor Detail |
public SnmpGauge32()
public SnmpGauge32(String value)
public SnmpGauge32(long l)
public SnmpGauge32(SnmpGauge32 gauge32)
public SnmpGauge32(SnmpUInt uint)
Method Detail |
public int getType()
getType
in class SnmpUInt
com.ireasoning.protocol.snmp.SnmpDataType
public String getTypeString()
getTypeString
in class SnmpUInt
public void inc(long val)
UnsupportedOperationException
- if called for SnmpGauge32.MAX_VALUEpublic void inc()
UnsupportedOperationException
- if called for SnmpGauge32.MAX_VALUEpublic void dec()
UnsupportedOperationException
- if called for SnmpGauge32.MAX_VALUEpublic void dec(int val)
UnsupportedOperationException
- if called for SnmpGauge32.MAX_VALUEpublic void setValue(long value)
setValue
in class SnmpUInt
UnsupportedOperationException
- if called for SnmpGauge32.MAX_VALUEpublic String toString()
toString
in class SnmpUInt
public SnmpDataType copy()
SnmpDataType
copy
in class SnmpUInt
com.ireasoning.protocol.snmp.SnmpDataType
public int encode(com.ireasoning.protocol.snmp.SnmpEncoder encoder) throws SnmpEncodingException
SnmpDataType
encode
in class SnmpUInt
|
HOME | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |