Skip to content

Commit

Permalink
Fix lff formatting issues in zero delay cycles examples by running lff
Browse files Browse the repository at this point in the history
  • Loading branch information
hokeun committed Feb 7, 2025
1 parent 080de05 commit 3637ab6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
10 changes: 4 additions & 6 deletions examples/C/src/zero-delay-cycles/Consistency.lf
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ reactor Controller {
state latest_control: double = 0.0
state first: bool = true

reaction c1(local_update, remote_update) {=
=}
reaction c1(local_update, remote_update) {= =}

reaction c2(local_update) -> control {=
=}
reaction c2(local_update) -> control {= =}
}

reactor Platform {
input update: double
output publish: double

c = new Controller()
p = new PhysicalPlant()
p.sensor -> c.local_update
Expand All @@ -36,7 +34,7 @@ reactor Platform {
federated reactor {
p1 = new Platform()
p2 = new Platform()

p1.publish -> p2.update
p2.publish -> p1.update
}
14 changes: 7 additions & 7 deletions examples/C/src/zero-delay-cycles/ZeroDelayCycle.lf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
target C

reactor A (Period:time = 1 msec) {
input in:int
output out:int
reactor A(Period: time = 1 msec) {
input in: int
output out: int

timer t(0, Period)

Expand All @@ -15,10 +15,10 @@ reactor A (Period:time = 1 msec) {
=}
}


reactor B {
input in:int
output out:int
input in: int
output out: int

reaction(in) -> out {=
lf_set(out, in->value);
=}
Expand All @@ -30,4 +30,4 @@ federated reactor {

a.out -> b.in
b.out -> a.in
}
}

0 comments on commit 3637ab6

Please sign in to comment.