Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e75dab16226f34fa253510068b4f53d95f2872a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*******************************************************************************
 * Copyright (c) 2012 protos software gmbh (http://www.protos.de).
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 * 
 * CONTRIBUTORS:
 * 		Henrik Rentz-Reichert (initial contribution)
 * 
 *******************************************************************************/

grammar org.eclipse.etrice.core.etmap.ETMap with org.eclipse.etrice.core.common.Base

generate eTMap "http://www.eclipse.org/etrice/core/etmap/ETMap"

import "http://www.eclipse.org/emf/2002/Ecore" as ecore
import "http://www.eclipse.org/etrice/Room" as room
import "http://www.eclipse.org/etrice/core/etphys/ETPhys" as phys

MappingModel:
	'MappingModel' name=FQN '{'
		(imports+=Import)*
		mappings+=Mapping*
	'}'
;

Mapping:
	'Mapping' logicalSys=[room::LogicalSystem|FQN] '->' physicalSys=[phys::PhysicalSystem|FQN] '{'
		subsysMappings+=SubSystemMapping*
	'}'
;

SubSystemMapping:
	'SubSystemMapping' logicalSubSys=[room::SubSystemRef|ID] '->' node=[phys::NodeRef|ID] ('{'
		threadMappings+=ThreadMapping*
	'}')?
;

ThreadMapping:
	'ThreadMapping' logicalThread=[room::LogicalThread|ID] '->' physicalThread=[phys::PhysicalThread|ID]
;

Back to the top