Bug 2756 - Action model update
[openflowjava.git] / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / serialization / action / OF13DecNwTtlActionSerializer.java
index d1f4436971cb80ca46fe0fb764575ee6435c6d0b..cb5e92e3dfa0df7431a5624aacf4beb17bcf3733 100644 (file)
@@ -8,14 +8,28 @@
 
 package org.opendaylight.openflowjava.protocol.impl.serialization.action;
 
+import io.netty.buffer.ByteBuf;
+
 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
 
 
 /**
  * @author michal.polkorab
  *
  */
-public class OF13DecNwTtlActionSerializer extends AbstractHeaderActionSerializer {
+public class OF13DecNwTtlActionSerializer extends AbstractActionSerializer {
+
+    @Override
+    public void serialize(Action action, ByteBuf outBuffer) {
+        super.serialize(action, outBuffer);
+        outBuffer.writeZero(ActionConstants.PADDING_IN_ACTION_HEADER);
+    }
+
+    @Override
+    protected int getLength() {
+        return ActionConstants.GENERAL_ACTION_LENGTH;
+    }
 
     @Override
     protected int getType() {