Skip to content

Commit e5045d2

Browse files
committed
Fix mistakes in README
1 parent 1750c6c commit e5045d2

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

examples/template/README.md

+13-14
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ Template objects enables developers to describe how ARXML elements should be cre
88
Think of it like recipes for ARXML elements.
99
Most importantly it allows us to describe the dependencies between elements. This helps greatly when working in large scale projects with multiple developers.
1010

11-
To assist with their creation, a template factory (see [factory.py](demo_system/factory.py)) needs to written by an experienced developer. New elements are then declared by calling on
12-
the various factory methods. For example, a relatively complex data type can now be declared using a single line of Python code (see [datatype.py](demo_system/datatype.py)).
11+
To assist with their creation, a template factory (see [factory.py](demo_system/factory.py)) needs to be written. New template objects are then declared by calling on the various factory methods. For example, a relatively complex data type can now be declared using a single line of Python code (see [datatype.py](demo_system/datatype.py)).
1312

1413
## Namespaces
1514

@@ -21,33 +20,33 @@ In short, namespaces handles the creation of packages while templates handles th
2120

2221
### Applying templates
2322

24-
Templates are applied to a workspace using the `Workspace.apply` method.
23+
Templates are applied in a workspace using the `Workspace.apply` method.
2524
In general, applying template objects requires 4 steps.
2625

27-
1. Create an empty workspace object.
26+
1. Create an empty workspace.
2827
2. In the workspace, create one or more namespaces (a default is fine).
29-
3. Call the Workspace.apply method with the template object as argument.
30-
4. Save as ARXML
28+
3. Call the `Workspace.apply` method with the template object as argument.
29+
4. Save the workspace as ARXML
3130

3231
During step 3, Python AUTOSAR not only creates the element itself, it automatically creates all elements
3332
that it depends on (data types, port interfaces, modes etc.).
3433

35-
In the two Python scripts in directory you will see examples how an entire ARXML project is generated from a single line of code:
34+
In the two Python scripts found in this directory you will see examples how an entire ARXML project is generated from a single line of code:
3635

3736
```python
3837
workspace.apply(component.CompositionComponent)
3938
```
4039

41-
This line of code creates all ARXML elements that the CompositionComponent depends on such as:
40+
This will create all ARXML elements that the compositin SWC depends on such as:
4241

4342
- Data types
4443
- Port interfaces
4544
- Constants
4645
- Mode declarations
47-
- SWCs
46+
- inner (or child) SWCs
4847

49-
If you look closely in the examples you will notice that it handles the platform base types differently. Normally, unused elements are skipped but
50-
this step forces the platform types to be created in the project even if they are unused/unreferenced. This is used as to not confuse the toolchain that will read the ARXML files later.
48+
If you look closely in the examples you will notice that it handles the platform types differently. Normally, unused elements are skipped but
49+
this special step forces them to be generated in the project even if they are unused/unreferenced. This is used as to not confuse the toolchain that will read the ARXML files later.
5150

5251
## Generation with config
5352

@@ -58,12 +57,12 @@ For a full example, see [generate_xml_using_config.py](generate_xml_using_config
5857

5958
## Generation without config
6059

61-
It is possible to accomplish the same result without using a config file. It requires a bit more code setting up the workspace.
62-
See [generate_xml_withouf_config.py](generate_xml_without_config.py) for a full example.
60+
It's possible to accomplish the same result without using a config file. It requires a bit more code setting up the workspace.
61+
See [generate_xml_without_config.py](generate_xml_without_config.py) for a full example of that.
6362

6463
## Advantages and disadvantages using template objects
6564

66-
It's recommended to use templates in medium to large projects that has multiple team members.
65+
It's recommended to use template objects in medium to large projects that has multiple team members.
6766

6867
Advantages:
6968

examples/template/demo_system/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ This folder contains an example which demonstrates how the template mechanism is
55
## Software layers
66

77
This example uses 3 layers. At the bottom we have the Python AUTOSAR XML API (This git repo).
8-
The Factory layer enables an easy way to create commonly used elements such as data types and port-interfaces.
8+
The [Factory](factory.py) layer enables an easy way to create commonly used elements such as data types and port-interfaces.
99
It acts like an abstraction layer, hiding most of the low-level details seen in the Python AUTOSAR XML API.
1010

11-
| Template elements |
12-
| Factory |
13-
| Python AUTODSAR |
11+
1. Template element layer
12+
2. Factory layer
13+
3. Python AUTOSAR XML layer
1414

1515
## components
1616

17-
The file components.py contains 3 example SWCs:
17+
The file [component.py](component.py) contains 3 example SWCs:
1818

1919
- ReceiverComponent (ApplicationSoftwareComponentType)
2020
- TimerComponent (ApplicationSoftwareComponentType)
2121
- CompositionComponent (CompositionSwComponentType)
2222

23-
The composition "CompositionComponent" contains the two application SWCs and create some connectors between them.
23+
The composition "CompositionComponent" wraps the two application SWCs and create some connectors between them.
2424
The component TimerComponent provides a timer API (Client-server-interface) that the ReceiverComponent uses.

0 commit comments

Comments
 (0)