fixed up errors
diff --git a/java_gen/java_type.py b/java_gen/java_type.py
index f1e86e0..ee9886a 100644
--- a/java_gen/java_type.py
+++ b/java_gen/java_type.py
@@ -438,10 +438,10 @@
.op(read='TableId.readByte(bb)',
write='$name.writeByte(bb)',
default='TableId.ZERO')
-aux_id = JType("AuxId") \
- .op(read='AuxId.readByte(bb)',
+of_aux_id = JType("OFAuxId") \
+ .op(read='OFAuxId.readByte(bb)',
write='$name.writeByte(bb)',
- default='AuxId.MAIN')
+ default='OFAuxId.MAIN')
of_version = JType("OFVersion", 'byte') \
.op(read='bb.readByte()', write='bb.writeByte($name)')
@@ -637,7 +637,7 @@
'of_bsn_tlv_vlan_vid' : { 'value' : vlan_vid },
'of_bsn_gentable_entry_add' : { 'table_id' : gen_table_id },
- 'of_features_reply_auxiliary_id' : {aux_id}
+ 'of_features_reply' : { 'auxiliary_id' : of_aux_id},
}
diff --git a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/AuxId.java b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFAuxId.java
similarity index 69%
rename from java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/AuxId.java
rename to java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFAuxId.java
index 3d4a689..7b124f2 100644
--- a/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/AuxId.java
+++ b/java_gen/pre-written/src/main/java/org/projectfloodlight/openflow/types/OFAuxId.java
@@ -3,34 +3,35 @@
import org.jboss.netty.buffer.ChannelBuffer;
import org.projectfloodlight.openflow.exceptions.OFParseError;
+import com.google.common.hash.PrimitiveSink;
import com.google.common.primitives.Shorts;
-public class AuxId implements Comparable<AuxId> {
+public class OFAuxId implements Comparable<OFAuxId>, PrimitiveSinkable {
private static final short VALIDATION_MASK = 0xFF;
private static final short MAIN_VAL = 0x0000;
- public static final AuxId MAIN = new AuxId(MAIN_VAL);
+ public static final OFAuxId MAIN = new OFAuxId(MAIN_VAL);
private final short id;
- private AuxId(short id) {
+ private OFAuxId(short id) {
this.id = id;
}
- public static AuxId of(short id) {
+ public static OFAuxId of(short id) {
switch(id) {
case MAIN_VAL:
return MAIN;
default:
if ((id & VALIDATION_MASK) != id)
throw new IllegalArgumentException("Illegal Aux id value: " + id);
- return new AuxId(id);
+ return new OFAuxId(id);
}
}
- public static AuxId of(int id) {
+ public static OFAuxId of(int id) {
if((id & VALIDATION_MASK) != id)
throw new IllegalArgumentException("Illegal Aux id value: "+id);
return of((short) id);
@@ -49,15 +50,15 @@
c.writeByte(this.id);
}
- public static AuxId readByte(ChannelBuffer c) throws OFParseError {
- return AuxId.of(c.readUnsignedByte());
+ public static OFAuxId readByte(ChannelBuffer c) throws OFParseError {
+ return OFAuxId.of(c.readUnsignedByte());
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof TableId))
return false;
- AuxId other = (AuxId)obj;
+ OFAuxId other = (OFAuxId)obj;
if (other.id != this.id)
return false;
return true;
@@ -70,8 +71,13 @@
}
@Override
- public int compareTo(AuxId other) {
+ public int compareTo(OFAuxId other) {
return Shorts.compare(this.id, other.id);
}
+ @Override
+ public void putTo(PrimitiveSink sink) {
+ sink.putByte((byte) id);
+ }
+
}