Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/demomodel/step1/trafficlight.room')
-rw-r--r--examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/demomodel/step1/trafficlight.room79
1 files changed, 0 insertions, 79 deletions
diff --git a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/demomodel/step1/trafficlight.room b/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/demomodel/step1/trafficlight.room
deleted file mode 100644
index 943f487da..000000000
--- a/examples/org.eclipse.etrice.tutorials.simulators.trafficlight.example/demomodel/step1/trafficlight.room
+++ /dev/null
@@ -1,79 +0,0 @@
-RoomModel TrafficlightModel {
-
- import room.basic.types.* from "../../../org.eclipse.etrice.modellib.java/model/Types.room"
- import room.basic.service.timing.* from "../../../org.eclipse.etrice.modellib.java/model/TimingService.room"
- import room.basic.service.tcp.* from "../../../org.eclipse.etrice.modellib.java/model/TcpService.room"
-
- LogicalSystem TrafficlightLogSys {
- SubSystemRef subsystem:SubSys
- }
- SubSystemClass SubSys {
- ActorRef application:Application
- LogicalThread defaultThread
- }
- ActorClass Application {
- Structure {
- ActorRef commands: TrafficLightCommands
- }
- Behavior { }
- }
-
- ActorClass TrafficLightCommands {
- Interface {
- Port fct: PTrafficLightCommands
- }
- Structure {
- external Port fct
- conjugated Port socketControl: PTcpControl
- conjugated Port socketPayload: PTcpPayload
- ActorRef socket: ATcpClient
- Binding socketControl and socket.ControlPort
- Binding socketPayload and socket.PayloadPort
- Attribute socketConfig: DTcpControl
-
- }
- Behavior {
- StateMachine {
- Transition init: initial -> ConfigSocket {
- action {
- "socketConfig = new DTcpControl(\"localhost\", 4441);"
- }
- }
- Transition tr0: ConfigSocket -> SocketOpen {
- triggers {
- <established: socketControl>
- }
- }
- State ConfigSocket {
- entry {
- "socketControl.open(socketConfig);"
- }
- }
- State SocketOpen {
- entry {
- "String payload = new String(\"carLights=red\\n\");"
- "socketPayload.send(new DTcpPayload(0, payload.length(), payload.getBytes() ));"
- }
- }
- }
- }
- }
-
- ProtocolClass PTrafficLightCommands {
- incoming {
- Message carRed()
- Message carYellow()
- Message carYellowRed()
- Message carGreen()
- Message carOff()
-
- Message pedRed()
- Message pedGreen()
- Message pedOff()
-
- }
- outgoing {
- Message pressedButton()
- }
- }
-} \ No newline at end of file

Back to the top