public enum MeterBandType extends Enum<MeterBandType> implements OfpCodeBasedEnum
Enum Constant and Description |
---|
DROP
Drop packet; Since 1.3.
|
DSCP_REMARK
Remark DSCP in the IP header; Since 1.3.
|
EXPERIMENTER
Experimenter meter band; Since 1.3.
|
Modifier and Type | Method and Description |
---|---|
static Set<MeterBandType> |
decodeFlags(int bitmap,
ProtocolVersion pv)
Decodes the meter band type flags, based on the code associated with the
flags, and returns the set of corresponding constants.
|
static int |
encodeFlags(Set<MeterBandType> flags,
ProtocolVersion pv)
Encodes a set of meter band type flags as a bitmap.
|
int |
getCode(ProtocolVersion pv)
Returns the internal code for the given band type.
|
static MeterBandType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MeterBandType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MeterBandType DROP
public static final MeterBandType DSCP_REMARK
public static final MeterBandType EXPERIMENTER
public static MeterBandType[] values()
for (MeterBandType c : MeterBandType.values()) System.out.println(c);
public static MeterBandType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getCode(ProtocolVersion pv)
getCode
in interface OfpCodeBasedEnum
pv
- the protocol versionpublic static Set<MeterBandType> decodeFlags(int bitmap, ProtocolVersion pv)
Note that the EXPERIMENTER
can not be represented
as a possible flag in an integer bit mask.
bitmap
- the bitmap to decodepv
- the protocol versionNullPointerException
- if protocol version is nullVersionMismatchException
- if a bit position is not supported
in the given versionpublic static int encodeFlags(Set<MeterBandType> flags, ProtocolVersion pv)
flags
parameter may be empty, in which case a bitmap of 0 (zero) is returned.
Note that the EXPERIMENTER
can not be represented
as a possible flag in an integer bit mask.
flags
- the flags to encodepv
- the protocol versionNullPointerException
- if either parameter is nullIllegalArgumentException
- if code associated with enumeration
constant is outside the valid range (0 - 31)VersionMismatchException
- if a flag is present that is not
supported in the given protocol versionCopyright © 2015. All Rights Reserved.