2 * Copyright (c) 2014, 2015 Cisco Systems, Inc. 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.openflowjava.nx.codec.match;
10 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntryDeserializerKey;
11 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
12 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
13 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Nxm1Class;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg5;
18 public class Reg5Codec extends AbstractRegCodec {
20 private static final int NXM_FIELD_CODE = 5;
21 public static final MatchEntrySerializerKey<Nxm1Class, NxmNxReg5> SERIALIZER_KEY = new MatchEntrySerializerKey<>(
22 EncodeConstants.OF_VERSION_1_3, Nxm1Class.class, NxmNxReg5.class);
23 public static final MatchEntryDeserializerKey DESERIALIZER_KEY = new MatchEntryDeserializerKey(
24 EncodeConstants.OF_VERSION_1_3, OxmMatchConstants.NXM_1_CLASS, NXM_FIELD_CODE);
27 public int getNxmFieldCode() {
28 return NXM_FIELD_CODE;
32 public Class<? extends MatchField> getNxmField() {
33 return NxmNxReg5.class;