public class OFBasicVendorId extends OFVendorId
Modifier and Type | Field and Description |
---|---|
protected Map<Long,OFBasicVendorDataType> |
dataTypeMap
Map of the vendor data types that have been registered for this vendor
id.
|
protected int |
dataTypeSize
The size of the data type value at the beginning of all vendor data
associated with this vendor id.
|
id
Constructor and Description |
---|
OFBasicVendorId(int id,
int dataTypeSize)
Construct an OFVendorId that where the vendor data begins with a data
type value whose size is dataTypeSize.
|
Modifier and Type | Method and Description |
---|---|
int |
getDataTypeSize()
Get the size of the data type value at the beginning of the vendor data.
|
OFVendorDataType |
lookupVendorDataType(int vendorDataType)
Lookup the OFVendorDataType instance that has been registered with this
vendor id.
|
OFVendorDataType |
parseVendorDataType(org.jboss.netty.buffer.ChannelBuffer data,
int length)
This function parses enough of the data from the buffer to be able to
determine the appropriate OFVendorDataType for the data.
|
void |
registerVendorDataType(OFBasicVendorDataType vendorDataType)
Register a vendor data type with this vendor id.
|
getId, lookupVendorId, registerVendorId
protected int dataTypeSize
protected Map<Long,OFBasicVendorDataType> dataTypeMap
public OFBasicVendorId(int id, int dataTypeSize)
id
- the id of the vendor, typically the OUI of a vendor prefixed
with 0.dataTypeSize
- the size of the integral data type value at the beginning of
the vendor data. The value must be the size of an integeral
data type (i.e. either 1,2,4 or 8).public int getDataTypeSize()
public void registerVendorDataType(OFBasicVendorDataType vendorDataType)
vendorDataType
- public OFVendorDataType lookupVendorDataType(int vendorDataType)
vendorDataType
- the integer code that was parsed from thepublic OFVendorDataType parseVendorDataType(org.jboss.netty.buffer.ChannelBuffer data, int length)
parseVendorDataType
in class OFVendorId
data
- the channel buffer containing the vendor data.length
- the length to the end of the enclosing messageCopyright © 2015. All rights reserved.