Commit 6fac0441 authored by Maxime Perrotin's avatar Maxime Perrotin

Start templates for glue code

parent c3293307
......@@ -36,6 +36,20 @@
void init_@_LOWER:Name_@()
{
static bool init = false;
if (!init) {
init = true;
@@IF@@ @_Language_@ /= "Ada" and @_Language_@ /= "QGenAda" and @_Language_@ /= "QGenC" and @_Language_@ /= "SDL"
// Call user code startup function
@_LOWER:Name_@_startup();
@@END_IF@@
// Now we must iterate over all synchronous RIs, and call their parent's
// init function. Multiple calls are prevented by the "init" guard
// TODO, we miss a tag giving the parent function of Sync RI
}
}
@@TABLE@@
......
......@@ -33,6 +33,12 @@
* DO NOT EDIT THIS FILE, IT WILL BE OVERWRITTEN DURING THE BUILD
*/
/* The purpose of this file is to provide a wrapper around the user code,
* with a single interface that is independent of the implementation language
* of the function. The parameters of each PI are blackboxes encoded
* in the form specified in the interface view (Native, uPER, or ACN)
*/
#pragma once
#ifdef __unix__
......@@ -49,6 +55,16 @@ extern "C" {
// C_ASN1_Types contains the signatures for ASN.1 Encoding/Decoding
#include "C_ASN1_Types.h"
@@IF@@ @_Language_@ = "C" or @_Language_@ = "CPP"
#include "@_LOWER:Name_@.h"
@@ELSE_IF@@ @_Language_@ = "GUI"
#include "@_LOWER:Name_@_gui_header.h" // Mmmh?
@@ELSE_IF@@ @_Language_@ = "RTDS"
#include "glue_@_LOWER:Name_@.h"
@@ELSE_IF@@ @_Language_@ = "MicroPython"
#include "@_LOWER:Name_@_mpy_bindings.h"
@@END_IF@@
// Function initialization - calls user startup code of all dependent functions
void init_@_LOWER:Name_@();
......
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 to comment