net.floodlightcontroller.packet
Class LLDPOrganizationalTLV

java.lang.Object
  extended by net.floodlightcontroller.packet.LLDPTLV
      extended by net.floodlightcontroller.packet.LLDPOrganizationalTLV

public class LLDPOrganizationalTLV
extends LLDPTLV

The class representing LLDP Organizationally Specific TLV.

Author:
Sho Shimizu (sho.shimizu@gmail.com)

Field Summary
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 net.floodlightcontroller.packet.LLDPTLV
length, type, value
 
Constructor Summary
LLDPOrganizationalTLV()
           
 
Method Summary
 LLDPTLV deserialize(java.nio.ByteBuffer bb)
           
 boolean equals(java.lang.Object obj)
           
 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(java.lang.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.
 
Methods inherited from class net.floodlightcontroller.packet.LLDPTLV
getLength, getType, getValue, setLength, setType, setValue, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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
Constructor Detail

LLDPOrganizationalTLV

public LLDPOrganizationalTLV()
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.

serialize

public byte[] serialize()
Overrides:
serialize in class LLDPTLV

deserialize

public LLDPTLV deserialize(java.nio.ByteBuffer bb)
Overrides:
deserialize in class LLDPTLV

hashCode

public int hashCode()
Overrides:
hashCode in class LLDPTLV

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class LLDPTLV