Commit 8be152db authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add templates ASCII documentation

parent d780fd94
......@@ -5,11 +5,12 @@ all:
cd ../test/test-cv && kazoo --doc -o ../../doc/tmp --gw -g --glue && mv ../../doc/tmp/Dump/Doc/* ../../doc/new-templates
mkdir -p preprocess
cp templates/templates_from_wiki preprocess # copy the previous one
rm templates/* # delete the old templates
mv templates/templates_from_wiki templates/templates_from_wiki.old # delete the old templates
$(MAKE) -C preprocess
cp preprocess/output/order.txt .
./kazoo-merge-doc.py
rm -rf tmp new-templates preprocess/output
./to_html.sh
clean:
rm -rf preprocess/output/*
......
......@@ -7,8 +7,8 @@
It is part of kazoo - TASTE Project
Copyright (c) 2019 Maxime Perrotin
(c) 2019 European Space Agency
Copyright (c) 2019-2020 Maxime Perrotin
(c) 2019-2020 European Space Agency
Contact : maxime.perrotin@esa.int
"""
......@@ -184,6 +184,10 @@ def run(options):
for each in orderlist:
filename=each.strip()
name=filename.replace("/", "_").replace("-", "_").split(".tmplt")[0]
# Also generate individual files for pandoc text rendering
split_output = open (result_folder + f"/{name}.split", "w")
middle_file = f"{result_folder}/{name}"
pre_file = f"{middle_file}.pre"
post_file = f"{middle_file}.post"
......@@ -196,11 +200,14 @@ def run(options):
pass
else:
wiki_output.write(f"\n=== {filename} ===\n")
split_output.write(f"\n=== {filename} ===\n")
pre_content = open(pre_file, "r").readlines()
middle_content = open(middle_file, "r").readlines()
post_content = open(post_file, "r").readlines()
for lines in chain(pre_content, middle_content, post_content):
wiki_output.write(lines)
split_output.write(lines)
split_output.close()
# Once the wiki file is generated, delete intermediate files
os.remove(pre_file)
......
......@@ -169,7 +169,10 @@ This template is identical for Skeleton and Glue subfolders.
|DOCUMENTATION MISSING
|-
|Property_Names
|DOCUMENTATION MISSING
|Vector tag: AADL Property name
|-
|Property_Values
| ... corresponding AADL property value
|-
|Skeletons
|DOCUMENTATION MISSING
......@@ -186,9 +189,6 @@ This template is identical for Skeleton and Glue subfolders.
|CP_Asn1Modules
|DOCUMENTATION MISSING
|-
|Property_Values
|DOCUMENTATION MISSING
|-
|Binary_Path
|DOCUMENTATION MISSING
|-
......@@ -412,13 +412,13 @@ This file is processed twice, first time for required interfaces of the function
|List of parameter names
|-
|Param_Types
| |_ Corresponding parameter types
| ... Corresponding parameter types
|-
|Param_Directions
| |_ Corresponding direction
| ... Corresponding direction
|-
|Param_Encodings
| |_ Corresponding ASN.1 encoding
| ... Corresponding ASN.1 encoding
|-
|Is_Timer
|Flag set to true if this is a timer interface
......@@ -554,13 +554,16 @@ This file is processed for every node. The result of this file indicates if the
|Value of command line flag --target=Target
|-
|CPU_Classifier
|DOCUMENTATION MISSING
|AADL CPU Classifier (e.g. ocarina_processors_x86::x86.linux)
|-
|Shared_Types
|List of available component types
|-
|Shared_Lib_Dir
|Folder hosting the shared component types
|-
|Is_Distributed
|True if the system contains at least one bus
|}
=== templates/concurrency_view/sub/thread.tmplt ===
This file is processed for every thread in every partition in every node.
......@@ -593,13 +596,13 @@ This file is processed for every thread in every partition in every node.
|Vector tag: output remote thread list
|-
|Remote_PIs
| |_ Associated PI Name
| ... Associated PI Name
|-
|Remote_PI_Sorts
| |_ Optional param type of the remote thread
| ... Optional param type of the remote thread
|-
|Remote_PI_Modules
| |_ Asn1 module of the optional param type
| ... Asn1 module of the optional param type
|-
|Name
|
......@@ -738,10 +741,10 @@ The result of every evaluation is joined to one string and passed as a parameter
|List of parameter names
|-
|Param_Types
| |_ Corresponding parameter types
| ... Corresponding parameter types
|-
|Param_Directions
| |_ Corresponding direction
| ... Corresponding direction
|-
|Is_Timer
|DOCUMENTATION MISSING
......@@ -889,67 +892,76 @@ This template is evaluated for every block.
|Required interfaces (from ri.tmplt)
|-
|List_Of_PIs
|DOCUMENTATION MISSING
|Complete list of provided interfaces
|-
|List_Of_ASync_RIs
|Vector tag: name of asynchronous RIs
|-
|ASync_RI_Param_Name
| ... corresponding parameter Name
|-
|ASync_RI_Param_Type
|DOCUMENTATION MISSING
| ... corresponding parameter ASN.1 type
|-
|RIs_Have_Params
|DOCUMENTATION MISSING
|-
|List_Of_Sync_RIs
|DOCUMENTATION MISSING
|List of synchronous RIs
|-
|Debug_Flag
|DOCUMENTATION MISSING
|List_Of_ASync_PIs
|Vector tag: name of asynchronous PIs
|-
|ASync_PI_Param_Name
|DOCUMENTATION MISSING
| ... corresponding parameter Name
|-
|ASync_PI_Param_Type
| ... corresponding parameter ASN.1 type
|-
|Timer_Resolution
|DOCUMENTATION MISSING
|-
|Property_Names
|DOCUMENTATION MISSING
|Vector tag: AADL Property name
|-
|Property_Values
| ... corresponding AADL property value
|-
|Skeletons
|DOCUMENTATION MISSING
|Command line flag (--gw)
|-
|Interface_View
|Interface view filename
|-
|ASync_PI_Param_Type
|Binary_Path
|DOCUMENTATION MISSING
|-
|ASync_RI_Param_Name
|DOCUMENTATION MISSING
|CP_Names
|Vector tag: context parameter names
|-
|CP_Asn1Modules
|DOCUMENTATION MISSING
|CP_Values
| ... value
|-
|Property_Values
|DOCUMENTATION MISSING
|CP_Asn1Modules
| ... ASN.1 module
|-
|Binary_Path
|DOCUMENTATION MISSING
|CP_Asn1Filenames
| ... ASN.1 file name
|-
|CP_Values
|DOCUMENTATION MISSING
|CP_Types
| ... Context parameter ASN.1 type
|-
|Deployment_View
|DOCUMENTATION MISSING
|Path/name of Deployment view file
|-
|No_Stdlib_Flag
|DOCUMENTATION MISSING
|-
|List_Of_ASync_PIs
|DOCUMENTATION MISSING
|command line flag --no-stdlib
|-
|Glue
|DOCUMENTATION MISSING
|command line flag --glue
|-
|Partition_Name
|DOCUMENTATION MISSING
|Name of the partition containing this function
|-
|Async_RIs_Parent
|DOCUMENTATION MISSING
......@@ -960,15 +972,9 @@ This template is evaluated for every block.
|Node_Name
|DOCUMENTATION MISSING
|-
|CP_Names
|DOCUMENTATION MISSING
|-
|List_Of_Sync_PIs
|DOCUMENTATION MISSING
|-
|List_Of_ASync_RIs
|DOCUMENTATION MISSING
|-
|Has_Context
|True if function has context parameters
|-
......@@ -978,9 +984,6 @@ This template is evaluated for every block.
|PIs_Have_Params
|DOCUMENTATION MISSING
|-
|CP_Asn1Filenames
|DOCUMENTATION MISSING
|-
|Timers
|DOCUMENTATION MISSING
|-
......@@ -990,9 +993,6 @@ This template is evaluated for every block.
|Use_POHIC
|Value of command line flag --polyorb-hi-c (or -p)
|-
|CP_Types
|DOCUMENTATION MISSING
|-
|Other_Files
|List of AADL files passed to the command line
|-
......@@ -1000,7 +1000,7 @@ This template is evaluated for every block.
|DOCUMENTATION MISSING
|-
|List_Of_RIs
|DOCUMENTATION MISSING
|List of required interface
|-
|Data_View
|Data view filename
......@@ -1020,6 +1020,9 @@ This template is evaluated for every block.
|Instance_Of
|DOCUMENTATION MISSING
|-
|Debug_Flag
|if -g is set in the command line
|-
|Is_Shared_Type
|True if component is an instance of a function in the shared types folder
|}
......@@ -1102,22 +1105,22 @@ This file is evaluated for every partition.
|Vector tag: input ports of the partition
|-
|In_Port_Thread_Name
| |_ corresponding thread inside the partition
| ... corresponding thread inside the partition
|-
|In_Port_Type_Name
| |_ corresponding parameter type name (optional)
| ... corresponding parameter type name (optional)
|-
|Out_Port_Names
|Vector tag: output ports of the partition
|-
|Out_Port_Type_Name
| |_ corresponding parameter type name (optional)
| ... corresponding parameter type name (optional)
|-
|Part_Out_Port_Name
|Vector tag: output ports of the partition (can be several times the same)
|-
|Connected_Threads
| |_ Corresponding thread connected to it
| ... Corresponding thread connected to it
|-
|Block_Instance_Of
|DOCUMENTATION MISSING
......@@ -1222,13 +1225,13 @@ This file is evaluated for every node. The result of this file is saved to the f
|Vector tag: list of virtual processors on this node
|-
|VP_Package_Names
| |_ Corresponding package name
| ... Corresponding package name
|-
|VP_Platforms
| |_ Corresponding platform name
| ... Corresponding platform name
|-
|VP_Classifiers
| |_ Corresponding aadl classifier
| ... Corresponding aadl classifier
|-
|Package_Name
|DOCUMENTATION MISSING
......@@ -1237,7 +1240,7 @@ This file is evaluated for every node. The result of this file is saved to the f
|DOCUMENTATION MISSING
|-
|CPU_Classifier
|DOCUMENTATION MISSING
|AADL CPU Classifier (e.g. ocarina_processors_x86::x86.linux)
|-
|CPU_Name
|DOCUMENTATION MISSING
......@@ -1301,31 +1304,31 @@ filesys.tmplt.
|Vector Tag of node names
|-
|Node_CPU
|Corresponding CPU name (eg x86_linux)
| -> Corresponding CPU name (eg x86_linux)
|-
|Node_CPU_Classifier
|CPU Classifier (ocarina...::x86_linux)
| -> Corresponding CPU Classifier (ocarina...::x86_linux)
|-
|Node_Major_Frame
|Time in milliseconds allocated to the CPU (TSP only)
| -> Corresponding Time in milliseconds allocated to the CPU (TSP only)
|-
|Partition_Names
|Vector Tag of partition names
|-
|Partition_Node
|Corresponding node name
| -> Corresponding node name
|-
|Partition_CPU
|Corresponding CPU name
| -> Corresponding CPU name
|-
|Partition_Duration
|Corresponding time allocation (TSP only)
| -> Corresponding time allocation (TSP only)
|-
|Partition_VP
|Virtual processor binding (TSP only)
| -> Corresponding Virtual processor binding (TSP only)
|-
|Threads
|Code generated for the threads
|Code generated for the threads (from thread.tmplt)
|-
|Thread_Names
|List of all threads in the complete system
......@@ -1337,22 +1340,22 @@ filesys.tmplt.
|Inter-partition connections : partition source name (vector tag)
|-
|Part_Source_Port
| |_ Corresponding port name
| -> Corresponding port name
|-
|Part_Dest_Name
| |_ Corresponding name of the remote partition
| -> Corresponding name of the remote partition
|-
|Part_Dest_Port
| |_ Corresponding name of the port on the remote partition
| -> Corresponding name of the port on the remote partition
|-
|Bus_Names
|Vector tag: busses present in the system
|-
|Bus_AADL_Package
| |_ corresponding AADL Package
| -> Corresponding AADL Package
|-
|Bus_Classifier
| |_ corresponding AADL classifier
| -> Corresponding AADL classifier
|-
|Device_Node_Name
|
......@@ -1390,19 +1393,19 @@ filesys.tmplt.
|List of ASN.1 files/module/type for device configuration with no duplicates (vector tag)
|-
|Unique_Dev_ASN1_Mod
| |_ corresponding asn1 module
| ... corresponding asn1 module
|-
|Unique_Dev_ASN1_Sorts
| |_ type name
| ... type name
|-
|Connect_From_Part
|Vector tag - bus connection: partition source
|-
|Connect_Via_Bus
| |_ bus name
| ... bus name
|-
|Connect_Port_Name
| |_ port name
| ... port name
|-
|Debug_Flag
|DOCUMENTATION MISSING
......@@ -1469,4 +1472,4 @@ filesys.tmplt.
|-
|Used_Shared_Types
|List of actually used shared component types
|}
|}
\ No newline at end of file
templates/concurrency_view/sub/block.tmplt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This template is evaluated for every block.
+-----------------------------------+-----------------------------------+
| Parameter name | Description |
+===================================+===================================+
| Name | Protected block name |
+-----------------------------------+-----------------------------------+
| Language | Implementation language |
+-----------------------------------+-----------------------------------+
| Calling_Threads | List of calling threads |
+-----------------------------------+-----------------------------------+
| Protected_PIs | Protected Provided interfaces |
| | (from pi.tmplt) |
+-----------------------------------+-----------------------------------+
| Unprotected_PIs | Unprotected Provided interfaces |
| | (from pi.tmplt) |
+-----------------------------------+-----------------------------------+
| Required | Required interfaces (from |
| | ri.tmplt) |
+-----------------------------------+-----------------------------------+
| List_Of_PIs | Complete list of provided |
| | interfaces |
+-----------------------------------+-----------------------------------+
| List_Of_ASync_RIs | Vector tag: name of asynchronous |
| | RIs |
+-----------------------------------+-----------------------------------+
| ASync_RI_Param_Name | ... corresponding parameter Name |
+-----------------------------------+-----------------------------------+
| ASync_RI_Param_Type | ... corresponding parameter ASN.1 |
| | type |
+-----------------------------------+-----------------------------------+
| RIs_Have_Params | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| List_Of_Sync_RIs | List of synchronous RIs |
+-----------------------------------+-----------------------------------+
| List_Of_ASync_PIs | Vector tag: name of asynchronous |
| | PIs |
+-----------------------------------+-----------------------------------+
| ASync_PI_Param_Name | ... corresponding parameter Name |
+-----------------------------------+-----------------------------------+
| ASync_PI_Param_Type | ... corresponding parameter ASN.1 |
| | type |
+-----------------------------------+-----------------------------------+
| Timer_Resolution | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Property_Names | Vector tag: AADL Property name |
+-----------------------------------+-----------------------------------+
| Property_Values | ... corresponding AADL property |
| | value |
+-----------------------------------+-----------------------------------+
| Skeletons | Command line flag (--gw) |
+-----------------------------------+-----------------------------------+
| Interface_View | Interface view filename |
+-----------------------------------+-----------------------------------+
| Binary_Path | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| CP_Names | Vector tag: context parameter |
| | names |
+-----------------------------------+-----------------------------------+
| CP_Values | ... value |
+-----------------------------------+-----------------------------------+
| CP_Asn1Modules | ... ASN.1 module |
+-----------------------------------+-----------------------------------+
| CP_Asn1Filenames | ... ASN.1 file name |
+-----------------------------------+-----------------------------------+
| CP_Types | ... Context parameter ASN.1 type |
+-----------------------------------+-----------------------------------+
| Deployment_View | Path/name of Deployment view file |
+-----------------------------------+-----------------------------------+
| No_Stdlib_Flag | command line flag --no-stdlib |
+-----------------------------------+-----------------------------------+
| Glue | command line flag --glue |
+-----------------------------------+-----------------------------------+
| Partition_Name | Name of the partition containing |
| | this function |
+-----------------------------------+-----------------------------------+
| Async_RIs_Parent | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Zip_File | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Node_Name | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| List_Of_Sync_PIs | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Has_Context | True if function has context |
| | parameters |
+-----------------------------------+-----------------------------------+
| Output_Dir | Output folder (by default: work) |
+-----------------------------------+-----------------------------------+
| PIs_Have_Params | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Timers | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Check_Data_View | Value of command line flag |
| | --check-dataview |
+-----------------------------------+-----------------------------------+
| Use_POHIC | Value of command line flag |
| | --polyorb-hi-c (or -p) |
+-----------------------------------+-----------------------------------+
| Other_Files | List of AADL files passed to the |
| | command line |
+-----------------------------------+-----------------------------------+
| Sync_RIs_Parent | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| List_Of_RIs | List of required interface |
+-----------------------------------+-----------------------------------+
| Data_View | Data view filename |
+-----------------------------------+-----------------------------------+
| Target | Value of command line flag |
| | --target=Target |
+-----------------------------------+-----------------------------------+
| Shared_Types | List of available component types |
+-----------------------------------+-----------------------------------+
| Shared_Lib_Dir | Folder hosting the shared |
| | component types |
+-----------------------------------+-----------------------------------+
| Is_Type | True if function is a function |
| | type |
+-----------------------------------+-----------------------------------+
| Instance_Of | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Debug_Flag | if -g is set in the command line |
+-----------------------------------+-----------------------------------+
| Is_Shared_Type | True if component is an instance |
| | of a function in the shared types |
| | folder |
+-----------------------------------+-----------------------------------+
templates/concurrency_view/sub/node.tmplt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file is evaluated for every node. The result of this file is saved
to the file with name returned by filenode.tmplt. The result is also
used as a parameter for system.tmplt.
+-----------------------------------+-----------------------------------+
| Parameter name | Description |
+===================================+===================================+
| Node_Name | Name of the node from deployment |
| | view |
+-----------------------------------+-----------------------------------+
| Partition_Names | Tag listing the partitions in |
| | this node |
+-----------------------------------+-----------------------------------+
| Has_Memory | Boolean flag indicating that a |
| | memory is defined for this node |
+-----------------------------------+-----------------------------------+
| Partitions | List of rendered code for |
| | partitions |
+-----------------------------------+-----------------------------------+
| VP_Names | Vector tag: list of virtual |
| | processors on this node |
+-----------------------------------+-----------------------------------+
| VP_Package_Names | ... Corresponding package name |
+-----------------------------------+-----------------------------------+
| VP_Platforms | ... Corresponding platform name |
+-----------------------------------+-----------------------------------+
| VP_Classifiers | ... Corresponding aadl classifier |
+-----------------------------------+-----------------------------------+
| Package_Name | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| CPU_Family | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| CPU_Classifier | AADL CPU Classifier (e.g. |
| | ocarina_processors_x86::x86.linux |
| | ) |
+-----------------------------------+-----------------------------------+
| CPU_Name | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| CPU_Platform | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Ada_Runtime | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| CPU_Instance | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Device_CPU | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Device_Bus_Name | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Device_AADL_Pkg | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Device_ASN1_Module | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Device_Port_Name | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Device_Config | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Device_Names | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Device_ASN1_File | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+
| Device_Classifier | DOCUMENTATION MISSING |
+-----------------------------------+-----------------------------------+