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