1 package org.opendaylight.openflowjava.nx.codec.match;
3 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntryDeserializerKey;
4 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
5 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
6 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
7 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
8 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Nxm1Class;
9 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg2;
11 public class Reg2Codec extends AbstractRegCodec {
13 private static final int NXM_FIELD_CODE = 2;
14 public static final MatchEntrySerializerKey<Nxm1Class, NxmNxReg2> SERIALIZER_KEY = new MatchEntrySerializerKey<>(
15 EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg2.class);
16 public static final MatchEntryDeserializerKey DESERIALIZER_KEY = new MatchEntryDeserializerKey(
17 EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, NXM_FIELD_CODE);
20 public int getNxmFieldCode() {
21 return NXM_FIELD_CODE;
25 public Class<? extends MatchField> getNxmField() {
26 return NxmNxReg2.class;