Active Virtual Network Management Prediction (AVNMP) Classes

snmp
Class AsnObjectId

java.lang.Object
  |
  +--snmp.AsnObject
        |
        +--snmp.AsnObjectId
All Implemented Interfaces:
java.io.Serializable

public class AsnObjectId
extends AsnObject
implements java.io.Serializable

unsigned 32-bit integers encoded in the following format:

 MSB..LSB
 76543210
 xyyyyyyy
 .\     /
 . \   /
 .  \ /
 .   +-------- OID bits
 +------------ 0 if this is the last byte, 1 if additional bytes follow

 Output sid in the form: abcdefgh.ijklmnop.qrstuvwx.yzABCDEF

 if (abcd != 0) 
 {
   output 1.000abcd 1.efghijk 1.lmnopqr 1.stuvwxy 0.zABCDEF
 } else if (efghijk != 0) 
 {
   output 1.efghijk 1.lmnopqr 1.stuvwxy 0.zABCDEF
 } else if (lmnopqr != 0) 
 {
   output 1.lmnopqr 1.stuvwxy 0.zABCDEF
 } else if (stuvwxy != 0) 
 {
  output 1.stuvwxy 0.zABCDEF
 } else 
 {
   output 0.zABCDEF
 }
 
ASN.1 ObjectID class

Version:
$Revision: 1.1.1.1 $ $State: Exp $
Author:
Steve Bush
See Also:
Serialized Form

Fields inherited from class snmp.AsnObject
CONS_SEQ, GET_REQ_MSG, GET_RSP_MSG, GETNEXT_REQ_MSG, pdu_type, SET_REQ_MSG, SNMP_ERR_BADVALUE, SNMP_ERR_GENERR, SNMP_ERR_NOERROR, SNMP_ERR_NOSUCHNAME, SNMP_ERR_READONLY, SNMP_ERR_TOOBIG, SNMP_VERSION_1, TRP_REQ_MSG
 
Constructor Summary
AsnObjectId()
          Constructor which does nothing.
AsnObjectId(java.io.InputStream in)
          Decode incomming object id.
AsnObjectId(java.lang.String s)
          Convert a string representation of an Object Id to an Obect Id.
 
Method Summary
 boolean isEqual(AsnObjectId that)
          Check if another object Id is lexagraphically equal to this one.
 boolean isLargerThan(AsnObjectId that)
          Check if another object Id is lexagraphically larger than this one.
 boolean same(AsnObjectId that)
          Check if another object Id is the same as this one.
 int size()
          Get total size of object ID
 java.lang.String toString()
          Printed representation of the object id.
 void write(java.io.OutputStream out)
          Output data onto the output stream.
 
Methods inherited from class snmp.AsnObject
add, AsnBuildHeader, AsnMakeMe, AsnReadHeader, findPdu, LengthBytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AsnObjectId

public AsnObjectId()
Constructor which does nothing.

AsnObjectId

public AsnObjectId(java.io.InputStream in)
            throws java.io.IOException
Decode incomming object id.
Parameters:
in - Input stream.

AsnObjectId

public AsnObjectId(java.lang.String s)
Convert a string representation of an Object Id to an Obect Id.
Parameters:
s - String to convert to Object Id.
Method Detail

same

public boolean same(AsnObjectId that)
Check if another object Id is the same as this one.
Parameters:
that - Object Id to check
Returns:
true if Object Ids are the same.

isLargerThan

public boolean isLargerThan(AsnObjectId that)
Check if another object Id is lexagraphically larger than this one.
Parameters:
that - Object Id to check
Returns:
True if this Oid is larger than the parameter Oid.

isEqual

public boolean isEqual(AsnObjectId that)
Check if another object Id is lexagraphically equal to this one.
Parameters:
that - Object Id to check
Returns:
True if this Oid is equal to the parameter Oid.

toString

public java.lang.String toString()
Printed representation of the object id.
Overrides:
toString in class java.lang.Object

size

public int size()
Get total size of object ID
Overrides:
size in class AsnObject
Returns:
Object Id size.

write

public void write(java.io.OutputStream out)
           throws java.io.IOException
Output data onto the output stream.
Overrides:
write in class AsnObject
Parameters:
out - Output stream.

Active Virtual Network Management Prediction (AVNMP) Classes