diff --git a/template/defines.h b/template/defines.h index 2e219ed..72ddf18 100644 --- a/template/defines.h +++ b/template/defines.h @@ -14,18 +14,22 @@ struct {{name}} { {{/fields}} }; +{{/data_description}} {{#data}} - {{type}} {{name}}[] = { - {{#elem}} - .wcet = {{wcet}} - .period = {{period}} - .deadline = {{deadline}} - .periodical = {{periodical}} - .ticktype = {{ticktype}} - {{/elem}} - }; -{{/data}} +{{type}} {{name}}[] = { +{{#elem}} + { + .offset = {{offset}}, + .wcet = {{wcet}}, + .period = {{period}}, + .deadline = {{deadline}}, + .periodical = {{periodical}}, + }, +{{/elem}} +}; +const int {{name}}_length = sizeof({{name}}) / sizeof({{type}}); +{{/data}} {{#executions}} int executions = 500; {{/executions}}