function.tmplt 3.29 KB
Newer Older
1
2
3
4
5
6
@@-- The following tags are available in this template:
@@--
@@-- @_Name_@                : The name of the function
@@-- @_Language_@            : The implementation language
@@-- @_List_Of_PIs_@         : List of all Provided Interfaces (just names)
@@-- @_List_Of_RIs_@         : List of all Required Interfaces (just names)
7
8
9
10
11
12
@@-- @_List_Of_Sync_PIs_@    : List of synchronous Provided Interfaces
@@-- @_List_Of_Sync_RIs_@    : List of synchronous Required Interfaces
@@-- @_Sync_RIs_Parent_@     : ... and corresponding Parent function name
@@-- @_List_Of_ASync_PIs_@   : List of asynchronous Provided Interfaces
@@-- @_List_Of_ASync_RIs_@   : List of asynchronous Required Interfaces
@@-- @_Async_RIs_Parent_@    : ... and corresponding Parent function name
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@@-- @_ASN1_Modules_@        : List of ASN.1 Modules names
@@-- @_ASN1_Files_@          : List of ASN.1 Files with path
@@-- @_Timers_@              : List of timers (just names)
@@-- @_Has_Context_@         : Flag, True if there are context parameters
@@-- @_CP_Names_@            : List of Context Parameter names
@@-- @_CP_Types_@            : List of Context Parameter types
@@-- @_Provided_Interfaces_@ : From template: Provided interfaces with params
@@-- @_Required_Interfaces_@ : From template: Required interfaces with params
@@-- @_Property_Names_@      : List of User-defined properties (names)
@@-- @_Property_Values_@     : List of User-defined properties (values)
@@-- @_Is_Type_@             : Flag, True if function is a component type
@@-- @_Instance_Of_@         : Optional name of component type
/* Header file for function @_Name_@ in @_Language_@ language
 * Generated by TASTE on @_NOW_@
 * Context Parameters present : @_YES_NO:Has_Context_@
 * Provided interfaces : @_List_Of_PIs_@
 * Required interfaces : @_List_Of_RIs_@
 * User-defined properties for this function:
@@TABLE@@
  *  |_ @_Property_Names_@ = @_Property_Values_@
@@END_TABLE@@
 * DO NOT EDIT THIS FILE, IT WILL BE OVERWRITTEN DURING THE BUILD
 */

37
38
39
40
41
42
/* 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)
*/

43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once

#ifdef __unix__
   #include <stdlib.h>
   #include <stdio.h>
#else
   typedef unsigned size_t;
#endif

#ifdef __cplusplus
extern "C" {
#endif

// C_ASN1_Types contains the signatures for ASN.1 Encoding/Decoding
57
//#include "C_ASN1_Types.h"
58

59
60
@@IF@@ @_Language_@ = "C" or @_Language_@ = "CPP"
#include "@_LOWER:Name_@.h"
Maxime Perrotin's avatar
Maxime Perrotin committed
61
@@ELSIF@@ @_Language_@ = "GUI"
62
#include "@_LOWER:Name_@_gui_header.h"    // Mmmh?
Maxime Perrotin's avatar
Maxime Perrotin committed
63
@@ELSIF@@ @_Language_@ = "RTDS"
64
#include "glue_@_LOWER:Name_@.h"
Maxime Perrotin's avatar
Maxime Perrotin committed
65
@@ELSIF@@ @_Language_@ = "MicroPython"
66
67
68
#include "@_LOWER:Name_@_mpy_bindings.h"
@@END_IF@@

69
70
71
72
73
74
75
// Function initialization - calls user startup code of all dependent functions
void init_@_LOWER:Name_@();

@@IF@@ @_Language_@ = "Ada" or @_Language_@ = "QGenAda"
extern void adainit();
@@END_IF@@

76
@@IF@@ @_EXIST:Provided_Interfaces_@ and @_Language_@ /= "Blackbox_C"
77
78
79
80
/* Provided interfaces */
@@TABLE@@
@_Provided_Interfaces_@
@@END_TABLE@@
81
@@END_IF@@
82

83
@@IF@@ @_EXIST:Required_Interfaces_@
84
85
86
87
/* Required interfaces */
@@TABLE@@
@_Required_Interfaces_@
@@END_TABLE@@
88
@@END_IF@@
89
90
91
92

#ifdef __cplusplus
}
#endif