blob: 16ec7fd5a2ee4fbbd2bc85b3931cd72aaaa7907f [file] [log] [blame]
/*
* Shortkeys:
* Ctrl+Space - content assist
* F3 - open declaration of selected element
* Alt+S - open structure diagram
* Alt+B - open behavior diagram
* Alt+M - open textual editor (in diagrams)
*/
RoomModel TemplateModel {
import etrice.api.types.*
import etrice.api.timer.PTimer
import etrice.api.timer.ATimerService
LogicalSystem LogSys {
SubSystemRef subSystemRef: SubSysClass
}
SubSystemClass SubSysClass {
ActorRef topActor: TopActor
ActorRef timingService: ATimerService
LayerConnection ref topActor satisfied_by timingService.timer
LogicalThread defaultThread
}
// - build your application from here
ActorClass TopActor {
Structure {
}
Behavior {
StateMachine {
Transition init: initial -> helloState
State helloState {
entry '''printf("### Hello World! ###\n");'''
}
}
}
}
// - PingPong building kit
ProtocolClass PingPongProtocol {
incoming {
Message ping()
}
outgoing {
Message pong()
}
}
ActorClass Sender {
Interface {
conjugated Port sendPort: PingPongProtocol
}
Structure {
external Port sendPort
}
Behavior {
}
}
ActorClass Receiver {
Interface {
Port recvPort: PingPongProtocol
}
Structure {
external Port recvPort
SAP timingService: PTimer
}
Behavior {
}
}
}