com.h3c.of.lib.mp

## Class MBodyMeterStats

- java.lang.Object
- - com.h3c.of.lib.OpenflowStructure
  - - com.h3c.of.lib.mp.MBodyMeterStats

- All Implemented Interfaces:
    MultipartBody, Structure
  Direct Known Subclasses:
    MBodyMutableMeterStats

      public class MBodyMeterStats
      extends OpenflowStructure
      implements MultipartBody

  Represents a meter stats element; part of a reply to a meter stats request multipart message; Since 1.3.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `MBodyMeterStats.Array` Represents an array of meter stats elements.
    `static class` | `MBodyMeterStats.MeterBandStats` Represents statistics associated with a given meter band.
    `static class` | `MBodyMeterStats.MutableArray` A mutable array of meter stats elements.

  - ### Field Summary

    - ### Fields inherited from class com.h3c.of.lib.OpenflowStructure

      `version`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBodyMeterStats(ProtocolVersion pv)` Constructs a multipart body METER_STATS type.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<MBodyMeterStats.MeterBandStats>` | `getBandStats()` Returns the `MBodyMeterStats.MeterBandStats` for the meter bands applied to this meter; Since 1.3.
    `long` | `getByteInCount()` Returns the number of bytes in input; Since 1.3.
    `long` | `getDurationNSec()` Returns the time this meter has been alive in nanoseconds beyond `getDurationSec()`; Since 1.3.
    `long` | `getDurationSec()` Returns the time this meter has been alive in seconds; Since 1.3.
    `long` | `getFlowCount()` Returns the number of flows bound to this meter; Since 1.3.
    `MeterId` | `getMeterId()` Returns the meter id; Since 1.3.
    `long` | `getPktInCount()` Returns the number of packets in input; Since 1.3.
    `int` | `getTotalLength()` Returns the total length of the body, in bytes.
    `String` | `toDebugString()` Returns a string representation useful for debugging.
    `String` | `toDebugString(int indent)` Returns a multi-line representation of the Meter Stats object.
    `String` | `toString()`
    `void` | `validate()` Validates this structure for completeness and throws an exception if the structure is considered "not complete".

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

      `getVersion, hex, hex`

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

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

    - ### Methods inherited from interface com.h3c.of.lib.Structure

      `getVersion`

- - ### Constructor Detail

    - #### MBodyMeterStats

          public MBodyMeterStats(ProtocolVersion pv)

      Constructs a multipart body METER_STATS type.
      Parameters:
        `pv` - the protocol version

  - ### Method Detail

    - #### getTotalLength

          public int getTotalLength()

      Description copied from interface: `MultipartBody`
      Returns the total length of the body, in bytes.
      Specified by:
        `getTotalLength` in interface `MultipartBody`
      Returns:
        the total length of the body

    - #### validate

          public void validate()
                        throws IncompleteStructureException

      Description copied from class: `OpenflowStructure`
      Validates this structure for completeness and throws an exception if the structure is considered "not complete".

      This default implementation does nothing, i.e. default behavior is that structures are considered complete.

      Subclasses should override this method to check that mandatory fields or other internal state is present, throwing an exception if it is not.

      Specified by:
        `validate` in interface `MultipartBody`
      Overrides:
        `validate` in class `OpenflowStructure`
      Throws:
        `IncompleteStructureException` - if the structure is not complete

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `OpenflowStructure`

    - #### toDebugString

          public String toDebugString()

      Description copied from class: `OpenflowStructure`
      Returns a string representation useful for debugging. This default implementation delegates to `OpenflowStructure.toString()`, but subclasses are free to override this behavior.
      Specified by:
        `toDebugString` in interface `Structure`
      Overrides:
        `toDebugString` in class `OpenflowStructure`
      Returns:
        a (possibly multi-line) string representation of this message

    - #### toDebugString

          public String toDebugString(int indent)

      Returns a multi-line representation of the Meter Stats object.
      Parameters:
        `indent` - the additional indent (number of spaces)
      Returns:
        a multi-line representation

    - #### getMeterId

          public MeterId getMeterId()

      Returns the meter id; Since 1.3.
      Returns:
        the meter id

    - #### getFlowCount

          public long getFlowCount()

      Returns the number of flows bound to this meter; Since 1.3.
      Returns:
        the count of flows

    - #### getPktInCount

          public long getPktInCount()

      Returns the number of packets in input; Since 1.3.
      Returns:
        the count of packet in

    - #### getByteInCount

          public long getByteInCount()

      Returns the number of bytes in input; Since 1.3.
      Returns:
        the count of bytes in

    - #### getDurationSec

          public long getDurationSec()

      Returns the time this meter has been alive in seconds; Since 1.3. This values is u32.
      Returns:
        the time the meter has been alive (seconds)

    - #### getDurationNSec

          public long getDurationNSec()

      Returns the time this meter has been alive in nanoseconds beyond `getDurationSec()`; Since 1.3. This value is u32.
      Returns:
        the additional time the meter has been alive (nanoseconds)

    - #### getBandStats

          public List<MBodyMeterStats.MeterBandStats> getBandStats()

      Returns the `MBodyMeterStats.MeterBandStats` for the meter bands applied to this meter; Since 1.3.
      Returns:
        the meter band stats

Copyright © 2014. All Rights Reserved.