Package org.onlab.packet
Class LLDPTLV
- java.lang.Object
-
- org.onlab.packet.LLDPTLV
-
- Direct Known Subclasses:
LLDPOrganizationalTLV
public class LLDPTLV extends 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(ByteBuffer bb)booleanequals(Object obj)shortgetLength()bytegetType()byte[]getValue()inthashCode()byte[]serialize()LLDPTLVsetLength(short length)LLDPTLVsetType(byte type)LLDPTLVsetValue(byte[] value)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
-
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(ByteBuffer bb) throws DeserializationException
- Throws:
DeserializationException
-
-