Commit 17ea198b authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add flag for context parameters

parent 8fefaaaa
......@@ -135,12 +135,14 @@ package body TASTE.Backend.Skeletons is
function Func_Template (F : Taste_Terminal_Function) return Func_As_Template
is
use Interface_Vectors;
use Ctxt_Params;
Result : Func_As_Template;
List_Of_PIs : Tag;
List_Of_RIs : Tag;
begin
Result.Header := +Assoc ("Name", F.Name)
& Assoc ("Language", F.Language'Img);
& Assoc ("Language", Language_Spelling (F))
& Assoc ("Has_Context", (Length (F.Context_Params) > 0));
for Each of F.Provided loop
Result.Provided := Result.Provided & Interface_Template (Each);
List_Of_PIs := List_Of_PIs & Each.Name;
......
@@-- 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)
@@-- @_Has_Context_@ : Flag, True if there are context parameters
......@@ -18,7 +19,7 @@
@@IF@@ @_Has_Context_@
/* Include Context Parameters (constants defined in the Interface View) */
#include "Context-@_REPLACE((_)/(-)):LOWER:Name_@.h"
#include "Context-@_REPLACE((_)/-):LOWER:Name_@.h"
@@END_IF@@
void @_LOWER:Name_@_startup()
......
@@-- 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)
@@-- @_Has_Context_@ : Flag, True if there are context parameters
@@-- @_Provided_Interfaces_@ : List of Provided interfaces with parameters
@@-- @_Required_Interfaces_@ : List of Required interfaces with parameters
/* Header file for function @_Name_@
/* 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_@
* DO NOT EDIT THIS FILE, IT WILL BE OVERWRITTEN DURING THE BUILD
......
......@@ -102,6 +102,23 @@ PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_world.others;
SUBPROGRAM PI_ultimate
FEATURES
some_in : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
some_out : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_ultimate;
SUBPROGRAM IMPLEMENTATION PI_ultimate.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_ultimate.others;
SUBPROGRAM RI_my_final_result
FEATURES
hop : IN PARAMETER DataView::MyInteger {
......@@ -140,21 +157,6 @@ END RI_coucou;
SUBPROGRAM IMPLEMENTATION RI_coucou.others
END RI_coucou.others;
SUBPROGRAM PI_ultimate
FEATURES
some_in : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
some_out : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
END PI_ultimate;
SUBPROGRAM IMPLEMENTATION PI_ultimate.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_ultimate.others;
SYSTEM Nested2_Appear
FEATURES
PI_world : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either::Nested2_Appear::PI_world.others {
......@@ -164,6 +166,13 @@ FEATURES
Taste::Deadline => 0 ms;
Taste::InterfaceName => "world";
};
PI_ultimate : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either::Nested2_Appear::PI_ultimate.others {
Taste::coordinates => "172016 88940";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "ultimate";
};
RI_my_final_result : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Level0_Appear::PI_final_result.others {
Taste::coordinates => "156260 82070";
Taste::RCMoperationKind => any;
......@@ -188,11 +197,6 @@ FEATURES
Taste::InterfaceName => "coucou";
Taste::labelInheritance => "true";
};
PI_ultimate : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either::Nested2_Appear::PI_ultimate.others {
Taste::coordinates => "172016 88940";
Taste::RCMoperationKind => unprotected;
Taste::InterfaceName => "ultimate";
};
PROPERTIES
Source_Language => (Ada);
Taste::Active_Interfaces => any;
......@@ -233,6 +237,23 @@ PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_world.others;
SUBPROGRAM PI_ultimate
FEATURES
some_in : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
some_out : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_ultimate;
SUBPROGRAM IMPLEMENTATION PI_ultimate.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_ultimate.others;
SUBPROGRAM RI_my_final_result
FEATURES
hop : IN PARAMETER DataView::MyInteger {
......@@ -265,21 +286,6 @@ END RI_coucou;
SUBPROGRAM IMPLEMENTATION RI_coucou.others
END RI_coucou.others;
SUBPROGRAM PI_ultimate
FEATURES
some_in : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
some_out : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
END PI_ultimate;
SUBPROGRAM IMPLEMENTATION PI_ultimate.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_ultimate.others;
SYSTEM Should_Not_Appear_Either
FEATURES
PI_world : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either::Nested2_Appear::PI_world.others {
......@@ -289,6 +295,13 @@ FEATURES
Taste::Deadline => 0 ms;
Taste::InterfaceName => "world";
};
PI_ultimate : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either::Nested2_Appear::PI_ultimate.others {
Taste::coordinates => "180952 89689";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "ultimate";
};
RI_my_final_result : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Level0_Appear::PI_final_result.others {
Taste::coordinates => "144855 80895";
Taste::RCMoperationKind => any;
......@@ -307,11 +320,6 @@ FEATURES
Taste::InterfaceName => "coucou";
Taste::labelInheritance => "true";
};
PI_ultimate : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either::Nested2_Appear::PI_ultimate.others {
Taste::coordinates => "180952 89689";
Taste::RCMoperationKind => unprotected;
Taste::InterfaceName => "ultimate";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
......@@ -326,6 +334,9 @@ CONNECTIONS
Nested2_Appear_PI_world_Should_Not_Appear_Either_PI_world : SUBPROGRAM ACCESS Nested2_Appear.PI_world -> PI_world {
Taste::coordinates => "158967 70311 158967 73250 159788 73250 159788 76190";
};
Nested2_Appear_PI_ultimate_Should_Not_Appear_Either_PI_ultimate : SUBPROGRAM ACCESS Nested2_Appear.PI_ultimate -> PI_ultimate {
Taste::coordinates => "180952 89689 176484 89689 176484 88940 172016 88940";
};
Should_Not_Appear_Either_RI_my_final_result_Nested2_Appear_RI_my_final_result : SUBPROGRAM ACCESS RI_my_final_result -> Nested2_Appear.RI_my_final_result {
Taste::coordinates => "156260 82070 150557 82070 150557 80895 144855 80895";
};
......@@ -335,9 +346,6 @@ CONNECTIONS
Should_Not_Appear_Either_RI_coucou_Nested2_Appear_RI_coucou : SUBPROGRAM ACCESS RI_coucou -> Nested2_Appear.RI_coucou {
Taste::coordinates => "160536 91710 160536 93314 154931 93314 154931 95943";
};
Nested2_Appear_PI_ultimate_Should_Not_Appear_Either_PI_ultimate : SUBPROGRAM ACCESS Nested2_Appear.PI_ultimate -> PI_ultimate {
Taste::coordinates => "180952 89689 176484 89689 176484 88940 172016 88940";
};
END Should_Not_Appear_Either.others;
END interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either;
......@@ -383,9 +391,9 @@ PUBLIC
WITH interfaceview::IV::Function1_ShouldNotAppear::Nested1_Appear;
WITH interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either;
WITH interfaceview::IV::Function1_ShouldNotAppear::MotherClass_Appear;
WITH interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either::Nested2_Appear;
WITH interfaceview::IV::Level0_Appear;
WITH interfaceview::IV::Y_Hidden::Z_Shown;
WITH interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either::Nested2_Appear;
WITH Taste;
WITH DataView;
WITH TASTE_IV_Properties;
......@@ -403,6 +411,23 @@ PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_hello.others;
SUBPROGRAM PI_ultimate
FEATURES
some_in : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
some_out : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_ultimate;
SUBPROGRAM IMPLEMENTATION PI_ultimate.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_ultimate.others;
SUBPROGRAM RI_my_final_result
FEATURES
hop : IN PARAMETER DataView::MyInteger {
......@@ -441,21 +466,6 @@ END RI_coucou;
SUBPROGRAM IMPLEMENTATION RI_coucou.others
END RI_coucou.others;
SUBPROGRAM PI_ultimate
FEATURES
some_in : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
some_out : OUT PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
END PI_ultimate;
SUBPROGRAM IMPLEMENTATION PI_ultimate.others
PROPERTIES
Compute_Execution_Time => 0 ms .. 0 ms;
END PI_ultimate.others;
SYSTEM Function1_ShouldNotAppear
FEATURES
PI_hello : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1_ShouldNotAppear::Nested1_Appear::PI_hello.others {
......@@ -465,6 +475,13 @@ FEATURES
Taste::Deadline => 0 ms;
Taste::InterfaceName => "hello";
};
PI_ultimate : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either::Nested2_Appear::PI_ultimate.others {
Taste::coordinates => "182010 86295";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "ultimate";
};
RI_my_final_result : REQUIRES SUBPROGRAM ACCESS interfaceview::IV::Level0_Appear::PI_final_result.others {
Taste::coordinates => "124279 80311";
Taste::RCMoperationKind => any;
......@@ -489,11 +506,6 @@ FEATURES
Taste::InterfaceName => "coucou";
Taste::labelInheritance => "true";
};
PI_ultimate : PROVIDES SUBPROGRAM ACCESS interfaceview::IV::Function1_ShouldNotAppear::Should_Not_Appear_Either::Nested2_Appear::PI_ultimate.others {
Taste::coordinates => "182010 86295";
Taste::RCMoperationKind => unprotected;
Taste::InterfaceName => "ultimate";
};
PROPERTIES
Source_Language => (C);
Taste::Active_Interfaces => any;
......@@ -522,6 +534,9 @@ CONNECTIONS
Function1_ShouldNotAppear_RI_ola_bis_Nested1_Appear_RI_ola_bis : SUBPROGRAM ACCESS RI_ola_bis -> Nested1_Appear.RI_ola_bis {
Taste::coordinates => "140345 66548 140345 84791 124279 84791";
};
Should_Not_Appear_Either_PI_ultimate_Function1_ShouldNotAppear_PI_ultimate : SUBPROGRAM ACCESS Should_Not_Appear_Either.PI_ultimate -> PI_ultimate {
Taste::coordinates => "182010 86295 181481 86295 181481 89689 180952 89689";
};
Function1_ShouldNotAppear_RI_my_final_result_Should_Not_Appear_Either_RI_my_final_result : SUBPROGRAM ACCESS RI_my_final_result -> Should_Not_Appear_Either.RI_my_final_result {
Taste::coordinates => "144855 80895 134567 80895 134567 80311 124279 80311";
};
......@@ -531,9 +546,6 @@ CONNECTIONS
Function1_ShouldNotAppear_RI_coucou_Should_Not_Appear_Either_RI_coucou : SUBPROGRAM ACCESS RI_coucou -> Should_Not_Appear_Either.RI_coucou {
Taste::coordinates => "154931 95943 154931 109383 124279 109383";
};
Should_Not_Appear_Either_PI_ultimate_Function1_ShouldNotAppear_PI_ultimate : SUBPROGRAM ACCESS Should_Not_Appear_Either.PI_ultimate -> PI_ultimate {
Taste::coordinates => "182010 86295 181481 86295 181481 89689 180952 89689";
};
END Function1_ShouldNotAppear.others;
END interfaceview::IV::Function1_ShouldNotAppear;
......@@ -689,6 +701,10 @@ PROPERTIES
END Z_Shown;
SYSTEM IMPLEMENTATION Z_Shown.others
SUBCOMPONENTS
abc : DATA DataView::MyInteger {
Taste::FS_Default_Value => "42";
};
END Z_Shown.others;
END interfaceview::IV::Y_Hidden::Z_Shown;
......@@ -837,6 +853,9 @@ CONNECTIONS
Function1_ShouldNotAppear_PI_hello_Level0_Appear_RI_I_say_hello : SUBPROGRAM ACCESS Function1_ShouldNotAppear.PI_hello -> Level0_Appear.RI_I_say_hello {
Taste::coordinates => "99353 67961 111816 67961 111816 55614 124279 55614";
};
Function1_ShouldNotAppear_PI_ultimate_Y_Hidden_RI_ultimate : SUBPROGRAM ACCESS Function1_ShouldNotAppear.PI_ultimate -> Y_Hidden.RI_ultimate {
Taste::coordinates => "109817 109027 192028 109027 192028 86295 182010 86295";
};
Level0_Appear_PI_final_result_Function1_ShouldNotAppear_RI_my_final_result : SUBPROGRAM ACCESS Level0_Appear.PI_final_result -> Function1_ShouldNotAppear.RI_my_final_result {
Taste::coordinates => "124279 80311 111816 80311 111816 83249 99353 83249";
};
......@@ -849,9 +868,6 @@ CONNECTIONS
Y_Hidden_PI_coucou_Function1_ShouldNotAppear_RI_coucou : SUBPROGRAM ACCESS Y_Hidden.PI_coucou -> Function1_ShouldNotAppear.RI_coucou {
Taste::coordinates => "124279 109383 117277 109383 117277 111577 109817 111577";
};
Function1_ShouldNotAppear_PI_ultimate_Y_Hidden_RI_ultimate : SUBPROGRAM ACCESS Function1_ShouldNotAppear.PI_ultimate -> Y_Hidden.RI_ultimate {
Taste::coordinates => "109817 109027 192028 109027 192028 86295 182010 86295";
};
Level0_Appear_PI_final_result_Y_Hidden_RI_final_result : SUBPROGRAM ACCESS Level0_Appear.PI_final_result -> Y_Hidden.RI_final_result {
Taste::coordinates => "97583 95002 97583 89358 102151 89358 102151 83249 99353 83249";
};
......
Supports Markdown
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