Skip to content

Commit

Permalink
Adjusted existing example to new mode syntax keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sr committed Sep 29, 2021
1 parent dfa9292 commit c9152ed
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions example/C/src/Patterns/lib/SendersAndReceivers.lf
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ reactor SendOnce {
*
* @param offset The starting time.
* @param period The period.
* @param initial The first output.
* @param start The first output.
* @param increment The increment between outputs
*/
reactor SendCount(
offset:time(0),
period:time(1 sec),
initial:int(0),
start:int(0),
increment:int(1)
) {
state count:int(initial);
state count:int(start);
output out:int;
timer t(offset, period);
reaction(t) -> out {=
Expand Down Expand Up @@ -80,7 +80,7 @@ reactor SendOnceAndReceive {
*
* @param offset The time of the first output.
* @param period The period of the outputs.
* @param initial The initial output value.
* @param start The initial output value.
* @param increment The increment between outputs.
*
* @input in The input to report.
Expand All @@ -98,7 +98,7 @@ reactor SendPeriodicallyAndReceive extends SendCount, Receive {
*
* @param offset The time of the first output.
* @param period The period of the outputs.
* @param initial The initial output value.
* @param start The initial output value.
* @param increment The increment between outputs.
*
* @input in The input to report.
Expand All @@ -118,7 +118,7 @@ reactor ReceiveAndSendPeriodically extends Receive, SendCount {
reactor SendPeriodicallyAndReceiveMultiport (
offset:time(0),
period:time(1 sec),
initial:int(0),
start:int(0),
increment:int(1),
width:int(4)
) {
Expand All @@ -127,7 +127,7 @@ reactor SendPeriodicallyAndReceiveMultiport (

timer t(offset, period);

state count:int(initial);
state count:int(start);

reaction(t) -> out {=
SET(out, self->count);
Expand Down

0 comments on commit c9152ed

Please sign in to comment.