summaryrefslogtreecommitdiff
path: root/DAnCE/bin/PythonDAnCE/generator/comp_inst.py
blob: a235501d12e505af8d2193646636c79567fe2f0d (plain)
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
from templet import stringfunction

@stringfunction
def template (component_name, config_values, impl, node) :
    """ 
    ${{
    if impl == "": 
       impl = component_name + "ComponentImplementation"
       
    if node == "":
       node = "NodeOne"
    
    }}

  <instance xmi:id="${component_name}ComponentInstance">
    <name>${component_name}Component</name>
    <node>${node}</node>
    <!-- hostname -->
    <source/>
    <implementation xmi:idref="${impl}" />

    ${config_values}
  </instance>
   
 """