| /** |
| * ******************************************************************************* |
| * Copyright (c) 2019 Robert Bosch GmbH and others. |
| * |
| * 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 templates.m2m.sw.runnableItem |
| |
| import com.google.inject.Inject |
| import com.inchron.realtime.root.model.Component |
| import org.eclipse.app4mc.amalthea.model.Process |
| import org.eclipse.app4mc.amalthea.model.RunnableCall |
| import templates.AbstractAmaltheaInchronTransformer |
| import templates.m2m.sw.RunnableTransformer |
| import com.google.inject.Singleton |
| |
| @Singleton |
| class RunnableCallTransformer extends AbstractAmaltheaInchronTransformer { |
| |
| @Inject RunnableTransformer runnableTransformer |
| |
| def create inchronModelFactory.createFunctionCall createFunctionCall(Component inchronComponent, Process amltTask, |
| RunnableCall amltRunnableCall) { |
| |
| var inchronFunction = runnableTransformer.createFunction(inchronComponent, amltTask, amltRunnableCall.runnable) |
| |
| inchronComponent.functions.add(inchronFunction) |
| |
| it.name = "call_" + amltRunnableCall.runnable.name |
| |
| it.function = inchronFunction |
| |
| // it.function = runnableTransformer.createFunction(amltProcess, amltRunnableCall.runnable); |
| } |
| |
| } |