com.h3c.of.lib.match

## Class FieldFactory

- java.lang.Object
- - com.h3c.of.lib.AbstractFactory
  - - com.h3c.of.lib.match.FieldFactory

-     public class FieldFactory
      extends AbstractFactory

  Provides facilities for parsing, creating and encoding `MatchField` instances.

  Used by the `MatchFactory` in its loftier goal of creating Match structures.

  Also used to create basic fields for `Set-Field actions`.

  To create basic match fields, one of the overloaded `createBasicField(pv, fieldType, ...)` methods can be invoked. The following list documents the mapping of field types to payload types:

  - `IN_PORT` - `BigPortNumber` (not maskable)
  - `IN_PHY_PORT` - `BigPortNumber` (not maskable)
  - `METADATA` - long
  - `ETH_DST` - `MacAddress`
  - `ETH_SRC` - `MacAddress`
  - `ETH_TYPE` - `EthernetType` (not maskable)
  - `VLAN_VID` - `VId` (not maskable)
  - `VLAN_PCP` - int (u3, not maskable)
  - `IP_DSCP` - int (u6, not maskable)
  - `IP_ECN` - int (u2, not maskable)
  - `IP_PROTO` - `IpProtocol` (not maskable)
  - `IPV4_SRC` - `IpAddress`
  - `IPV4_DST` - `IpAddress`
  - `TCP_SRC` - `PortNumber` (not maskable)
  - `TCP_DST` - `PortNumber` (not maskable)
  - `UDP_SRC` - `PortNumber` (not maskable)
  - `UDP_DST` - `PortNumber` (not maskable)
  - `SCTP_SRC` - `PortNumber` (not maskable)
  - `SCTP_DST` - `PortNumber` (not maskable)
  - `ICMPV4_TYPE` - `ICMPv4Type` (not maskable)
  - `ICMPV4_CODE` - int (u8, not maskable)
  - `ARP_OP` - int (u16, not maskable)
  - `ARP_SPA` - `IpAddress`
  - `ARP_TPA` - `IpAddress`
  - `ARP_SHA` - `MacAddress`
  - `ARP_THA` - `MacAddress`
  - `IPV6_SRC` - `IpAddress`
  - `IPV6_DST` - `IpAddress`
  - `IPV6_FLABEL` - int (u20)
  - `ICMPV6_TYPE` - `ICMPv6Type` (not maskable)
  - `ICMPV6_CODE` - int (u8, not maskable)
  - `IPV6_ND_TARGET` - `IpAddress` (not maskable)
  - `IPV6_ND_SLL` - `MacAddress` (not maskable)
  - `IPV6_ND_TLL` - `MacAddress` (not maskable)
  - `MPLS_LABEL` - int (u20, not maskable)
  - `MPLS_TC` - int (u3, not maskable)
  - `MPLS_BOS` - int (u1, not maskable)
  - `PBB_ISID` - int (u24)
  - `TUNNEL_ID` - long
  - `IPV6_EXTHDR` - Set<`IPv6ExtHdr`>

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, BigPortNumber port)` Creates a basic match field for a big-port-number-based match field.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, EthernetType ethType)` Creates a basic match field for an ETH_TYPE match field.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, ICMPv4Type icmpv4Type)` Creates a basic match field for an ICMPv4 Type match field.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, ICMPv6Type icmpv6Type)` Creates a basic match field for an ICMPv6 Type match field.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, int value)` Creates a basic match field for an int-payload-based match field, without a mask.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, int value, int mask)` Creates a basic match field for an int-payload-based match field, with a mask.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, IpAddress ip)` Creates a basic match field for an ip-address-based match field without a mask.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, IpAddress ip, IpAddress mask)` Creates a basic match field for an ip-address-based match field with a mask.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, IpProtocol ipp)` Creates a basic match field for an IP Protocol match field.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, long value)` Creates a basic match field for a long-payload-based match field.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, long value, long mask)` Creates a basic match field for a long-payload-based match field, with a mask.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, MacAddress mac)` Creates a basic match field for a mac-address-based match field without a mask.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, MacAddress mac, MacAddress mask)` Creates a basic match field for a mac-address-based match field with a mask.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, Map<IPv6ExtHdr,Boolean> flags)` Creates a basic match field for an IPV6_EXTHDR match field.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, PortNumber port)` Creates a basic match field for a port-number-based match field.
    `static MFieldBasic` | `createBasicField(ProtocolVersion pv, OxmBasicFieldType ft, VId vid)` Creates a basic match field for a VLAN_VID.
    `static MFieldExperimenter` | `createExperimenterField(ProtocolVersion pv, int rawFieldType, ExperimenterId eid, byte[] payload)` Creates an experimenter match field.
    `static MFieldExperimenter` | `createExperimenterField(ProtocolVersion pv, int rawFieldType, int experId, byte[] payload)` Creates an experimenter match field.
    `static List<MatchField>` | `createFieldHeaders(ProtocolVersion pv, Map<OxmBasicFieldType,Boolean> map)` Creates minimal match field headers to be used in encoding a table features OXM property.
    `static MFieldMinimal` | `createMinimalField(ProtocolVersion pv, OxmClass clazz, int rawFieldType, byte[] payload)` Creates a minimal match field for a known OXM Class.
    `static MFieldMinimal` | `createMinimalField(ProtocolVersion pv, OxmClass clazz, int rawClazz, int rawFieldType, byte[] payload)` Creates a minimal match field for an unknown OXM Class.
    `static void` | `encodeField(MatchField mf, OfPacketWriter pkt)` Encodes a single OXM TLV match field, writing it into the supplied buffer.
    `static void` | `encodeFieldExperList(List<MFieldExperimenter> fields, OfPacketWriter pkt)` Encodes a list of experimenter match fields, writing them into the supplied buffer.
    `static void` | `encodeFieldList(List<MatchField> fields, OfPacketWriter pkt)` Encodes a list of match fields, writing them into the supplied buffer.
    `static MatchField` | `parseField(OfPacketReader pkt, ProtocolVersion pv)` Parses a single OXM TLV match field from the supplied buffer.
    `static List<MatchField>` | `parseFieldHeaders(int targetRi, OfPacketReader pkt, ProtocolVersion pv)` Parses a list of match field header structures from the supplied buffer.
    `protected String` | `tag()` Returns an identifying tag for the field factory.

    - ### Methods inherited from class com.h3c.of.lib.AbstractFactory

      `mpe, mpe, mpe, mpe`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### tag

          protected String tag()

      Returns an identifying tag for the field factory.
      Specified by:
        `tag` in class `AbstractFactory`
      Returns:
        an identifying tag

    - #### parseField

          public static MatchField parseField(OfPacketReader pkt,
                              ProtocolVersion pv)
                                       throws MessageParseException

      Parses a single OXM TLV match field from the supplied buffer. Note that this method causes the reader index of the underlying `PacketBuffer` to be advanced by the length of the field.
      Parameters:
        `pkt` - the data buffer
        `pv` - the protocol version
      Returns:
        a parsed match field
      Throws:
        `MessageParseException` - if unable to parse the field

    - #### parseFieldHeaders

          public static List<MatchField> parseFieldHeaders(int targetRi,
                                           OfPacketReader pkt,
                                           ProtocolVersion pv)
                                                    throws MessageParseException

      Parses a list of match field header structures from the supplied buffer. This method is provided to support the parsing of an "OXM" table feature property. This list returned contains either `MFieldBasicHeader` instances or `MFieldExperimenter` instances.
      Parameters:
        `targetRi` - the target reader index
        `pkt` - the data buffer
        `pv` - the protocol version
      Returns:
        a list of parsed match fields (header info only)
      Throws:
        `MessageParseException` - if there is an issue parsing the structure
      See Also:
        `TableFeatureFactory`, `TableFeaturePropOxm`

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     BigPortNumber port)

      Creates a basic match field for a big-port-number-based match field.

      Supported basic field types for this method are:

      - `IN_PORT`
      - `IN_PHY_PORT`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type
        `port` - the port number
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     MacAddress mac,
                                     MacAddress mask)

      Creates a basic match field for a mac-address-based match field with a mask.

      Supported basic field types for this method are:

      - `ETH_DST`
      - `ETH_SRC`
      - `ARP_SHA`
      - `ARP_THA`
      - `IPV6_ND_SLL`
      - `IPV6_ND_TLL`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type
        `mac` - the MAC address
        `mask` - the MAC address mask (may be null)
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     MacAddress mac)

      Creates a basic match field for a mac-address-based match field without a mask.

      Supported basic field types for this method are:

      - `ETH_DST`
      - `ETH_SRC`
      - `ARP_SHA`
      - `ARP_THA`
      - `IPV6_ND_SLL`
      - `IPV6_ND_TLL`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type
        `mac` - the MAC address
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     IpAddress ip,
                                     IpAddress mask)

      Creates a basic match field for an ip-address-based match field with a mask.

      Supported basic field types for this method are:

      - `IPV4_SRC`
      - `IPV4_DST`
      - `ARP_SPA`
      - `ARP_TPA`
      - `IPV6_SRC`
      - `IPV6_DST`
      - `IPV6_ND_TARGET`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type
        `ip` - the IP address
        `mask` - the IP address mask (may be null)
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate or IP address family is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     IpAddress ip)

      Creates a basic match field for an ip-address-based match field without a mask.

      Supported basic field types for this method are:

      - `IPV4_SRC`
      - `IPV4_DST`
      - `ARP_SPA`
      - `ARP_TPA`
      - `IPV6_SRC`
      - `IPV6_DST`
      - `IPV6_ND_TARGET`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type
        `ip` - the IP address
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate or IP address family is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     PortNumber port)

      Creates a basic match field for a port-number-based match field.

      Supported basic field types for this method are:

      - `TCP_SRC`
      - `TCP_DST`
      - `UDP_SRC`
      - `UDP_DST`
      - `SCTP_SRC`
      - `SCTP_DST`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type
        `port` - the port number
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     ICMPv4Type icmpv4Type)

      Creates a basic match field for an ICMPv4 Type match field.

      Supported basic field types for this method are:

      - `ICMPV4_TYPE`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type (ICMPV4_TYPE)
        `icmpv4Type` - the ICMPv4 Type
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     ICMPv6Type icmpv6Type)

      Creates a basic match field for an ICMPv6 Type match field.

      Supported basic field types for this method are:

      - `ICMPV6_TYPE`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type (ICMPV6_TYPE)
        `icmpv6Type` - the ICMPv6 Type
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     int value,
                                     int mask)

      Creates a basic match field for an int-payload-based match field, with a mask. A mask value of 0 is interpreted as no mask.

      Supported basic field types for this method are:

      - `ARP_OP` (u16, not maskable)
      - `IPV6_FLABEL` (u20)
      - `MPLS_LABEL` (u20, not maskable)
      - `PBB_ISID` (u24)
      - `VLAN_PCP` (u3, not maskable)
      - `IP_DSCP` (u6, not maskable)
      - `IP_ECN` (u2, not maskable)
      - `ICMPV4_CODE` (u8, not maskable)
      - `ICMPV6_CODE` (u8, not maskable)
      - `MPLS_TC` (u3, not maskable)
      - `MPLS_BOS` (u1, not maskable)
      Parameters:
        `pv` - the protocol version
        `ft` - the field type
        `value` - the value
        `mask` - the value mask (or 0 for no mask)
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate or the value is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     int value)

      Creates a basic match field for an int-payload-based match field, without a mask.

      Supported basic field types for this method are:

      - `ARP_OP` (u16)
      - `IPV6_FLABEL` (u20)
      - `MPLS_LABEL` (u20)
      - `PBB_ISID` (u24)
      - `VLAN_PCP` (u3)
      - `IP_DSCP` (u6)
      - `IP_ECN` (u2)
      - `ICMPV4_CODE` (u8)
      - `ICMPV6_CODE` (u8)
      - `MPLS_TC` (u3)
      - `MPLS_BOS` (u1)
      Parameters:
        `pv` - the protocol version
        `ft` - the field type
        `value` - the value
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate or the value is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     EthernetType ethType)

      Creates a basic match field for an ETH_TYPE match field.

      Supported basic field types for this method are:

      - `ETH_TYPE`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type
        `ethType` - the Ethernet Type
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     VId vid)

      Creates a basic match field for a VLAN_VID. Note that the special values `VId.NONE` and `VId.PRESENT` can be used to specify the absence or presence (without specifying the value) of a VLAN tag.

      Supported basic field types for this method are:

      - `VLAN_VID`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type (VLAN_VID)
        `vid` - the VLAN vid to match
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any parameter is null
        `IllegalArgumentException` - if field type is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     IpProtocol ipp)

      Creates a basic match field for an IP Protocol match field.

      Supported basic field types for this method are:

      - `IP_PROTO`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type (IP_PROTO)
        `ipp` - the IP protocol
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     long value,
                                     long mask)

      Creates a basic match field for a long-payload-based match field, with a mask. A mask value of 0 is interpreted to mean no mask.

      Supported basic field types for this method are:

      - `TUNNEL_ID`
      - `METADATA`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type
        `value` - the value
        `mask` - the value mask
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate or the value is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     long value)

      Creates a basic match field for a long-payload-based match field.

      Supported basic field types for this method are:

      - `TUNNEL_ID`
      - `METADATA`
      Parameters:
        `pv` - the protocol version
        `ft` - the field type
        `value` - the value
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate or the value is not appropriate

    - #### createBasicField

          public static MFieldBasic createBasicField(ProtocolVersion pv,
                                     OxmBasicFieldType ft,
                                     Map<IPv6ExtHdr,Boolean> flags)

      Creates a basic match field for an IPV6_EXTHDR match field.

      Supported basic field types for this method are:

      - `IPV6_EXTHDR`

      The provided map specifies those extension header flags that should be matched on. If the value is `true`, the header flag must be present; if the value is `false`, the header flag must be absent. Those flags not included in the map are "don't care" values.

      Parameters:
        `pv` - the protocol version
        `ft` - the field type (IPV6_EXTHDR)
        `flags` - the map of IPv6 Extension Header flags to match
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if field type is not appropriate

    - #### createExperimenterField

          public static MFieldExperimenter createExperimenterField(ProtocolVersion pv,
                                                   int rawFieldType,
                                                   int experId,
                                                   byte[] payload)

      Creates an experimenter match field.
      Parameters:
        `pv` - the protocol version
        `rawFieldType` - the experimenter-defined field type
        `experId` - the encoded experimenter ID
        `payload` - the experimenter-defined payload
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if rawFieldType is not U7

    - #### createExperimenterField

          public static MFieldExperimenter createExperimenterField(ProtocolVersion pv,
                                                   int rawFieldType,
                                                   ExperimenterId eid,
                                                   byte[] payload)

      Creates an experimenter match field.
      Parameters:
        `pv` - the protocol version
        `rawFieldType` - the experimenter-defined field type
        `eid` - the experimenter ID
        `payload` - the experimenter-defined payload
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if rawFieldType is not U7

    - #### createMinimalField

          public static MFieldMinimal createMinimalField(ProtocolVersion pv,
                                         OxmClass clazz,
                                         int rawFieldType,
                                         byte[] payload)

      Creates a minimal match field for a known OXM Class. If the class is unknown, use `createMinimalField(ProtocolVersion, OxmClass, int, int, byte[])` instead.
      Parameters:
        `pv` - the protocol version
        `clazz` - the OXM class
        `rawFieldType` - the elsewhere-defined field type
        `payload` - the elsewhere-defined payload
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if clazz is UNKNOWN or if rawFieldType is not U7

    - #### createMinimalField

          public static MFieldMinimal createMinimalField(ProtocolVersion pv,
                                         OxmClass clazz,
                                         int rawClazz,
                                         int rawFieldType,
                                         byte[] payload)

      Creates a minimal match field for an unknown OXM Class. If the class is known, use `createMinimalField(ProtocolVersion, OxmClass, int, byte[])` instead.
      Parameters:
        `pv` - the protocol version
        `clazz` - the OXM class (UNKNOWN)
        `rawClazz` - the elsewhere-defined OXM class
        `rawFieldType` - the elsewhere-defined field type
        `payload` - the elsewhere-defined payload
      Returns:
        the match field
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null
        `IllegalArgumentException` - if clazz is not UNKNOWN or if rawClazz is not U16, or if rawFieldType is not U7.

    - #### createFieldHeaders

          public static List<MatchField> createFieldHeaders(ProtocolVersion pv,
                                            Map<OxmBasicFieldType,Boolean> map)

      Creates minimal match field headers to be used in encoding a table features OXM property. The map provided indicates whether or not the hasMask bit should be set for each field.
      Parameters:
        `pv` - the protocol version
        `map` - the map of fields to create
      Returns:
        the list of minimal fields
      Throws:
        `VersionNotSupportedException` - if the version is not supported
        `NullPointerException` - if any required parameter is null

    - #### encodeField

          public static void encodeField(MatchField mf,
                         OfPacketWriter pkt)

      Encodes a single OXM TLV match field, writing it into the supplied buffer. Note that this method causes the writer index of the underlying `PacketBuffer` to be advanced by the length of the field.
      Parameters:
        `mf` - the match field to encode
        `pkt` - the buffer into which the match field is to be written

    - #### encodeFieldList

          public static void encodeFieldList(List<MatchField> fields,
                             OfPacketWriter pkt)

      Encodes a list of match fields, writing them into the supplied buffer. Note that this method causes the writer index of the underlying `PacketBuffer` to be advanced by the length of the written fields.
      Parameters:
        `fields` - the list of fields
        `pkt` - the buffer into which the fields are to be written

    - #### encodeFieldExperList

          public static void encodeFieldExperList(List<MFieldExperimenter> fields,
                                  OfPacketWriter pkt)

      Encodes a list of experimenter match fields, writing them into the supplied buffer. Note that this method causes the writer index of the underlying `PacketBuffer` to be advanced by the length of the written fields.
      Parameters:
        `fields` - the experimenter fields
        `pkt` - the buffer into which the fields are to be written

Copyright © 2014. All Rights Reserved.