org.openflow.protocol.meter
Class OFMeterBand

java.lang.Object
  extended by org.openflow.protocol.meter.OFMeterBand
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
OFMeterBandDrop, OFMeterBandDSCPRemark

public class OFMeterBand
extends java.lang.Object
implements java.lang.Cloneable

Corresponds to the struct ofp_meter_band_header OpenFlow structure

Author:
Srini Seetharaman (srini.seetharaman@gmail.com)

Field Summary
protected  int burstSize
           
protected  short length
           
static int MINIMUM_LENGTH
           
protected  int rate
           
protected  OFMeterBandType type
           
 
Constructor Summary
OFMeterBand()
           
 
Method Summary
protected  OFMeterBand clone()
           
 boolean equals(java.lang.Object obj)
           
 int getBurstSize()
           
 short getLength()
           
 int getLengthU()
          Returns the unsigned length
 int getRate()
           
 OFMeterBandType getType()
           
 int hashCode()
           
 void readFrom(java.nio.ByteBuffer data)
           
 OFMeterBand setBurstSize(int burstSize)
           
 void setLength(short length)
           
 OFMeterBand setRate(int rate)
           
 OFMeterBand setType(OFMeterBandType type)
           
 void writeTo(java.nio.ByteBuffer data)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MINIMUM_LENGTH

public static int MINIMUM_LENGTH

type

protected OFMeterBandType type

length

protected short length

rate

protected int rate

burstSize

protected int burstSize
Constructor Detail

OFMeterBand

public OFMeterBand()
Method Detail

getType

public OFMeterBandType getType()
Returns:
the type

setType

public OFMeterBand setType(OFMeterBandType type)
Parameters:
type - the type to set

getLength

public short getLength()
Returns:
the length

getLengthU

public int getLengthU()
Returns the unsigned length

Returns:
the length

setLength

public void setLength(short length)
Parameters:
length - the length to set

getRate

public int getRate()
Returns:
the rate

setRate

public OFMeterBand setRate(int rate)
Parameters:
rate - the rate to set

getBurstSize

public int getBurstSize()
Returns:
the burst_size

setBurstSize

public OFMeterBand setBurstSize(int burstSize)
Parameters:
burstSize - the burst_size to set

readFrom

public void readFrom(java.nio.ByteBuffer data)

writeTo

public void writeTo(java.nio.ByteBuffer data)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

clone

protected OFMeterBand clone()
Overrides:
clone in class java.lang.Object