blob: 6794357717de0047ca5b32995f4027ba90923df3 [file] [log] [blame]
/**
********************************************************************************
* Copyright (c) 2020-2021 Robert Bosch GmbH.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Robert Bosch GmbH - initial API and implementation
* *******************************************************************************
*/
package org.eclipse.app4mc.slg.ros2.transformers.sw;
import org.eclipse.app4mc.amalthea.model.ChannelSend;
import org.eclipse.app4mc.slg.ros2.generators.RosChannelSendTranslationUnit;
import org.eclipse.app4mc.slg.ros2.generators.RosChannelSendUtilsTranslationUnit;
import org.eclipse.app4mc.transformation.util.OutputBuffer;
import com.google.inject.Inject;
import com.google.inject.Singleton;
@Singleton
public class RosChannelSendTransformer {
@Inject private OutputBuffer outputBuffer;
@Inject private RosChannelSendUtilsTransformer channelSendUtilTransformer;
public RosChannelSendTranslationUnit transform(final ChannelSend cs) {
final RosChannelSendUtilsTranslationUnit tuIp = this.channelSendUtilTransformer.generate(cs);
return new RosChannelSendTranslationUnit(this.outputBuffer, tuIp, cs);
}
}