blob: 24d4c9b08c3303b4bb43a5e4bea1c455b28f8ed2 [file] [log] [blame]
/**
********************************************************************************
* Copyright (c) 2018-2019 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 templates.m2m.sw
import com.google.inject.Singleton
import com.inchron.realtime.root.model.DataFlowCommunicationType
import org.eclipse.app4mc.amalthea.model.Channel
import templates.AbstractAmaltheaInchronTransformer
@Singleton
class ChannelTransformer extends AbstractAmaltheaInchronTransformer {
public def create inchronModelFactory.createDataFlowConnection createDataFlowConnection(Channel amltChannel){
it.communicationType = DataFlowCommunicationType.QUEUING
it.initialElements = amltChannel.defaultElements
it.name = amltChannel.name
it.maxElements = amltChannel.maxElements
//hook this DataFlowConnection into Inchron root model
getInchronRoot.connections.add(it);
}
}