Package p4.v1

Class P4RuntimeOuterClass.MeterConfig

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
p4.v1.P4RuntimeOuterClass.MeterConfig
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable, P4RuntimeOuterClass.MeterConfigOrBuilder
Enclosing class:
P4RuntimeOuterClass

public static final class P4RuntimeOuterClass.MeterConfig extends com.google.protobuf.GeneratedMessage implements P4RuntimeOuterClass.MeterConfigOrBuilder
 Modeled to support both RFC 2698: A Two Rate Three Color Marker (trTCM) and
 RFC 2697: A Single Rate Three Color Marker (srTCM) based on the `type` of the
 corresponding MeterSpec.

 The trTCM meters a packet stream and marks its packets based on two rates,
 Peak Information Rate (PIR) and Committed Information Rate (CIR), and their
 associated burst sizes to be either green, yellow, or red.  A packet is
 marked red if it exceeds the PIR.  Otherwise it is marked either yellow or
 green depending on whether it exceeds or doesn't exceed the CIR. For this
 meter type, `eburst` must be unset.

 The srTCM meters a packet stream and marks its packets based on one rate,
 Committed Information Rate (CIR), and its associated burst size as well as an
 Excess Burst Size (EBS) to be either green, yellow, or red. Roughly, a packet
 is marked green if it doesn't exceed the CIR.  Otherwise it is marked either
 yellow or green depending on whether it exceeds or doesn't exceed the EBS.
 For this meter type, it must be the case that `cir == pir && cburst ==
 pburst`.
 
Protobuf type p4.v1.MeterConfig
See Also:
  • Field Details

  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getCir

      public long getCir()
       Committed information rate (units per sec)
       
      int64 cir = 1;
      Specified by:
      getCir in interface P4RuntimeOuterClass.MeterConfigOrBuilder
      Returns:
      The cir.
    • getCburst

      public long getCburst()
       Committed burst size
       
      int64 cburst = 2;
      Specified by:
      getCburst in interface P4RuntimeOuterClass.MeterConfigOrBuilder
      Returns:
      The cburst.
    • getPir

      public long getPir()
       Peak information rate (units per sec)
       
      int64 pir = 3;
      Specified by:
      getPir in interface P4RuntimeOuterClass.MeterConfigOrBuilder
      Returns:
      The pir.
    • getPburst

      public long getPburst()
       Peak burst size
       
      int64 pburst = 4;
      Specified by:
      getPburst in interface P4RuntimeOuterClass.MeterConfigOrBuilder
      Returns:
      The pburst.
    • getEburst

      public long getEburst()
       Excess burst size (only used by srTCM).
       Added in 1.4.0.
       
      int64 eburst = 5;
      Specified by:
      getEburst in interface P4RuntimeOuterClass.MeterConfigOrBuilder
      Returns:
      The eburst.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static P4RuntimeOuterClass.MeterConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static P4RuntimeOuterClass.MeterConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static P4RuntimeOuterClass.MeterConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static P4RuntimeOuterClass.MeterConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static P4RuntimeOuterClass.MeterConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static P4RuntimeOuterClass.MeterConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static P4RuntimeOuterClass.MeterConfig parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static P4RuntimeOuterClass.MeterConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static P4RuntimeOuterClass.MeterConfig parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static P4RuntimeOuterClass.MeterConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static P4RuntimeOuterClass.MeterConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static P4RuntimeOuterClass.MeterConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public P4RuntimeOuterClass.MeterConfig.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static P4RuntimeOuterClass.MeterConfig.Builder newBuilder()
    • newBuilder

    • toBuilder

      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected P4RuntimeOuterClass.MeterConfig.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static P4RuntimeOuterClass.MeterConfig getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<P4RuntimeOuterClass.MeterConfig> parser()
    • getParserForType

      public com.google.protobuf.Parser<P4RuntimeOuterClass.MeterConfig> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public P4RuntimeOuterClass.MeterConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder