| RoomModel ActorClassExamples { |
| |
| import room.basic.service.timing.* from "../../../org.eclipse.etrice.modellib.c/model/TimingService.room" |
| |
| import room.basic.types.* from "../../../org.eclipse.etrice.modellib.c/model/Types.room" |
| |
| ActorClass SimpleActorClass { |
| Interface { |
| Port endPort1: PSimpleProtocolClass |
| } |
| Structure { |
| external Port endPort1 |
| conjugated Port internalPort2: PSimpleProtocolClass |
| ActorRef actorRef1: ActorClass1 |
| ActorRef actorRef2: ActorClass2 |
| Binding actorRef1.port2 and actorRef2.port1 |
| Binding internalPort2 and actorRef1.port1 |
| } |
| Behavior { |
| StateMachine { |
| Transition init: initial -> State1 |
| State State1 |
| } |
| } |
| } |
| |
| ActorClass ActorClass1 { |
| Interface { |
| conjugated Port port2: PSimpleProtocolClass |
| Port port1: PSimpleProtocolClass |
| } |
| Structure { |
| external Port port2 |
| external Port port1 |
| } |
| Behavior { } |
| } |
| |
| ActorClass ActorClass2 { |
| Interface { |
| Port port1: PSimpleProtocolClass |
| } |
| Structure { |
| external Port port1 |
| } |
| Behavior { } |
| } |
| |
| ProtocolClass PSimpleProtocolClass { |
| incoming { |
| Message msg1() |
| } |
| outgoing { |
| Message msg2() |
| } |
| } |
| |
| } |