Skip to content

Commit 82fd7a7

Browse files
committed
Added image assets
1 parent 749ddc7 commit 82fd7a7

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

docs/assets/code/c/src/MainReactor.lf

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
target C
2+
reactor ReactorA {
3+
output output_port: int
4+
@label("timer (offset, period)")
5+
timer t(0, 100 ms)
6+
@label("reaction A1")
7+
reaction(t) -> output_port {=
8+
=}
9+
}
10+
reactor ReactorB {
11+
input input_port: int
12+
output output_port: int
13+
@label("reaction B1")
14+
reaction(input_port) -> output_port {=
15+
=}
16+
}
17+
reactor ReactorC {
18+
input input_port1: int
19+
input input_port2: int
20+
@label("reaction C1")
21+
reaction(input_port1) {=
22+
=}
23+
@label("reaction C2")
24+
reaction(input_port2) {=
25+
=}
26+
}
27+
main reactor {
28+
a = new ReactorA()
29+
b = new ReactorB()
30+
c = new ReactorC()
31+
a.output_port -> c.input_port2 after 200 ms
32+
a.output_port -> b.input_port after 100 ms
33+
b.output_port -> c.input_port1 after 100 ms
34+
}

docs/assets/images/diagrams/MainReactor.svg

Lines changed: 1 addition & 0 deletions
Loading
4.58 KB
Loading
452 KB
Loading

0 commit comments

Comments
 (0)