1. Removed type serializers, added (write|read)[0-9]*Byte[s]?(ChannelBuffer) method to value types instead.
2. Updated Masked fields for IPv4, IPv6 with specific string methods.
3. Added value types for other fields from the spec
4. Updated unit tests accordingly
5. Changed java_type.py to support multiple read/write operations per type, per OF version.
diff --git a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6.java b/java_gen/pre-written/src/main/java/org/openflow/types/IPv6.java
index ff5e9ed..e3166fd 100644
--- a/java_gen/pre-written/src/main/java/org/openflow/types/IPv6.java
+++ b/java_gen/pre-written/src/main/java/org/openflow/types/IPv6.java
@@ -270,24 +270,12 @@
return true;
}
- public static final Serializer<IPv6> SERIALIZER_V12 = new SerializerV12();
- public static final Serializer<IPv6> SERIALIZER_V13 = SERIALIZER_V12;
-
- private static class SerializerV12 implements OFValueType.Serializer<IPv6> {
-
- @Override
- public void writeTo(IPv6 value, ChannelBuffer c) {
- c.writeLong(value.raw1);
- c.writeLong(value.raw2);
- }
-
- @Override
- public IPv6 readFrom(ChannelBuffer c) throws OFParseError {
- return IPv6.of(c.readLong(), c.readLong());
- }
-
+ public void write16Bytes(ChannelBuffer c) {
+ c.writeLong(this.raw1);
+ c.writeLong(this.raw2);
}
-
-
+ public static IPv6 read16Bytes(ChannelBuffer c) throws OFParseError {
+ return IPv6.of(c.readLong(), c.readLong());
+ }
}