From 115cb4d57c6dece776c6548ee9479b71a7325a21 Mon Sep 17 00:00:00 2001 From: Tobias Langer Date: Thu, 6 Oct 2016 13:54:22 +0200 Subject: [PATCH] Fixed implementation of data arrays. --- template/defines.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) 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}} -- libgit2 0.26.0