Merge remote-tracking branch 'liblldp/master'
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / protocol / serialization / instructions / ClearActionsInstructionSerializer.java
1 /*
2  * Copyright (c) 2016 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
9 package org.opendaylight.openflowplugin.impl.protocol.serialization.instructions;
10
11 import io.netty.buffer.ByteBuf;
12 import org.opendaylight.openflowjava.protocol.impl.util.InstructionConstants;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.Instruction;
14
15 public class ClearActionsInstructionSerializer extends AbstractInstructionSerializer {
16
17     @Override
18     public void serialize(Instruction input, ByteBuf outBuffer) {
19         super.serialize(input, outBuffer);
20         outBuffer.writeZero(InstructionConstants.PADDING_IN_ACTIONS_INSTRUCTION);
21     }
22
23     @Override
24     protected int getType() {
25         return InstructionConstants.CLEAR_ACTIONS_TYPE;
26     }
27
28     @Override
29     protected int getLength() {
30         return InstructionConstants.STANDARD_INSTRUCTION_LENGTH;
31     }
32
33 }