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 short
length
static int
MAX_LENGTH
protected byte
type
protected byte[]
value
-
Constructor Summary
Constructors Constructor Description LLDPTLV()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LLDPTLV
deserialize(ByteBuffer bb)
boolean
equals(Object obj)
short
getLength()
byte
getType()
byte[]
getValue()
int
hashCode()
byte[]
serialize()
LLDPTLV
setLength(short length)
LLDPTLV
setType(byte type)
LLDPTLV
setValue(byte[] value)
String
toString()
-
-
-
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
-
-