com.h3c.of.lib.msg

## Enum FlowModFlag

- java.lang.Object
- - java.lang.Enum<FlowModFlag>
  - - com.h3c.of.lib.msg.FlowModFlag

- All Implemented Interfaces:
    OfpBitmapEnum, OfpEnum, Serializable, Comparable<FlowModFlag>

      public enum FlowModFlag
      extends Enum<FlowModFlag>
      implements OfpBitmapEnum

  Designates flow mod flags; Since 1.0.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `CHECK_OVERLAP` Check for overlapping entries first; Since 1.0.
    `EMERG` Remark this is for emergency; Since 1.0; Removed at 1.1.
    `NO_BYTE_COUNTS` Don't keep track of byte count; Since 1.3.
    `NO_PACKET_COUNTS` Don't keep track of packet count; Since 1.3.
    `RESET_COUNTS` Reset flow packet and byte counts; Since 1.2.
    `SEND_FLOW_REM` Send flow removed message when flow expires or is deleted; Since 1.0.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Set<FlowModFlag>` | `decodeBitmap(int bitmap, ProtocolVersion pv)` Decodes a flow mod flag bitmap to generate the corresponding set of flags.
    `static int` | `encodeBitmap(Set<FlowModFlag> flags, ProtocolVersion pv)` Encodes a set of flow mod flags as a bitmap.
    `int` | `getBit(ProtocolVersion pv)` Returns the bit value for the constant, under the given protocol version.
    `String` | `toDisplayString()` Returns a string representation of the constant, suitable for presentation in a display.
    `String` | `toString()`
    `static FlowModFlag` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static FlowModFlag[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### SEND_FLOW_REM

          public static final FlowModFlag SEND_FLOW_REM

      Send flow removed message when flow expires or is deleted; Since 1.0.

    - #### CHECK_OVERLAP

          public static final FlowModFlag CHECK_OVERLAP

      Check for overlapping entries first; Since 1.0.

    - #### EMERG

          public static final FlowModFlag EMERG

      Remark this is for emergency; Since 1.0; Removed at 1.1.

    - #### RESET_COUNTS

          public static final FlowModFlag RESET_COUNTS

      Reset flow packet and byte counts; Since 1.2.

    - #### NO_PACKET_COUNTS

          public static final FlowModFlag NO_PACKET_COUNTS

      Don't keep track of packet count; Since 1.3.

    - #### NO_BYTE_COUNTS

          public static final FlowModFlag NO_BYTE_COUNTS

      Don't keep track of byte count; Since 1.3.

  - ### Method Detail

    - #### values

          public static FlowModFlag[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (FlowModFlag c : FlowModFlag.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static FlowModFlag valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getBit

          public int getBit(ProtocolVersion pv)

      Description copied from interface: `OfpBitmapEnum`
      Returns the bit value for the constant, under the given protocol version.
      Specified by:
        `getBit` in interface `OfpBitmapEnum`
      Parameters:
        `pv` - the protocol version
      Returns:
        the bit value for the constant

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Enum<FlowModFlag>`

    - #### toDisplayString

          public String toDisplayString()

      Description copied from interface: `OfpBitmapEnum`
      Returns a string representation of the constant, suitable for presentation in a display.
      Specified by:
        `toDisplayString` in interface `OfpBitmapEnum`
      Returns:
        a display string for the constant

    - #### decodeBitmap

          public static Set<FlowModFlag> decodeBitmap(int bitmap,
                                      ProtocolVersion pv)

      Decodes a flow mod flag bitmap to generate the corresponding set of flags.
      Parameters:
        `bitmap` - the bitmapped flags
        `pv` - the protocol version
      Returns:
        the set of corresponding flags
      Throws:
        `VersionMismatchException` - if unexpected flag bits found for the specified version

    - #### encodeBitmap

          public static int encodeBitmap(Set<FlowModFlag> flags,
                         ProtocolVersion pv)

      Encodes a set of flow mod flags as a bitmap. The `flags` parameter may be null, in which case a bitmap of 0 (zero) is returned.
      Parameters:
        `flags` - the flags to encode
        `pv` - the protocol version
      Returns:
        the flags encoded as a bitmap
      Throws:
        `NullPointerException` - if protocol version is null
        `VersionMismatchException` - if a flag is present that is not supported in the given protocol version

Copyright © 2014. All Rights Reserved.