242d9ba9ce7a11c8a252700badb320b8528769aa
[openflowplugin.git] / openflowjava / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / serialization / action / OF13PopVlanActionSerializer.java
1 /*
2  * Copyright (c) 2013 Pantheon Technologies s.r.o. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.openflowjava.protocol.impl.serialization.action;
9
10 import io.netty.buffer.ByteBuf;
11 import org.opendaylight.openflowjava.protocol.impl.util.ActionConstants;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
13
14 /**
15  * Serializes OF 1.3 PopVlan actions.
16  *
17  * @author michal.polkorab
18  */
19 public class OF13PopVlanActionSerializer extends AbstractActionSerializer {
20     public OF13PopVlanActionSerializer() {
21         super(ActionConstants.POP_VLAN_CODE, ActionConstants.GENERAL_ACTION_LENGTH);
22     }
23
24     @Override
25     public void serialize(final Action action, final ByteBuf outBuffer) {
26         super.serialize(action, outBuffer);
27         outBuffer.writeZero(ActionConstants.PADDING_IN_ACTION_HEADER);
28     }
29 }