X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=third-party%2Fopenflow-codec%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fcodec%2Fprotocol%2Fqueue%2FOFPQueuePropertyMinRate.java;fp=third-party%2Fopenflow-codec%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenflow%2Fcodec%2Fprotocol%2Fqueue%2FOFPQueuePropertyMinRate.java;h=0000000000000000000000000000000000000000;hb=64fe0fbca1a6c2b77ad25f568d73a7eb64236d16;hp=e4aeeeed43ff63b852ca801d79bb7cf86a3d0ec7;hpb=8b9a3ff2bbc83941254b46b818cbbae5cc1a3a5b;p=openflowjava.git diff --git a/third-party/openflow-codec/src/main/java/org/openflow/codec/protocol/queue/OFPQueuePropertyMinRate.java b/third-party/openflow-codec/src/main/java/org/openflow/codec/protocol/queue/OFPQueuePropertyMinRate.java deleted file mode 100644 index e4aeeeed..00000000 --- a/third-party/openflow-codec/src/main/java/org/openflow/codec/protocol/queue/OFPQueuePropertyMinRate.java +++ /dev/null @@ -1,89 +0,0 @@ -package org.openflow.codec.protocol.queue; - -import org.openflow.codec.io.IDataBuffer; -import org.openflow.codec.util.U16; - -/** - * Corresponds to the struct ofp_queue_prop_min_rate OpenFlow structure - * - * @author David Erickson (daviderickson@cs.stanford.edu) - */ -public class OFPQueuePropertyMinRate extends OFPQueueProperty { - public static int MINIMUM_LENGTH = 16; - - protected short rate; - - /** - * - */ - public OFPQueuePropertyMinRate() { - super(); - this.type = OFPQueuePropertyType.MIN_RATE; - this.length = U16.t(MINIMUM_LENGTH); - } - - /** - * @return the rate - */ - public short getRate() { - return rate; - } - - /** - * @param rate - * the rate to set - */ - public OFPQueuePropertyMinRate setRate(short rate) { - this.rate = rate; - return this; - } - - @Override - public void readFrom(IDataBuffer data) { - super.readFrom(data); - this.rate = data.getShort(); - data.getInt(); // pad - data.getShort(); // pad - } - - @Override - public void writeTo(IDataBuffer data) { - super.writeTo(data); - data.putShort(this.rate); - data.putInt(0); // pad - data.putShort((short) 0); // pad - } - - @Override - public int hashCode() { - final int prime = 3259; - int result = super.hashCode(); - result = prime * result + rate; - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (!super.equals(obj)) - return false; - if (!(obj instanceof OFPQueuePropertyMinRate)) - return false; - OFPQueuePropertyMinRate other = (OFPQueuePropertyMinRate) obj; - if (rate != other.rate) - return false; - return true; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return "OFPQueuePropertyMinRate [type=" + type + ", rate=" + U16.f(rate) + "]"; - } - -}