2 * Copyright (c) 2016 Pantheon Technologies s.r.o. and others. All rights reserved.
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
9 package org.opendaylight.openflowplugin.impl.protocol.serialization.instructions;
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.GoToTableCase;
15 public class GoToTableInstructionSerializer extends AbstractInstructionSerializer<GoToTableCase> {
18 public void serialize(final GoToTableCase input, final ByteBuf outBuffer) {
19 super.serialize(input, outBuffer);
20 outBuffer.writeByte(input.getGoToTable().getTableId().toJava());
21 outBuffer.writeZero(InstructionConstants.PADDING_IN_GOTO_TABLE);
25 protected int getType() {
26 return InstructionConstants.GOTO_TABLE_TYPE;
30 protected int getLength() {
31 return InstructionConstants.STANDARD_INSTRUCTION_LENGTH;