Package org.onlab.packet
Class LLDPOrganizationalTLV
- java.lang.Object
-
- org.onlab.packet.LLDPTLV
-
- org.onlab.packet.LLDPOrganizationalTLV
-
public class LLDPOrganizationalTLV extends LLDPTLV
The class representing LLDP Organizationally Specific TLV.
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_INFOSTRING_LENGTH
static byte
ORGANIZATIONAL_TLV_TYPE
protected byte[]
oui
static int
OUI_LENGTH
protected byte
subType
static int
SUBTYPE_LENGTH
-
Fields inherited from class org.onlab.packet.LLDPTLV
length, MAX_LENGTH, type, value
-
-
Constructor Summary
Constructors Constructor Description LLDPOrganizationalTLV()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LLDPTLV
deserialize(ByteBuffer bb)
boolean
equals(Object o)
byte[]
getInfoString()
Returns the value of information string.byte[]
getOUI()
Returns the value of the OUI.byte
getSubType()
Returns the value of the sub type.int
hashCode()
byte[]
serialize()
LLDPOrganizationalTLV
setInfoString(byte[] infoString)
Set the value of information string.LLDPOrganizationalTLV
setInfoString(String infoString)
Set the value of information string.LLDPOrganizationalTLV
setOUI(byte[] oui)
Set the value of OUI.LLDPOrganizationalTLV
setSubType(byte subType)
Set the value of sub type.
-
-
-
Field Detail
-
OUI_LENGTH
public static final int OUI_LENGTH
- See Also:
- Constant Field Values
-
SUBTYPE_LENGTH
public static final int SUBTYPE_LENGTH
- See Also:
- Constant Field Values
-
ORGANIZATIONAL_TLV_TYPE
public static final byte ORGANIZATIONAL_TLV_TYPE
- See Also:
- Constant Field Values
-
MAX_INFOSTRING_LENGTH
public static final int MAX_INFOSTRING_LENGTH
- See Also:
- Constant Field Values
-
oui
protected byte[] oui
-
subType
protected byte subType
-
-
Method Detail
-
setOUI
public LLDPOrganizationalTLV setOUI(byte[] oui)
Set the value of OUI.- Parameters:
oui
- The value of OUI to be set.- Returns:
- This LLDP Organizationally Specific TLV.
-
getOUI
public byte[] getOUI()
Returns the value of the OUI.- Returns:
- The value of the OUI .
-
setSubType
public LLDPOrganizationalTLV setSubType(byte subType)
Set the value of sub type.- Parameters:
subType
- The value of sub type to be set.- Returns:
- This LLDP Organizationally Specific TLV.
-
getSubType
public byte getSubType()
Returns the value of the sub type.- Returns:
- The value of the sub type.
-
setInfoString
public LLDPOrganizationalTLV setInfoString(byte[] infoString)
Set the value of information string.- Parameters:
infoString
- the byte array of the value of information string.- Returns:
- This LLDP Organizationally Specific TLV.
-
setInfoString
public LLDPOrganizationalTLV setInfoString(String infoString)
Set the value of information string. The String value is automatically converted into byte array with UTF-8 encoding.- Parameters:
infoString
- the String value of information string.- Returns:
- This LLDP Organizationally Specific TLV.
-
getInfoString
public byte[] getInfoString()
Returns the value of information string.- Returns:
- the value of information string.
-
deserialize
public LLDPTLV deserialize(ByteBuffer bb) throws DeserializationException
- Overrides:
deserialize
in classLLDPTLV
- Throws:
DeserializationException
-
-