Commit ce8e8d7a by Tobias Langer

Added template and taskset description parsing.

parent b6cbbb24
......@@ -18,6 +18,7 @@ import os
import argparse
import shutil
import json
import pystache
def query_yes_no(question, default=None):
"""
......@@ -55,11 +56,15 @@ def create_dir(filename):
os.makedirs(path)
return True
def create_header(headerfile, tasks, destination):
def create_header(headerfile, experiment, destination):
"""
Create a header file for the experiment.
"""
pass
with open(headerfile, 'r') as header_template:
template = header_template.read()
header_txt = pystache.render(template, experiment)
with open(destination, 'w') as header:
print(header_txt, file=header)
def main():
"""
......@@ -93,9 +98,6 @@ def main():
print('Skipping experiment ', experiment['name'], file=sys.stderr)
continue
# Read tasks
tasks = []
# Add header
print('create header file')
create_header(args.headerfile, experiment, experiment_dir)
......
{{#includes}}
#include{{name}}
{{/includes}}
{{#data_description}}
struct {{name}} {
{{#fields}}
{{type}} {{name}};
{{/fields}}
};
{{/data_description}}
{{#data}}
{{type}} {{name}}[] = {
{{#elem}}
.wcet = {{wcet}}
.period = {{period}}
.deadline = {{deadline}}
.periodical = {{periodical}}
.ticktype = {{ticktype}}
{{/elem}}
};
{{/data}}
{{#executions}}
int executions = 500;
{{/executions}}
{{^executions}}
int executions = 1;
{{/executions}}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment