Package org.onosproject.net.pi.runtime
Class PiMeterCellConfig
- java.lang.Object
-
- org.onosproject.net.pi.runtime.PiMeterCellConfig
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPiMeterCellConfig.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PiMeterCellConfig.Builderbuilder()Returns a meter cell configuration builder.PiMeterCellIdcellId()Returns the cell identifier.PiMeterBandcommittedBand()Returns the committed configuration if present.booleanequals(Object o)PiMeterCellHandlehandle(DeviceId deviceId)Returns a handle for this PI entity and the given device ID.inthashCode()booleanisDefaultConfig()Check if the config represents a reset operation.booleanisModifyConfig()Check if the config represents a modify operation.Map<PiMeterBandType,PiMeterBand>meterBands()Returns the map of bands of this cell.PiMeterBandpeakBand()Returns the peak configuration if present.PiEntityTypepiEntityType()Returns the type of this entity.static PiMeterCellConfigreset(PiMeterCellId piMeterCellId)Returns a PiMeterCellConfig with no bands.StringtoString()
-
-
-
Method Detail
-
cellId
public PiMeterCellId cellId()
Returns the cell identifier.- Returns:
- cell identifier
-
meterBands
public Map<PiMeterBandType,PiMeterBand> meterBands()
Returns the map of bands of this cell.- Returns:
- meter bands
-
isModifyConfig
public boolean isModifyConfig()
Check if the config represents a modify operation. Or it is a non-default config read from south bound.- Returns:
- true if there are exactly 2 bands
-
isDefaultConfig
public boolean isDefaultConfig()
Check if the config represents a reset operation. Or it is a default config read from south bound.- Returns:
- true if there is no band
-
committedBand
public PiMeterBand committedBand()
Returns the committed configuration if present.- Returns:
- the committed band. Null otherwise
-
peakBand
public PiMeterBand peakBand()
Returns the peak configuration if present.- Returns:
- the peak band. Null otherwise
-
reset
public static PiMeterCellConfig reset(PiMeterCellId piMeterCellId)
Returns a PiMeterCellConfig with no bands. Used to reset a PI meter cell.- Parameters:
piMeterCellId- the PiMeterCellId need to be reset- Returns:
- a PiMeterCellConfig with no bands
-
piEntityType
public PiEntityType piEntityType()
Description copied from interface:PiEntityReturns the type of this entity.- Specified by:
piEntityTypein interfacePiEntity- Returns:
- entity type
-
handle
public PiMeterCellHandle handle(DeviceId deviceId)
Description copied from interface:PiEntityReturns a handle for this PI entity and the given device ID.
-
builder
public static PiMeterCellConfig.Builder builder()
Returns a meter cell configuration builder.- Returns:
- a new builder
-
-