Bump MRI upstreams
[openflowplugin.git] / extension / openflowjava-extension-nicira / src / main / java / org / opendaylight / openflowjava / nx / codec / match / Nshc3Codec.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. 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 package org.opendaylight.openflowjava.nx.codec.match;
9
10 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
11 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntryDeserializerKey;
12 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
13 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ExperimenterClass;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNshc3;
17
18 public class Nshc3Codec extends AbstractNshcCodec {
19
20     private static final int NXM_FIELD_CODE = 8;
21     public static final MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc3> SERIALIZER_KEY =
22             createSerializerKey(
23                     EncodeConstants.OF_VERSION_1_3,
24                     NiciraConstants.NX_NSH_VENDOR_ID,
25                     NxmNxNshc3.class);
26     public static final MatchEntryDeserializerKey DESERIALIZER_KEY =
27             createDeserializerKey(
28                     EncodeConstants.OF_VERSION_1_3,
29                     NiciraConstants.NX_NSH_VENDOR_ID,
30                     NXM_FIELD_CODE);
31
32     @Override
33     public int getNxmFieldCode() {
34         return NXM_FIELD_CODE;
35     }
36
37     @Override
38     public Class<? extends MatchField> getNxmField() {
39         return NxmNxNshc3.class;
40     }
41 }