Package org.onosproject.net.meter
Class MeterScope
- java.lang.Object
- 
- org.onlab.util.Identifier<String>
- 
- org.onosproject.net.meter.MeterScope
 
 
- 
 public class MeterScope extends Identifier<String> Scope of Meter Features. There are multiple meter tables in a P4RT device, to distinguish and represent them uniquely, we added a Scope field. For P4RT device, value will be the PiMeterId. For OF device, we use "global" by default, since there is only 1 table in OF. In general, a Meter Scope is referring to a Meter Table. It can be a PiMeterId or "global" for the single OF meter table. During runtime, users need to provide a PiMeterId to indicate which Meter Cell they are intended to modify. The value will then be used to create a Meter Scope for the rest of the process. If no PiMeterId is provided, a "global" Meter Scope is created.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringMETER_GLOBAL_SCOPE- 
Fields inherited from class org.onlab.util.Identifieridentifier
 
- 
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MeterScopeglobalScope()Create a global Meter Scope.booleanisGlobal()Global scope or not.static MeterScopeof(String scope)Create a Meter Scope from id string.- 
Methods inherited from class org.onlab.util.Identifierequals, hashCode, id, toString
 
- 
 
- 
- 
- 
Field Detail- 
METER_GLOBAL_SCOPEpublic static final String METER_GLOBAL_SCOPE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
ofpublic static MeterScope of(String scope) Create a Meter Scope from id string.- Parameters:
- scope- the scope
- Returns:
- a Meter Scope
 
 - 
globalScopepublic static MeterScope globalScope() Create a global Meter Scope.- Returns:
- a Meter Scope
 
 - 
isGlobalpublic boolean isGlobal() Global scope or not.- Returns:
- true if global scope, false if not.
 
 
- 
 
-