File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ capsule TOP {
1212 /* Ports */
1313 /* Parts */
1414 part player : Player;
15- part pingPongServer : PingPongServer; // Ignore warning about unconnected "control" port since we don't use it
15+ part pingPongServer [[rt::properties(rule_config="X0039")]] : PingPongServer; // Ignore warning about unconnected "control" port since we don't use it
1616 /* Connectors */
1717 connect pingPongServer.player with player.server;
1818 /* State Machine */
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ capsule Adder {
3333 increment_computed: WaitForIncrement -> ex1 on mul.returnIncrement;
3434 };
3535 choice more_increments;
36- request_received: Idle -> Computing on request_port.compute
36+ request_received: [[rt::properties(rule_config="X0029")]] Idle -> Computing on request_port.compute
3737 `
3838 remainingIterations = *rtdata - 1;
3939 mul.getIncrement(remainingIterations).send();
@@ -51,7 +51,7 @@ capsule Adder {
5151 result = sqrt(12) * result;
5252 request_port.result(result).send();
5353 `;
54- compute_next_increment: more_increments -> Computing when `else`
54+ compute_next_increment: [[rt::properties(rule_config="X0029")]] more_increments -> Computing when `else`
5555 `
5656 remainingIterations--;
5757 mul.getIncrement(remainingIterations).send();
Original file line number Diff line number Diff line change @@ -68,17 +68,17 @@ capsule RangeCounter {
6868
6969 setMin: on server.setMin
7070 `
71- min = * static_cast<const unsigned int*>( rtdata) ;
71+ min = *rtdata;
7272 std::cout << "Min set to " << min << std::endl;
7373 `;
7474 setMax: on server.setMax
7575 `
76- max = * static_cast<const unsigned int*>( rtdata) ;
76+ max = *rtdata;
7777 std::cout << "Max set to " << max << std::endl;
7878 `;
7979 setDelta: on server.setDelta
8080 `
81- int newDelta = * static_cast<const int*>( rtdata) ;
81+ int newDelta = *rtdata;
8282 if (newDelta != 0) {
8383 delta = newDelta;
8484 std::cout << "Delta set to " << delta << std::endl;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ capsule PedLight {
1919
2020 countdown: on pedControl.timeRemaining
2121 `
22- int time = * static_cast<const int*>( rtdata) ;
22+ int time = *rtdata;
2323 server.timeRemaining(time).send();
2424 `;
2525 };
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ capsule TrafficLight {
130130
131131 pedRequestCustom : CycleLight.pedRequest -> j on server.pedestrianCustomTime
132132 `
133- pedestrianWalkTime = * static_cast<const int*>( rtdata) ;
133+ pedestrianWalkTime = *rtdata;
134134 `;
135135
136136 j -> PedestrianCrossing.pedRequest
You can’t perform that action at this time.
0 commit comments