com.bigswitch.floodlight.vendor
Class OFBsnL2TableVendorData

java.lang.Object
  extended by com.bigswitch.floodlight.vendor.OFBigSwitchVendorData
      extended by com.bigswitch.floodlight.vendor.OFBsnL2TableVendorData
All Implemented Interfaces:
OFVendorData
Direct Known Subclasses:
OFBsnL2TableSetVendorData

public class OFBsnL2TableVendorData
extends OFBigSwitchVendorData


Field Summary
protected  boolean l2TableEnabled
           
protected  short l2TablePriority
           
 
Fields inherited from class com.bigswitch.floodlight.vendor.OFBigSwitchVendorData
BSN_VENDOR_ID, dataType
 
Constructor Summary
OFBsnL2TableVendorData(int dataType)
           
OFBsnL2TableVendorData(int dataType, boolean l2TableEnabled, short l2TablePriority)
           
 
Method Summary
 short getL2TablePriority()
           
 int getLength()
          Get the length of the vendor data.
 boolean isL2TableEnabled()
           
 void readFrom(java.nio.ByteBuffer data, int length)
          Read the vendor data from the ByteBuffer
 void setL2TableEnabled(boolean l2TableEnabled)
           
 void setL2TablePriority(short l2TablePriority)
           
 void writeTo(java.nio.ByteBuffer data)
          Write the vendor data to the ByteBuffer
 
Methods inherited from class com.bigswitch.floodlight.vendor.OFBigSwitchVendorData
equals, getDataType, hashCode, setDataType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

l2TableEnabled

protected boolean l2TableEnabled

l2TablePriority

protected short l2TablePriority
Constructor Detail

OFBsnL2TableVendorData

public OFBsnL2TableVendorData(int dataType)

OFBsnL2TableVendorData

public OFBsnL2TableVendorData(int dataType,
                              boolean l2TableEnabled,
                              short l2TablePriority)
Method Detail

isL2TableEnabled

public boolean isL2TableEnabled()

getL2TablePriority

public short getL2TablePriority()

setL2TableEnabled

public void setL2TableEnabled(boolean l2TableEnabled)

setL2TablePriority

public void setL2TablePriority(short l2TablePriority)

getLength

public int getLength()
Description copied from class: OFBigSwitchVendorData
Get the length of the vendor data. This implementation will normally be the superclass for another class that will override this to return the overall vendor data length. This implementation just returns the length of the part that includes the 4-byte integer data type value at the beginning of the vendor data

Specified by:
getLength in interface OFVendorData
Overrides:
getLength in class OFBigSwitchVendorData
Returns:
length of the data

readFrom

public void readFrom(java.nio.ByteBuffer data,
                     int length)
Description copied from class: OFBigSwitchVendorData
Read the vendor data from the ByteBuffer

Specified by:
readFrom in interface OFVendorData
Overrides:
readFrom in class OFBigSwitchVendorData
Parameters:
data - the channel buffer from which we're deserializing
length - the length to the end of the enclosing message

writeTo

public void writeTo(java.nio.ByteBuffer data)
Description copied from class: OFBigSwitchVendorData
Write the vendor data to the ByteBuffer

Specified by:
writeTo in interface OFVendorData
Overrides:
writeTo in class OFBigSwitchVendorData
Parameters:
data - the channel buffer to which we're serializing