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 intMAX_INFOSTRING_LENGTHstatic byteORGANIZATIONAL_TLV_TYPEprotected byte[]ouistatic intOUI_LENGTHprotected bytesubTypestatic intSUBTYPE_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 LLDPTLVdeserialize(java.nio.ByteBuffer bb)booleanequals(java.lang.Object o)byte[]getInfoString()Returns the value of information string.byte[]getOUI()Returns the value of the OUI.bytegetSubType()Returns the value of the sub type.inthashCode()byte[]serialize()LLDPOrganizationalTLVsetInfoString(byte[] infoString)Set the value of information string.LLDPOrganizationalTLVsetInfoString(java.lang.String infoString)Set the value of information string.LLDPOrganizationalTLVsetOUI(byte[] oui)Set the value of OUI.LLDPOrganizationalTLVsetSubType(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(java.lang.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(java.nio.ByteBuffer bb) throws DeserializationException
- Overrides:
deserializein classLLDPTLV- Throws:
DeserializationException
-
-