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;
14 import org.opendaylight.openflowplugin.api.openflow.md.core.IMDMessageTranslator;
15 import org.opendaylight.openflowplugin.api.openflow.md.core.SwitchConnectionDistinguisher;
16 import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.ExperimenterMessage;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
19 import org.opendaylight.yangtools.yang.binding.DataObject;
20 import org.slf4j.Logger;
21 import org.slf4j.LoggerFactory;
23 public class ExperimenterTranslator implements IMDMessageTranslator<OfHeader, List<DataObject>> {
25 private static final Logger LOG = LoggerFactory.getLogger(ExperimenterTranslator.class);
28 public List<DataObject> translate(SwitchConnectionDistinguisher cookie,
29 SessionContext sc, OfHeader msg) {
30 if( msg instanceof ExperimenterMessage) {
31 // TODO - implement functionality to fully support Experimenter framework
34 LOG.error( "Message is not of Experimenter Error Message " ) ;
35 return Collections.emptyList();