blob: f3db0fc99cf1ae2873b2775b263b88201c1b4db9 [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
import com.google.inject.Inject
import com.google.inject.Singleton
import org.eclipse.app4mc.amalthea.model.ActivityGraphItem
import org.eclipse.app4mc.amalthea.model.ChannelSend
import org.eclipse.app4mc.amalthea.model.InterProcessTrigger
import org.eclipse.app4mc.slg.commons.m2t.transformers.ActivityGraphItemTransformer
import org.eclipse.app4mc.slg.commons.m2t.generators.TranslationUnit
@Singleton
class RosActivityGraphItemTransformer extends ActivityGraphItemTransformer {
@Inject RosChannelSendTransformer channelSendTransformer
@Inject RosInterProcessTriggerTransformer ipTransformer
dispatch override TranslationUnit transform(ChannelSend cs) {
return channelSendTransformer.transform(cs);
}
dispatch def TranslationUnit transform(InterProcessTrigger ip) {
return ipTransformer.transform(ip)
}
dispatch override TranslationUnit transform(ActivityGraphItem ActivityGraphItem) {
val message = '''/*[feature «ActivityGraphItem.class» in not supported]*/'''
return new TranslationUnit("undefined", message, message, message)
}
}