Difference between revisions of "Kazoo skeletons and glue templates"
Kgrochowski (talk | contribs) |
Kgrochowski (talk | contribs) |
||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
Skeleton code templates are stored in <code>templates/skeletons</code> kazoo subdirectory, glue code templates are stored in <code>templates/glue/language_wrappers</code> kazoo subdirectory. | Skeleton code templates are stored in <code>templates/skeletons</code> kazoo subdirectory, glue code templates are stored in <code>templates/glue/language_wrappers</code> kazoo subdirectory. | ||
− | === makefile.tmplt === | + | For glue code templates replace <code>templates/skeletons</code> with <code>templates/glue/language_wrappers</code> in list below. |
+ | |||
+ | === templates/skeletons/makefile.tmplt === | ||
This template is present only in code skeleton templates directory. | This template is present only in code skeleton templates directory. | ||
This template is evaluated only once per system. The output is saved to the Makefile within output directory. | This template is evaluated only once per system. The output is saved to the Makefile within output directory. | ||
+ | {| class="wikitable" | ||
+ | !Parameter name | ||
+ | !Description | ||
+ | |- | ||
+ | |Function_Names | ||
+ | |Combined table: list of fuction names... | ||
+ | |- | ||
+ | |Language | ||
+ | |... and corresponding implementation language | ||
+ | |- | ||
+ | |Is_Type | ||
+ | |... and flag if it is a function type | ||
+ | |- | ||
+ | |Has_Context_Param | ||
+ | |... and flag to indicate if function has context parameters | ||
+ | |- | ||
+ | |CP_Files | ||
+ | |List of all context parameters ASN.1 files | ||
+ | |- | ||
+ | |Unique_Languages | ||
+ | |List of all languages used in the system | ||
+ | |- | ||
+ | |ASN1_Files | ||
+ | |List of all ASN.1 files | ||
+ | |- | ||
+ | |ACN_Files | ||
+ | |List of all ACN files | ||
+ | |- | ||
+ | |ASN1_Modules | ||
+ | |List of all ASN.1 modules | ||
+ | |} | ||
− | === context-parameters.tmplt === | + | === templates/skeletons/context-parameters.tmplt === |
This template is present only in code skeleton templates directory. | This template is present only in code skeleton templates directory. | ||
This template is evaluated once for every function which has context parameters. The output is saved to the file Context-<function name>.asn | This template is evaluated once for every function which has context parameters. The output is saved to the file Context-<function name>.asn | ||
Line 36: | Line 69: | ||
|} | |} | ||
− | === | + | === templates/skeletons/sub/makefile.tmplt === |
− | This template is processed when Makefile file name returned by [[# | + | This template is processed when Makefile file name returned by [[#templates/skeletons/sub/makefile-filename.tmplt|Makefile name template]] is not empty. |
The output of this template is saved using selected file name in directory <code><functionname>/<languagename></code> | The output of this template is saved using selected file name in directory <code><functionname>/<languagename></code> | ||
Line 72: | Line 105: | ||
|} | |} | ||
− | === | + | === templates/skeletons/sub/trigger.tmplt === |
This template is evaluated to check if other files from given directory should be processed. | This template is evaluated to check if other files from given directory should be processed. | ||
If the result of evaluation is equal to "TRUE", then other files will be processed. | If the result of evaluation is equal to "TRUE", then other files will be processed. | ||
Line 211: | Line 244: | ||
|} | |} | ||
− | === | + | === templates/skeletons/sub/makefile-filename.tmplt === |
− | This file is optional, if it exists the result of processing is a file name for the output of [[#makefile.tmplt|Makefile template]], otherwise file name will be empty. | + | This file is optional, if it exists the result of processing is a file name for the output of [[#templates/skeletons/sub/makefile.tmplt|Makefile template]], otherwise file name will be empty. |
{| class="wikitable" | {| class="wikitable" | ||
!Parameter name | !Parameter name | ||
Line 221: | Line 254: | ||
|} | |} | ||
− | === | + | === templates/skeletons/sub/function-filename.tmplt === |
− | This file is optional, if it exists the result of processing is a file name for the output of [[# | + | This file is optional, if it exists the result of processing is a file name for the output of [[#templates/skeletons/sub/function.tmplt|function template]], otherwise file name will be empty. |
{| class="wikitable" | {| class="wikitable" | ||
!Parameter name | !Parameter name | ||
Line 231: | Line 264: | ||
|} | |} | ||
− | === | + | === templates/skeletons/sub/interface.tmplt === |
− | This file is processed for each required and provided interfaces of the function. Results of processing are passed to [[# | + | This file is processed for each required and provided interfaces of the function. Results of processing are passed to [[#templates/skeletons/sub/function.tmplt|function template]]. |
{| class="wikitable" | {| class="wikitable" | ||
!Parameter name | !Parameter name | ||
Line 301: | Line 334: | ||
|} | |} | ||
− | === | + | === templates/skeletons/sub/function.tmplt === |
− | + | This template is processed when function-filename.tmplt exists. | |
+ | The output of this template is save to the file with name returned by processing function-filename.tmplt in directory [functionname]/[languagename]/src. | ||
+ | {| class="wikitable" | ||
+ | !Parameter name | ||
+ | !Description | ||
+ | |- | ||
+ | |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) | ||
+ | |- | ||
+ | |List_Of_Sync_PIs | ||
+ | |List of synchronous Provided Interfaces | ||
+ | |- | ||
+ | |List_Of_Sync_RIs | ||
+ | |List of synchronous Required Interfaces | ||
+ | |- | ||
+ | |List_Of_ASync_PIs | ||
+ | |List of asynchronous Provided Interfaces | ||
+ | |- | ||
+ | |List_Of_ASync_RIs | ||
+ | |List of asynchronous Required Interfaces | ||
+ | |- | ||
+ | |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 | ||
+ | |} |
Latest revision as of 15:31, 13 December 2019
This page lists all files present in each code skeleton and glue templates. For each file it's parameters are described. Templates are processed according to code skeletons and glue code generation algorithms.
Skeleton code templates are stored in templates/skeletons
kazoo subdirectory, glue code templates are stored in templates/glue/language_wrappers
kazoo subdirectory.
For glue code templates replace templates/skeletons
with templates/glue/language_wrappers
in list below.
Contents
- 1 templates/skeletons/makefile.tmplt
- 2 templates/skeletons/context-parameters.tmplt
- 3 templates/skeletons/sub/makefile.tmplt
- 4 templates/skeletons/sub/trigger.tmplt
- 5 templates/skeletons/sub/makefile-filename.tmplt
- 6 templates/skeletons/sub/function-filename.tmplt
- 7 templates/skeletons/sub/interface.tmplt
- 8 templates/skeletons/sub/function.tmplt
templates/skeletons/makefile.tmplt
This template is present only in code skeleton templates directory. This template is evaluated only once per system. The output is saved to the Makefile within output directory.
Parameter name | Description |
---|---|
Function_Names | Combined table: list of fuction names... |
Language | ... and corresponding implementation language |
Is_Type | ... and flag if it is a function type |
Has_Context_Param | ... and flag to indicate if function has context parameters |
CP_Files | List of all context parameters ASN.1 files |
Unique_Languages | List of all languages used in the system |
ASN1_Files | List of all ASN.1 files |
ACN_Files | List of all ACN files |
ASN1_Modules | List of all ASN.1 modules |
templates/skeletons/context-parameters.tmplt
This template is present only in code skeleton templates directory. This template is evaluated once for every function which has context parameters. The output is saved to the file Context-<function name>.asn
Parameter name | Description |
---|---|
Name | Function name |
Sort_Set | Set of types used for this Context Parameter file |
Module_Set | ... corresponding module (needed for ASN.1 "IMPORTS") |
CP_Name | Table of context parameter names |
CP_Sort | ... corresponding ASN.1 type |
CP_ASN1_Module | ... in ASN.1 module |
CP_Value | ... with default value |
templates/skeletons/sub/makefile.tmplt
This template is processed when Makefile file name returned by Makefile name template is not empty.
The output of this template is saved using selected file name in directory <functionname>/<languagename>
Parameter name | Description |
---|---|
Function_Names | Combined table: list of function names... |
Language | ... and corresponding implementation language |
Is_Type | ... and flag if it is a function type |
Has_Context_Param | ... and flag to indicate if function has context parameters |
CP_Files | List of all context parameters ASN.1 files |
Unique_Languages | List of all languages used in the system |
ASN1_Files | List of all ASN.1 files |
ACN_Files | List of all ACN files |
ASN1_Modules | List of all ASN.1 modules |
templates/skeletons/sub/trigger.tmplt
This template is evaluated to check if other files from given directory should be processed. If the result of evaluation is equal to "TRUE", then other files will be processed. This template is identical for Skeleton and Glue subfolders.
Parameter name | Description |
---|---|
Name | The name of the function |
Is_Type | True if function type |
Instance_Of | Name of instance or empty string |
Language | Implementation language for the function |
Filename_Is_Present | True if target function output already exists |
Makefile_Is_Present | True if target build script already exists |
Zip_File | Optional path to zip file |
Use_POHIC | Command line configuration |
Deployment_View | DOCUMENTATION MISSING |
Interface_View | DOCUMENTATION MISSING |
Binary_Path | DOCUMENTATION MISSING |
Output_Dir | DOCUMENTATION MISSING |
Skeletons | DOCUMENTATION MISSING |
List_Of_PIs | DOCUMENTATION MISSING |
ASync_PI_Param_Name | DOCUMENTATION MISSING |
Data_View | DOCUMENTATION MISSING |
List_Of_ASync_PIs | DOCUMENTATION MISSING |
List_Of_RIs | DOCUMENTATION MISSING |
ASync_RI_Param_Type | DOCUMENTATION MISSING |
Property_Values | DOCUMENTATION MISSING |
CP_Names | DOCUMENTATION MISSING |
Timers | DOCUMENTATION MISSING |
List_Of_ASync_RIs | DOCUMENTATION MISSING |
RIs_Have_Params | DOCUMENTATION MISSING |
CP_Types | DOCUMENTATION MISSING |
CP_Asn1Modules | DOCUMENTATION MISSING |
Async_RIs_Parent | DOCUMENTATION MISSING |
Sync_RIs_Parent | DOCUMENTATION MISSING |
Other_Files | DOCUMENTATION MISSING |
ASync_RI_Param_Name | DOCUMENTATION MISSING |
Debug_Flag | DOCUMENTATION MISSING |
Timer_Resolution | DOCUMENTATION MISSING |
List_Of_Sync_RIs | DOCUMENTATION MISSING |
Glue | DOCUMENTATION MISSING |
CP_Values | DOCUMENTATION MISSING |
Property_Names | DOCUMENTATION MISSING |
List_Of_Sync_PIs | DOCUMENTATION MISSING |
Has_Context | DOCUMENTATION MISSING |
Check_Data_View | DOCUMENTATION MISSING |
PIs_Have_Params | DOCUMENTATION MISSING |
CP_Asn1Filenames | DOCUMENTATION MISSING |
ASync_PI_Param_Type | DOCUMENTATION MISSING |
No_Stdlib_Flag | DOCUMENTATION MISSING |
templates/skeletons/sub/makefile-filename.tmplt
This file is optional, if it exists the result of processing is a file name for the output of Makefile template, otherwise file name will be empty.
Parameter name | Description |
---|---|
Name | The name of the function |
templates/skeletons/sub/function-filename.tmplt
This file is optional, if it exists the result of processing is a file name for the output of function template, otherwise file name will be empty.
Parameter name | Description |
---|---|
Name | The name of the function |
templates/skeletons/sub/interface.tmplt
This file is processed for each required and provided interfaces of the function. Results of processing are passed to function template.
Parameter name | Description |
---|---|
Name | The name of the interface |
Direction | "PI" or "RI" |
Kind | The RCM Kind |
Parent_Function | The name of the function |
Language | The implementation language of the function |
Property_Names | All AADL properties (names) associated to the function |
Property_Values | ... and corresponding values |
Param_Names | List of parameter names |
Param_Types | _ Corresponding parameter types |
Param_Directions | _ Corresponding direction |
Param_Encodings | _ Corresponding ASN.1 encoding |
Is_Timer | Flag set to true if this is a timer interface |
Period | Property of the interface |
WCET | Property of the interface |
Queue_Size | Property of the interface |
IF_Property_Names | and Values User-defined properties (vector tag) |
Remote_Languages | DOCUMENTATION MISSING |
Param_ASN1_Modules | DOCUMENTATION MISSING |
IF_Property_Values | DOCUMENTATION MISSING |
Remote_Interface_Names | DOCUMENTATION MISSING |
Remote_Function_Names | DOCUMENTATION MISSING |
templates/skeletons/sub/function.tmplt
This template is processed when function-filename.tmplt exists. The output of this template is save to the file with name returned by processing function-filename.tmplt in directory [functionname]/[languagename]/src.
Parameter name | Description |
---|---|
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) |
List_Of_Sync_PIs | List of synchronous Provided Interfaces |
List_Of_Sync_RIs | List of synchronous Required Interfaces |
List_Of_ASync_PIs | List of asynchronous Provided Interfaces |
List_Of_ASync_RIs | List of asynchronous Required Interfaces |
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 |