Changes between Version 8 and Version 9 of Internal/OpenFlow/VendorTutorial


Ignore:
Timestamp:
Jan 2, 2013, 10:43:36 PM (12 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/VendorTutorial

    v8 v9  
    3333
    3434=== 2.1 The Vendor Message Header ===
    35 What we're referring to as the vendor message header is typically a set of variables defined in the class that implements `OFVendorData`. The class in which these variables are declared typically becomes the base class for further message types.
     35What we refer to as the "vendor message header" is typically a set of variables defined in the class that implements `OFVendorData`. The class in which these variables are declared typically becomes the base class for further message types.
    3636
    3737For example, the vendor ID and data type are part of `OFNiciraVendorData`, the base class for all Nicira vendor messages:
     
    4747...
    4848}}}
    49 This class is extended to implement the Request and Reply message types (`OFRoleRequestVendorData` and `OFRoleReplyVendorData`, respectively). Note how at (1) the value of dataType is not set here - this value is set through the base class's constructor, which takes a integer value for the !dataType:
     49`OFNiciraVendorData` is extended to implement the Request and Reply message types (`OFRoleRequestVendorData` and `OFRoleReplyVendorData`, respectively). Note how at (1) the value of dataType is not set within this class - this value is set through the base class's constructor, which takes an integer value for the dataType:
    5050{{{
    5151   /**
     
    5757    }
    5858}}}
    59 The values passed to this constructor are declared in each subclass that represents a message type, as we can see here in `OFRoleReplyVendorData`:
     59The values passed to this constructor are found in each subclass that represents a message type. We can see this in `OFRoleReplyVendorData`:
    6060{{{
    6161    /**
     
    7373If we trace back, we learn that super() above refers to the constructor of `OFRoleVendorData`, a subclass of `OFNiciraVendorData`. `OFRoleVendorData` takes the value passed to it by `OFRoleReplyVendorData` and passes it to the constructor of its parent class.
    7474
    75 This organization isn't a requirement, but makes code reuse easier. The "nesting" of message classes can be thought of as implementing the message structure in layers - Each subclass implements message components that are encapsulated by components implemented in its parent class.   
     75This organization isn't a requirement, but makes code reuse easier. The "nesting" of message classes can be thought of as implementing the message structure in layers - Each subclass implements either message components that are encapsulated by components in its parent class, or methods that assign values to variables declared in its super-classes, like in the example above.   
    7676
    7777The Vendor ID and data type are the only requirements in terms of vendor header content. Given that the methods required by `OFVendorData` are provided, along with those required for message registration, the message implementation may be structured as needed. The usual additions are various message fields and their getters and setters. 
     
    154154    }
    155155}}}
    156 super() points to `OFNiciraVendorData`, which takes care of reading and writing the integral dataType field:
     156super in this case is `OFNiciraVendorData`, which takes care of reading and writing the integral dataType field:
    157157{{{
    158158    @Override
     
    181181    }
    182182}}}
     183
     184== 3. The full Vendor Message ==
     185This section describes how to construct the full vendor type message once we have a structured vendor data object, or alternatively, parse a vendor type message containing a known type of vendor data. 
     186
     187=== 3.1 Message construction ===
     188The vendor data is just the payload of an !OpenFlow vendor type message. The !OpenFlow header must be added to the vendor data before it can be sent out on the channel.   
     189
     190=== 3.2 Reading message contents ===