trap.add(new VariableBinding(SnmpConstants.snmpTrapOID, getOID(CsSnmpConstants.TRAPS_PREFIX + alertType))); if (snmpTrapInfo.getDataCenterId() != 0) { trap.add(new VariableBinding(getOID(CsSnmpConstants.DATA_CENTER_ID), new UnsignedInteger32(snmpTrapInfo.getDataCenterId()))); trap.add(new VariableBinding(getOID(CsSnmpConstants.POD_ID), new UnsignedInteger32(snmpTrapInfo.getPodId()))); trap.add(new VariableBinding(getOID(CsSnmpConstants.CLUSTER_ID), new UnsignedInteger32(snmpTrapInfo.getClusterId())));
public int compareTo(Variable o) { long diff = (value - ((UnsignedInteger32)o).getValue()); if (diff < 0) { return -1; } else if (diff > 0) { return 1; } return 0; }
/** * Creates an <code>UnsignedInteger32</code> from a <code>long</code> value. * @param value * a <code>long</code> value which must not be greater 2^32-1 and not less * zero. * @throws IllegalArgumentException * if <code>value</code> < 0 or > 2^32-1. */ public UnsignedInteger32(long value) { setValue(value); }
/** * Creates the next sub-index OID value. * @return * a sub-index value corresponding to the seed sub-index type. */ public synchronized OID getNextSubIndex() { if (seedSubIndex instanceof Integer32) { Integer32 i = (Integer32)seedSubIndex; i.setValue(i.getValue()+1); } else if (seedSubIndex instanceof UnsignedInteger32) { UnsignedInteger32 ui = (UnsignedInteger32)seedSubIndex; ui.setValue(ui.getValue()+1); } else if (seedSubIndex instanceof Counter64) { Counter64 c = (Counter64)seedSubIndex; c.setValue(c.getValue()+1); } return seedSubIndex.toSubIndex(impliedLength); } }
public OID toSubIndex(boolean impliedLength) { return new OID(new int[] { toInt() }); }
/** * Creates the next sub-index OID value. * @return * a sub-index value corresponding to the seed sub-index type. */ public synchronized OID getNextSubIndex() { if (seedSubIndex instanceof Integer32) { Integer32 i = (Integer32)seedSubIndex; i.setValue(i.getValue()+1); } else if (seedSubIndex instanceof UnsignedInteger32) { UnsignedInteger32 ui = (UnsignedInteger32)seedSubIndex; ui.setValue(ui.getValue()+1); } else if (seedSubIndex instanceof Counter64) { Counter64 c = (Counter64)seedSubIndex; c.setValue(c.getValue()+1); } return seedSubIndex.toSubIndex(impliedLength); } }
public OID toSubIndex(boolean impliedLength) { return new OID(new int[] { toInt() }); }
NlmConfigGlobalAgeOut(OID oid, MOAccess access) { super(oid, access, new UnsignedInteger32()); //--AgentGen BEGIN=nlmConfigGlobalAgeOut //--AgentGen END }
public int compareTo(Variable o) { long diff = (value - ((UnsignedInteger32)o).getValue()); if (diff < 0) { return -1; } else if (diff > 0) { return 1; } return 0; }
/** * Creates an unsigned integer from a signed int value. Negative values * will become 2^31-1 through 2^32-1. * @param signedIntValue * a signed int value. * @since 1.7 */ public UnsignedInteger32(int signedIntValue) { setValue(signedIntValue & 0xFFFFFFFFL); }
public OID toSubIndex(boolean impliedLength) { return new OID(new int[] { toInt() }); }
NlmConfigGlobalEntryLimit(OID oid, MOAccess access) { super(oid, access, new UnsignedInteger32()); //--AgentGen BEGIN=nlmConfigGlobalEntryLimit //--AgentGen END }
public int compareTo(Object o) { long diff = (value - ((UnsignedInteger32)o).getValue()); if (diff < 0) { return -1; } else if (diff > 0) { return 1; } return 0; }
/** * Creates an unsigned integer from a signed byte value. Negative values * will become 2^7-1 through 2^8-1. * @param signedByteValue * a signed byte value. * @since 1.7 */ public UnsignedInteger32(byte signedByteValue) { setValue(signedByteValue & 0xFF); }
NlmConfigGlobalAgeOut(OID oid, MOAccess access) { super(oid, access, new UnsignedInteger32()); //--AgentGen BEGIN=nlmConfigGlobalAgeOut //--AgentGen END }
public final long toLong() { return getValue(); }
/** * Creates an unsigned integer from a signed int value. Negative values * will become 2^31-1 through 2^32-1. * @param signedIntValue * a signed int value. * @since 1.7 */ public UnsignedInteger32(int signedIntValue) { setValue(signedIntValue & 0xFFFFFFFFL); }
NlmConfigGlobalEntryLimit(OID oid, MOAccess access) { super(oid, access, new UnsignedInteger32()); //--AgentGen BEGIN=nlmConfigGlobalEntryLimit //--AgentGen END }
public final int toInt() { return (int)getValue(); }
/** * Creates an <code>UnsignedInteger32</code> from a <code>long</code> value. * @param value * a <code>long</code> value which must not be greater 2^32-1 and not less * zero. * @throws IllegalArgumentException * if <code>value</code> < 0 or > 2^32-1. */ public UnsignedInteger32(long value) { setValue(value); }