package org.opendaylight.openflowjava.protocol.impl.serialization.action;
+import io.netty.buffer.ByteBuf;
+
import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
+import org.opendaylight.openflowjava.util.ByteBufUtils;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetNwDstCase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
/**
* @author michal.polkorab
*
*/
-public class OF10SetNwDstActionSerializer extends OF10AbstractIpAddressActionSerializer {
+public class OF10SetNwDstActionSerializer extends AbstractActionSerializer {
+
+ @Override
+ public void serialize(final Action action, final ByteBuf outBuffer) {
+ super.serialize(action, outBuffer);
+ Iterable<String> addressGroups = ByteBufUtils.DOT_SPLITTER
+ .split(((SetNwDstCase) action.getActionChoice()).getSetNwDstAction()
+ .getIpAddress().getValue());
+ for (String group : addressGroups) {
+ outBuffer.writeByte(Short.parseShort(group));
+ }
+ }
@Override
protected int getType() {