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

Add templates ASCII documentation

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