2 * Copyright (c) 2014 Ericsson India Global Services Pvt Ltd. 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 * Contributor: prasanna.huddar@ericsson.com
10 package org.opendaylight.openflowplugin.openflow.md.core.translator;
12 import java.util.Collections;
13 import java.util.List;
15 import org.opendaylight.openflowplugin.openflow.md.core.IMDMessageTranslator;
16 import org.opendaylight.openflowplugin.openflow.md.core.SwitchConnectionDistinguisher;
17 import org.opendaylight.openflowplugin.openflow.md.core.session.SessionContext;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessage;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
20 import org.opendaylight.yangtools.yang.binding.DataObject;
21 import org.slf4j.Logger;
22 import org.slf4j.LoggerFactory;
24 public class ExperimenterTranslator implements IMDMessageTranslator<OfHeader, List<DataObject>> {
26 protected static final Logger LOG = LoggerFactory.getLogger(ExperimenterTranslator.class);
29 public List<DataObject> translate(SwitchConnectionDistinguisher cookie,
30 SessionContext sc, OfHeader msg) {
31 if( msg instanceof ExperimenterMessage) {
32 // TODO - implement functionality to fully support Experimenter framework
35 LOG.error( "Message is not of Experimenter Error Message " ) ;
36 return Collections.emptyList();