Package org.onlab.packet
Class LLDPTLV
- java.lang.Object
-
- org.onlab.packet.LLDPTLV
-
- Direct Known Subclasses:
LLDPOrganizationalTLV
public class LLDPTLV extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected shortlengthstatic intMAX_LENGTHprotected bytetypeprotected byte[]value
-
Constructor Summary
Constructors Constructor Description LLDPTLV()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LLDPTLVdeserialize(java.nio.ByteBuffer bb)booleanequals(java.lang.Object obj)shortgetLength()bytegetType()byte[]getValue()inthashCode()byte[]serialize()LLDPTLVsetLength(short length)LLDPTLVsetType(byte type)LLDPTLVsetValue(byte[] value)java.lang.StringtoString()
-
-
-
Field Detail
-
MAX_LENGTH
public static final int MAX_LENGTH
- See Also:
- Constant Field Values
-
type
protected byte type
-
length
protected short length
-
value
protected byte[] value
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getType
public byte getType()
- Returns:
- the type
-
setType
public LLDPTLV setType(byte type)
- Parameters:
type- the type to set- Returns:
- this
-
getLength
public short getLength()
- Returns:
- the length
-
setLength
public LLDPTLV setLength(short length)
- Parameters:
length- the length to set- Returns:
- this
-
getValue
public byte[] getValue()
- Returns:
- the value
-
setValue
public LLDPTLV setValue(byte[] value)
- Parameters:
value- the value to set- Returns:
- this
-
serialize
public byte[] serialize()
-
deserialize
public LLDPTLV deserialize(java.nio.ByteBuffer bb) throws DeserializationException
- Throws:
DeserializationException
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-