Bug 2756 - Match model update
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / util / OF10MatchDeserializer.java
index 0f4493950c3aacb236a6bbcbbf7ecd34169de0b4..b0a4f41c3d67533fb99c8d45acbbc793deb400ff 100644 (file)
@@ -12,11 +12,12 @@ import io.netty.buffer.ByteBuf;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev100924.Ipv4Address;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev100924.MacAddress;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.FlowWildcardsV10;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev130731.match.v10.grouping.MatchV10Builder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.v10.grouping.MatchV10Builder;
 
 /**
  * Deserializes ofp_match (OpenFlow v1.0) structure
@@ -68,18 +69,18 @@ public class OF10MatchDeserializer implements OFDeserializer<MatchV10> {
      * @return decoded FlowWildcardsV10
      */
     public static FlowWildcardsV10 createWildcards(final long input) {
-        boolean _iNPORT = (input & (1 << 0)) != 0;
-        boolean _dLVLAN = (input & (1 << 1)) != 0;
-        boolean _dLSRC = (input & (1 << 2)) != 0;
-        boolean _dLDST = (input & (1 << 3)) != 0;
-        boolean _dLTYPE = (input & (1 << 4)) != 0;
-        boolean _nWPROTO = (input & (1 << 5)) != 0;
-        boolean _tPSRC = (input & (1 << 6)) != 0;
-        boolean _tPDST = (input & (1 << 7)) != 0;
-        boolean _dLVLANPCP = (input & (1 << 20)) != 0;
-        boolean _nWTOS = (input & (1 << 21)) != 0;
-        return new FlowWildcardsV10(_dLDST, _dLSRC, _dLTYPE, _dLVLAN,
-                _dLVLANPCP, _iNPORT, _nWPROTO, _nWTOS, _tPDST, _tPSRC);
+        boolean inPort = (input & (1 << 0)) != 0;
+        boolean dlVLAN = (input & (1 << 1)) != 0;
+        boolean dlSrc = (input & (1 << 2)) != 0;
+        boolean dlDst = (input & (1 << 3)) != 0;
+        boolean dLType = (input & (1 << 4)) != 0;
+        boolean nwProto = (input & (1 << 5)) != 0;
+        boolean tpSrc = (input & (1 << 6)) != 0;
+        boolean tpDst = (input & (1 << 7)) != 0;
+        boolean dlVLANpcp = (input & (1 << 20)) != 0;
+        boolean nwTos = (input & (1 << 21)) != 0;
+        return new FlowWildcardsV10(dlDst, dlSrc, dLType, dlVLAN,
+                dlVLANpcp, inPort, nwProto, nwTos, tpDst, tpSrc);
     }
 
     /**