Skip to content

Commit d671234

Browse files
Doc updates for 2.0
1 parent 4cd04e3 commit d671234

37 files changed

Lines changed: 142 additions & 39 deletions

docs-sources/assets/art-debug.png

25.4 KB
Loading

docs-sources/assets/art-lang.png

-54.9 KB
Loading

docs-sources/assets/diagrams.png

-30.8 KB
Loading
-11.8 KB
Binary file not shown.

docs-sources/building/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ The context menu of a TC provides a few useful commands that automate some of th
2626
This command first generates C++ code and a make file for the TC, and then runs the make tool on the generated make file. Note, however, that this command does not set the TC as active. If you plan to change code snippets in generated code you must set the TC as active yourself.
2727

2828
* **Run**
29-
First builds the TC, and then attempts to launch the executable that is produced. The executable is launched in a non-debug mode by specifying the launch argument `-URTS_DEBUG=quit`. If you instead want to launch the executable for debugging it you can go to the Terminal and manually launch it from there without any extra arguments. Note that if your TC creates a library rather than an executable, then this command will still build the TC, but will then give an error message since there is no executable to run.
29+
First builds the TC, and then attempts to launch the executable that is produced. The executable is launched in a non-debug mode by specifying the launch argument `-URTS_DEBUG=quit`. If you want to launch the executable in a different way, for example with different command-line arguments, you can go to the Terminal and manually launch it from there. Note that if your TC creates a library rather than an executable, then this command will still build the TC, but will then give an error message since there is no executable to run.
3030

3131
!!! note
32-
For a more flexible way of launching a built executable, consider using a [launch configuration](launch-configurations.md).
32+
For a more flexible way of launching a built executable, either for running or debugging it, use a [launch configuration](../running-and-debugging/launch-configurations.md).
3333

3434
* **Clean**
3535
Removes the target workspace folder produced when building a TC. This means that all generated C++ code, the make file, as well as any produced binaries will be removed. If you only want to remove the binaries you can instead go to the Terminal and invoke `make clean` to clean using the make file.
@@ -41,7 +41,7 @@ If you build a TC and at least one error exists in the TC itself, in prerequisit
4141
Use the setting [`code-rt.build.cancelOnError`](../settings.md#cancel-on-error) to suppress this dialog.
4242

4343
## Building and Running without a TC
44-
In some cases of rapid prototyping and testing you may want to quickly build and run a capsule without first having to create a TC or a [launch configuration](launch-configurations.md). Then you can click the "Run" link that appears just before any capsule in the Art text editor.
44+
In some cases of rapid prototyping and testing you may want to quickly build and run a capsule without first having to create a TC or a [launch configuration](../running-and-debugging/launch-configurations.md). Then you can click the "Run" link that appears just before any capsule in the Art text editor.
4545

4646
![](images/running-without-tc.png)
4747

-4.43 KB
Binary file not shown.
-1.88 KB
Binary file not shown.

docs-sources/debugging/index.md renamed to docs-sources/running-and-debugging/debugging.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ There are two ways how you can start a new debug session.
2121
1. [Launch](#launch) your application and start to debug it
2222
2. [Attach](#attach) the debugger to an application that has already been launched
2323

24-
In both cases you need to start by creating a [launch configuration](../building/launch-configurations.md).
24+
In both cases you need to start by creating a [launch configuration](launch-configurations.md).
2525

2626
### Launch
27-
To launch your application and start to debug it use a [launch configuration](../building/launch-configurations.md) where the [request](../building/launch-configurations.md#request) attribute is set to "launch".
27+
To launch your application and start to debug it use a [launch configuration](launch-configurations.md) where the [request](launch-configurations.md#request) attribute is set to "launch".
2828

2929
```json
3030
"configurations": [
@@ -39,19 +39,19 @@ To launch your application and start to debug it use a [launch configuration](..
3939

4040
Then perform the command **Start Debugging** (++"F5"++).
4141

42-
As soon as the application has launched the Art Debugger will attach to it and pause the execution before the top capsule has been incarnated. The "Run and Debug" view then looks like this:
42+
As soon as the application has launched the Art Debugger will attach to it and pause the execution before the top capsule has been incarnated. The "Art Debug" view then looks like this:
4343

4444
![](images/initially_suspended.png)
4545

46-
Perform the command **Continue** (++"F5"++) to resume execution of the application.
46+
Perform the command **Continue** (++"F5"++) to resume execution of the application. You can then [view the application run-time structure](#application-runtime-structure).
4747

4848
### Attach
4949
Sometimes it's not feasible to launch the application to debug. For example
5050

5151
- you may not want to debug the application from the beginning, but start when it has already executed for some time
5252
- you may want to run the application on a different machine and debug it remotely
5353

54-
In this case your [launch configuration](../building/launch-configurations.md) should have the [request](../building/launch-configurations.md#request) attribute set to "attach".
54+
In this case your [launch configuration](launch-configurations.md) should have the [request](launch-configurations.md#request) attribute set to "attach".
5555

5656
```json
5757
"configurations": [
@@ -75,7 +75,7 @@ Before you perform the command **Start Debugging** (++"F5"++) the application mu
7575
```
7676
*Start the application without initially pausing the execution. Later a debug session can start by attaching the Art Debugger on the debug port 3652.*
7777

78-
If you start the application on a different machine than where {$product.name$} runs, then your launch configuration must set the [hostname](../building/launch-configurations.md#hostname) attribute to the IP address of that machine.
78+
If you start the application on a different machine than where {$product.name$} runs, then your launch configuration must set the [hostname](launch-configurations.md#hostname) attribute to the IP address of that machine.
7979

8080
## Debug Toolbar
8181
The debug toolbar appears as soon as the Art Debugger has launched or attached to an application to be debugged.
@@ -108,9 +108,9 @@ If a part has non-single multiplicity it can contain multiple capsule instances
108108

109109
![](images/part_multiplicity.png)
110110

111-
Note that capsule instances can reside at any index that is valid according to the multiplicity of the part, and there can be "gaps". In the example above the part `c2` has multiplicity 5 (this can only be seen in the Art file, not in the Art Debug view) and it contains 3 capsule instances at indices 0, 1 and 4.
111+
Note that capsule instances can reside at any index that is valid according to the multiplicity of the part, and there can be "gaps". In the example above the part `c2` has multiplicity 5 (this can only be seen in the Art file, not in the Art Debug view) and it contains 3 capsule instances at indices 0, 1 and 4. There are no capsule instances at index 2 and 3.
112112

113-
Also note that the capsule that is shown within square brackets for a capsule instance is its runtime type, which can be different from the part's type, but must be compatible with it. In the example above the capsule instance at index 4 has the type `Csub` while other instances have the type `C`. This can for example mean that the part `c3` is typed by the capsule `C` and that `Csub` is a capsule that inherits from `C`.
113+
Also note that the capsule that is shown within square brackets for a capsule instance is its runtime type, which can be different from the part's type, but must be compatible with it. In the example above the capsule instance at index 4 has the type `Csub` while other instances have the type `C`. This can for example mean that the part `c2` is typed by the capsule `C` and that `Csub` is a capsule that inherits from `C`.
114114

115115
## Send Event
116116
You can send an event by clicking the **Send Event** arrow that appears when you hover the mouse over a port in the Art Debug view.
@@ -128,11 +128,11 @@ If you choose to send an event with a data parameter, another popup appears wher
128128
Data values are entered by using their ASCII encodings. See [Default Encoding/Decoding Rules](../target-rts/encoding-decoding.md#default-encodingdecoding-rules) to learn what the default encodings look like. Some common examples are listed below:
129129

130130
* `5`, `-14` : Integer value
131-
* `0`, `4` : Enum literal value (corresponds to the declaration index of the enum literal; 0 for the first literal)
132131
* `true`, `false` : Boolean value
133132
* `3.14` : Float value
134133
* `"hello!"` String value (don't forget the enclosing double quotes)
135134
* `'a'` Char value (don't forget the enclosing single quotes)
135+
* `0`, `4` : Enum literal value (corresponds to the declaration index of the enum literal; 0 for the first literal)
136136
* `{x 10, y 15}` : Struct or class value (with fields `x` and `y` of integer type)
137137

138138
Note that if the event parameter has a type with a custom decode function, then the data value needs to be entered on the form expected by that decode function.
@@ -142,8 +142,12 @@ If the entered data value cannot be correctly decoded by the decode function of
142142
For some events it's optional to provide data. For example, the `timeout` event on a `Timing` port can contain data, but doesn't have to. In this case you can simply press (++"Enter"++) to close the popup and send the event without a data value.
143143

144144
### Ports with Multiplicity
145-
For ports with non-single multiplicity the Art Debug view shows entries for all indices of the port.
145+
For ports with non-single multiplicity the Art Debug view shows the port multiplicity within square brackets:
146146

147147
![](images/port_multiplicity.png)
148148

149-
To send an event to the port at a certain index, perform the **Send Event** command on that port index. Note that it's currently not possible to broadcast the event on all port indicies.
149+
When you perform the **Send Event** command on such a port, you will be prompted for a port index on which to send the event:
150+
151+
![](images/port-index.png)
152+
153+
If you don't specify a port index, the event will be sent on all port indices. This is known as **broadcasting** the event.
7.74 KB
Loading

docs-sources/debugging/images/art_debug_view.png renamed to docs-sources/running-and-debugging/images/art_debug_view.png

File renamed without changes.

0 commit comments

Comments
 (0)