2 * Copyright (c) 2019 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
8 package org.opendaylight.openflowplugin.impl.protocol.serialization.match;
10 import io.netty.buffer.ByteBuf;
11 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
12 import org.opendaylight.yangtools.yang.common.Uint16;
14 public abstract class AbstractUint16EntrySerializer extends AbstractPrimitiveEntrySerializer<Uint16> {
15 protected AbstractUint16EntrySerializer(final int oxmClassCode, final int oxmFieldCode) {
16 super(oxmClassCode, oxmFieldCode, EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
20 protected final void serializeEntry(final Uint16 entry, final ByteBuf outBuffer) {
21 outBuffer.writeShort(entry.shortValue());