diff options
Diffstat (limited to 'runtime/org.eclipse.etrice.modellib.c/model')
6 files changed, 715 insertions, 715 deletions
diff --git a/runtime/org.eclipse.etrice.modellib.c/model/Language.room b/runtime/org.eclipse.etrice.modellib.c/model/Language.room index 7339e2927..04e441aad 100644 --- a/runtime/org.eclipse.etrice.modellib.c/model/Language.room +++ b/runtime/org.eclipse.etrice.modellib.c/model/Language.room @@ -1,3 +1,3 @@ -RoomModel room.basic.language {
- PrimitiveType languageIndicator: ptInteger -> int8 default "2"
+RoomModel room.basic.language { + PrimitiveType languageIndicator: ptInteger -> int8 default "2" }
\ No newline at end of file diff --git a/runtime/org.eclipse.etrice.modellib.c/model/TcpService.room b/runtime/org.eclipse.etrice.modellib.c/model/TcpService.room index 597b81c2c..f99cd95bc 100644 --- a/runtime/org.eclipse.etrice.modellib.c/model/TcpService.room +++ b/runtime/org.eclipse.etrice.modellib.c/model/TcpService.room @@ -1,225 +1,225 @@ -RoomModel room.basic.service.tcp {
-
- import room.basic.types.* from "Types.room"
-
-
- ActorClass ATcpServer {
- Interface {
- Port ControlPort: PTcpControl
- Port PayloadPort: PTcpPayload
- }
- Structure {
- usercode1 {
- "#include \"osal/etTcpSockets.h\""
- }
- usercode3 {
- "/* user code 3 */"
- }
- external Port ControlPort
- external Port PayloadPort
- Attribute lastError: int32
- Attribute payloadPortReplocation: int32
- Attribute server: etSocketServerData ref
- }
- Behavior {
- Operation ATcpServer() {
- "etInitSockets();"
- "server = etCreateSocketServerData();"
- }
- Operation ~ATcpServer() {
- "etCleanupSockets();"
- "etFreeSocketServerData(server);"
- }
- Operation stopUser() {
- "/* stop user: close socket */"
- }
- StateMachine {
- Transition init: initial -> closed {
- }
- Transition tr0: closed -> cp cp0 {
- triggers {
- <open: ControlPort>
- }
- action {
- "lastError=0;"
- "/* start accept thread */"
- "if (etStartListening(server, data->TcpPort)!=ETSOCKET_OK) lastError = 1;"
- }
- }
- Transition tr1: opened -> closed {
- triggers {
- <close: ControlPort>
- }
- action {
- "/* close accept thread */"
- "etCloseAllServerSockets(server);"
- "etStopSocketServer(server);"
- }
- }
- Transition tr2: cp cp0 -> opened {
- action {
- "ControlPort.established();"
- }
- }
- Transition socketError: cp cp0 -> error {
- cond {
- "lastError!=0"
- }
- action {
- "ControlPort.error();"
- "/* handle not connected */"
- }
- }
- Transition tr3: opened -> opened {
- triggers {
- <send: PayloadPort>
- }
- action {
- "/* send payload to connection */"
- "etWriteServerSocket(server, data->connectionId, data->length, data->data);"
- }
- }
- ChoicePoint cp0
- State closed
- State opened
- State error
- }
- }
- }
-
- ActorClass ATcpClient {
- Interface {
- Port ControlPort: PTcpControl
- Port PayloadPort: PTcpPayload
- }
- Structure {
- usercode1 {
- "#include \"osal/etTcpSockets.h\""
- }
- usercode3 {
-"static int8* bufferProvider(void* slf, int* size) {
- ATcpClient* self = (ATcpClient*) slf;
- *size = 1000;
- return self->payload.data;
-}
-
-static int socketReceiver(void* slf, int channel, int size, const int8* data) {
- ATcpClient* self = (ATcpClient*) slf;
- self->payload.length = size;
- PTcpPayloadPort_receive(&self->constData->PayloadPort, &self->payload);
- return ETSOCKET_OK;
-}"
- }
- external Port ControlPort
- external Port PayloadPort
- Attribute lastError: int32
- Attribute payload: DTcpPayload
- Attribute client: etSocketConnectionData ref
- }
- Behavior {
- Operation ATcpClient() {
- "client = etCreateSocketConnectionData();"
- "client->receiver = socketReceiver;"
- "client->bufferProvider = bufferProvider;"
- "client->userData = self;"
- }
- Operation ~ATcpClient() {
- "etCloseSocket(client);"
- "etFreeSocketConnectionData(client);"
- }
- Operation stopUser() {
- "/* stop user: close socket */"
- }
- StateMachine {
- Transition init: initial -> closed {
- action {
- "printf(\"Client Init!\\n\");"
- }
- }
- Transition tr0: closed -> cp cp0 {
- triggers {
- <open: ControlPort>
- }
- action {
- "lastError=0;"
- "/* connect to server */"
- "if (etConnectServer(client, data->IPAddr, data->TcpPort)!=ETSOCKET_OK) lastError = 1;"
- }
- }
- Transition tr1: opened -> closed {
- triggers {
- <close: ControlPort>
- }
- action {
- "/* close read thread */"
- "etCloseSocket(client);"
- }
- }
- Transition tr2: cp cp0 -> opened {
- action {
- "ControlPort.established();"
- }
- }
- Transition socketError: cp cp0 -> error {
- cond {
- "lastError!=0"
- }
- action {
- "ControlPort.error();"
- "/* handle error */"
- }
- }
- Transition tr3: opened -> opened {
- triggers {
- <send: PayloadPort>
- }
- action {
- "/* send payload"
- "\tout.write(data.getData(),0,data.length);"
- "*/"
- "etWriteSocket(client, data->length, data->data);"
- }
- }
- ChoicePoint cp0
- State closed
- State opened
- State error
- }
- }
- }
-
- ProtocolClass PTcpControl {
- incoming {
- Message open(data: DTcpControl)
- Message close()
- }
- outgoing {
- Message established()
- Message error()
- }
- }
-
- ProtocolClass PTcpPayload {
- incoming {
- Message send(data: DTcpPayload)
- }
- outgoing {
- Message receive(data: DTcpPayload)
- }
- }
-
- DataClass DTcpControl {
- Attribute IPAddr: string
- Attribute TcpPort: int32
- }
-
- DataClass DTcpPayload {
- Attribute connectionId: int32
- Attribute length: int32
- Attribute data [ 128 ]: int8
- }
-
- ExternalType etSocketServerData -> etSocketServerData
- ExternalType etSocketConnectionData -> etSocketConnectionData
-
+RoomModel room.basic.service.tcp { + + import room.basic.types.* from "Types.room" + + + ActorClass ATcpServer { + Interface { + Port ControlPort: PTcpControl + Port PayloadPort: PTcpPayload + } + Structure { + usercode1 { + "#include \"osal/etTcpSockets.h\"" + } + usercode3 { + "/* user code 3 */" + } + external Port ControlPort + external Port PayloadPort + Attribute lastError: int32 + Attribute payloadPortReplocation: int32 + Attribute server: etSocketServerData ref + } + Behavior { + Operation ATcpServer() { + "etInitSockets();" + "server = etCreateSocketServerData();" + } + Operation ~ATcpServer() { + "etCleanupSockets();" + "etFreeSocketServerData(server);" + } + Operation stopUser() { + "/* stop user: close socket */" + } + StateMachine { + Transition init: initial -> closed { + } + Transition tr0: closed -> cp cp0 { + triggers { + <open: ControlPort> + } + action { + "lastError=0;" + "/* start accept thread */" + "if (etStartListening(server, data->TcpPort)!=ETSOCKET_OK) lastError = 1;" + } + } + Transition tr1: opened -> closed { + triggers { + <close: ControlPort> + } + action { + "/* close accept thread */" + "etCloseAllServerSockets(server);" + "etStopSocketServer(server);" + } + } + Transition tr2: cp cp0 -> opened { + action { + "ControlPort.established();" + } + } + Transition socketError: cp cp0 -> error { + cond { + "lastError!=0" + } + action { + "ControlPort.error();" + "/* handle not connected */" + } + } + Transition tr3: opened -> opened { + triggers { + <send: PayloadPort> + } + action { + "/* send payload to connection */" + "etWriteServerSocket(server, data->connectionId, data->length, data->data);" + } + } + ChoicePoint cp0 + State closed + State opened + State error + } + } + } + + ActorClass ATcpClient { + Interface { + Port ControlPort: PTcpControl + Port PayloadPort: PTcpPayload + } + Structure { + usercode1 { + "#include \"osal/etTcpSockets.h\"" + } + usercode3 { +"static int8* bufferProvider(void* slf, int* size) { + ATcpClient* self = (ATcpClient*) slf; + *size = 1000; + return self->payload.data; +} + +static int socketReceiver(void* slf, int channel, int size, const int8* data) { + ATcpClient* self = (ATcpClient*) slf; + self->payload.length = size; + PTcpPayloadPort_receive(&self->constData->PayloadPort, &self->payload); + return ETSOCKET_OK; +}" + } + external Port ControlPort + external Port PayloadPort + Attribute lastError: int32 + Attribute payload: DTcpPayload + Attribute client: etSocketConnectionData ref + } + Behavior { + Operation ATcpClient() { + "client = etCreateSocketConnectionData();" + "client->receiver = socketReceiver;" + "client->bufferProvider = bufferProvider;" + "client->userData = self;" + } + Operation ~ATcpClient() { + "etCloseSocket(client);" + "etFreeSocketConnectionData(client);" + } + Operation stopUser() { + "/* stop user: close socket */" + } + StateMachine { + Transition init: initial -> closed { + action { + "printf(\"Client Init!\\n\");" + } + } + Transition tr0: closed -> cp cp0 { + triggers { + <open: ControlPort> + } + action { + "lastError=0;" + "/* connect to server */" + "if (etConnectServer(client, data->IPAddr, data->TcpPort)!=ETSOCKET_OK) lastError = 1;" + } + } + Transition tr1: opened -> closed { + triggers { + <close: ControlPort> + } + action { + "/* close read thread */" + "etCloseSocket(client);" + } + } + Transition tr2: cp cp0 -> opened { + action { + "ControlPort.established();" + } + } + Transition socketError: cp cp0 -> error { + cond { + "lastError!=0" + } + action { + "ControlPort.error();" + "/* handle error */" + } + } + Transition tr3: opened -> opened { + triggers { + <send: PayloadPort> + } + action { + "/* send payload" + "\tout.write(data.getData(),0,data.length);" + "*/" + "etWriteSocket(client, data->length, data->data);" + } + } + ChoicePoint cp0 + State closed + State opened + State error + } + } + } + + ProtocolClass PTcpControl { + incoming { + Message open(data: DTcpControl) + Message close() + } + outgoing { + Message established() + Message error() + } + } + + ProtocolClass PTcpPayload { + incoming { + Message send(data: DTcpPayload) + } + outgoing { + Message receive(data: DTcpPayload) + } + } + + DataClass DTcpControl { + Attribute IPAddr: string + Attribute TcpPort: int32 + } + + DataClass DTcpPayload { + Attribute connectionId: int32 + Attribute length: int32 + Attribute data [ 128 ]: int8 + } + + ExternalType etSocketServerData -> etSocketServerData + ExternalType etSocketConnectionData -> etSocketConnectionData + }
\ No newline at end of file diff --git a/runtime/org.eclipse.etrice.modellib.c/model/TimingService.room b/runtime/org.eclipse.etrice.modellib.c/model/TimingService.room index de4663ce5..b943b2a95 100644 --- a/runtime/org.eclipse.etrice.modellib.c/model/TimingService.room +++ b/runtime/org.eclipse.etrice.modellib.c/model/TimingService.room @@ -1,286 +1,286 @@ -RoomModel room.basic.service.timing {
-
- import room.basic.types.* from "Types.room"
-
- async ActorClass ATimingService {
- Interface {
- SPP timer: PTimer
- }
- Structure {
- usercode1 {
- "
- #include \"osal/etTime.h\"
- #define ET_NB_OF_TCBS 30
- typedef struct etTCB etTimerControlBlock;
- struct etTCB {
- etTime expTime;
- etTime pTime;
- int32 portIdx;
- etTimerControlBlock* next;
- };
- "
- }
- usercode2 {
- "/*uc2*/"
- }
- usercode3{
- "etTimerControlBlock tcbs[ET_NB_OF_TCBS];"
- "etTimerControlBlock* usedTcbsRoot; "
- "etTimerControlBlock* freeTcbsRoot;"
- }
- ServiceImplementation of timer
-// Attribute tcbs[10]:tcb
-// Attribute usedTcbsRoot : tcb ref
-// Attribute freeTcbsRoot : tcb ref
- }
- Behavior {
- Operation getTcb():tcb ref{"
- etTimerControlBlock* temp = freeTcbsRoot;
-
- if(freeTcbsRoot!=0) {
- freeTcbsRoot=freeTcbsRoot->next;
- temp->next=0;
- }
- return temp;
- "}
- Operation returnTcb(block:tcb ref){"
- block->next=freeTcbsRoot;
- freeTcbsRoot=block;
- "}
- Operation removeTcbFromUsedList(idx:int32){"
- etTimerControlBlock* temp=usedTcbsRoot;
- etTimerControlBlock* temp2=usedTcbsRoot;
-
- if (temp==0) return;
-
- if (usedTcbsRoot->portIdx == idx){
- /* element found, the first one */
- usedTcbsRoot = usedTcbsRoot->next;
- returnTcb(temp);
- return;
- }
-
- temp=temp->next;
- while(temp!=0){
- if(temp->portIdx==idx){
- temp2->next=temp->next;
- returnTcb(temp);
- return;
- }else{
- /* try next */
- temp2=temp;
- temp=temp->next;
- }
- }
- "}
- Operation putTcbToUsedList(block:tcb ref){"
- etTimerControlBlock* temp=usedTcbsRoot;
- etTimerControlBlock* temp2=usedTcbsRoot;
-
- if (temp==0){
- /* list empty put new block to root */
- block->next=0;
- usedTcbsRoot=block;
- return;
- }
-
- while(1){
- if (temp != 0){
- if (isTimeGreater(&block->expTime,&temp->expTime)){
- /* try next position */
- temp2=temp;
- temp=temp->next;
- }else{
- /* right position found */
- block->next=temp;
- if(temp==usedTcbsRoot){
- usedTcbsRoot=block;
- }else{
- temp2->next=block;
- }
- return;
- }
- }else{
- /* end of list reached */
- block->next=0;
- temp2->next=block;
- return;
- }
- }
- "}
- Operation isTimeGreater(t1:targetTime ref, t2 :targetTime ref):boolean{"
- if (t1->sec > t2->sec) return TRUE;
- if (t1->sec < t2->sec) return FALSE;
- if (t1->nSec > t2->nSec) return TRUE;
- return FALSE;
- "}
-
- Operation addTime(t1:targetTime ref, t2:targetTime ref){"
- t1->sec += t2->sec;
- t1->nSec += t2->nSec;
- while(t1->nSec >= 1000000000L){
- t1->sec++;
- t1->nSec-=1000000000L;
- }
- "}
-
- Operation printList(){"
- etTimerControlBlock* temp=usedTcbsRoot;
- printf(\"list: \");
- while (temp!=0){
- printf(\"(%ld,%ld),\",temp->expTime.sec,temp->expTime.nSec);
- temp=temp->next;
- }
- printf(\"\\n\");
- "}
- StateMachine {
- Transition tr0: initial -> Operational {
- action {
- "int i;"
- "usedTcbsRoot=0;"
- "freeTcbsRoot=&tcbs[0];"
- "tcbs[ET_NB_OF_TCBS-1].next=0;"
- "for (i=0;i<ET_NB_OF_TCBS-1;i++){"
- "\ttcbs[i].next=&tcbs[i+1];"
- "\t}"
- }
- }
- Transition tr1: Operational -> Operational {
- triggers {
- <startTimeout: timer>
- }
- action {
- "etTimerControlBlock* timer = getTcb();"
- "etTime t;"
- "if (timer!= 0){"
- "\tt.sec=time/1000;"
- "\tt.nSec=(time%1000)*1000000L;"
- "\ttimer->pTime.sec = 0;"
- "\ttimer->pTime.nSec = 0;"
- "\ttimer->portIdx=((etReplSubPort*)ifitem)->index;"
- "\tgetTimeFromTarget(&(timer->expTime));"
- "\taddTime(&(timer->expTime),&t);"
- "\tputTcbToUsedList(timer);"
- "\t}"
- }
- }
- Transition tr3: Operational -> Operational {
- triggers {
- <startTimer: timer>
- }
- action {
- "etTimerControlBlock* timer = getTcb();"
- "etTime t;"
- "if (timer!= 0){"
- "\tt.sec=time/1000;"
- "\tt.nSec=(time%1000)*1000000L;"
- "\ttimer->pTime = t;"
- "\ttimer->portIdx=((etReplSubPort*)ifitem)->index;"
- "\tgetTimeFromTarget(&(timer->expTime));"
- "\taddTime(&(timer->expTime),&t);"
- "\tputTcbToUsedList(timer);"
- "\t}"
- }
- }
- Transition tr4: Operational -> Operational {
- triggers {
- <kill: timer>
- }
- action {
- "removeTcbFromUsedList(((etReplSubPort*)ifitem)->index);"
- }
- }
- State Operational {
- entry {
- "/* prepare */"
- } do {
- "/* maintain timers */"
- "etTimerControlBlock* temp;"
- "etTime t;"
- ""
- "getTimeFromTarget(&t);"
- "while (usedTcbsRoot !=0 ){"
- "\tif (isTimeGreater(&t,&(usedTcbsRoot->expTime))){"
- "\t\ttimer[usedTcbsRoot->portIdx].timeout();"
- "\t\ttemp=usedTcbsRoot;"
- "\t\tusedTcbsRoot=usedTcbsRoot->next;"
- "\t\tif((temp->pTime.sec==0)&&(temp->pTime.nSec==0)){"
- "\t\t\t/* single shot timer */"
- "\t\t\treturnTcb(temp);"
- "\t\t}else{"
- "\t\t\t/* periodic timer */"
- "\t\t\taddTime(&temp->expTime,&temp->pTime);"
- "\t\t\tputTcbToUsedList(temp);"
- "\t\t\t}"
- "\t\t}else{"
- "\t\t\tbreak;"
- "\t\t\t}"
- "\t}"
- }
- }
- }
- }
- }
-
-
- ProtocolClass PTimer {
- usercode1 {"
- #define ET_TIMER_RUNNING 0x01
- #define ET_TIMER_PERIODIC 0x02
- "
- }
- usercode2 {
- "/*uc2*/"
- }
- incoming {
- Message startTimer(time: uint32)
- Message startTimeout(time: uint32)
- Message kill()
- }
- outgoing {
- Message timeout()
- }
- conjugate PortClass
- {
- handle incoming startTimer{
- "if (status==0){
- status=ET_TIMER_RUNNING | ET_TIMER_PERIODIC;
- etPort_sendMessage(self, PTimer_IN_startTimer, sizeof(int32), &data);
- }
- "
- }
- handle incoming startTimeout{
- "if (status==0){
- status = ET_TIMER_RUNNING;
- etPort_sendMessage(self, PTimer_IN_startTimeout, sizeof(int32), &data);
- }
- "
- }
- handle outgoing timeout{
- "/* TODO: clear active bit in case of single shot timer */
- if (status!=0){
- if (status==ET_TIMER_RUNNING){
- /* single shot timer */
- status=0;
- }
- /* msg to fsm */
- (*receiveMessageFunc)(actor, self, msg);
- }
- "
- }
- handle incoming kill {
- "
- if (status!=0){
- status=0;
- etPort_sendMessage(self, PTimer_IN_kill, 0,NULL);
- }
- "
- }
- Attribute status:int8="0"
- }
- }
- ExternalType tcb -> etTimerControlBlock
- ExternalType targetTime -> etTime
-}
-
+RoomModel room.basic.service.timing { + + import room.basic.types.* from "Types.room" + + async ActorClass ATimingService { + Interface { + SPP timer: PTimer + } + Structure { + usercode1 { + " + #include \"osal/etTime.h\" + #define ET_NB_OF_TCBS 30 + typedef struct etTCB etTimerControlBlock; + struct etTCB { + etTime expTime; + etTime pTime; + int32 portIdx; + etTimerControlBlock* next; + }; + " + } + usercode2 { + "/*uc2*/" + } + usercode3{ + "etTimerControlBlock tcbs[ET_NB_OF_TCBS];" + "etTimerControlBlock* usedTcbsRoot; " + "etTimerControlBlock* freeTcbsRoot;" + } + ServiceImplementation of timer +// Attribute tcbs[10]:tcb +// Attribute usedTcbsRoot : tcb ref +// Attribute freeTcbsRoot : tcb ref + } + Behavior { + Operation getTcb():tcb ref{" + etTimerControlBlock* temp = freeTcbsRoot; + + if(freeTcbsRoot!=0) { + freeTcbsRoot=freeTcbsRoot->next; + temp->next=0; + } + return temp; + "} + Operation returnTcb(block:tcb ref){" + block->next=freeTcbsRoot; + freeTcbsRoot=block; + "} + Operation removeTcbFromUsedList(idx:int32){" + etTimerControlBlock* temp=usedTcbsRoot; + etTimerControlBlock* temp2=usedTcbsRoot; + + if (temp==0) return; + + if (usedTcbsRoot->portIdx == idx){ + /* element found, the first one */ + usedTcbsRoot = usedTcbsRoot->next; + returnTcb(temp); + return; + } + + temp=temp->next; + while(temp!=0){ + if(temp->portIdx==idx){ + temp2->next=temp->next; + returnTcb(temp); + return; + }else{ + /* try next */ + temp2=temp; + temp=temp->next; + } + } + "} + Operation putTcbToUsedList(block:tcb ref){" + etTimerControlBlock* temp=usedTcbsRoot; + etTimerControlBlock* temp2=usedTcbsRoot; + + if (temp==0){ + /* list empty put new block to root */ + block->next=0; + usedTcbsRoot=block; + return; + } + + while(1){ + if (temp != 0){ + if (isTimeGreater(&block->expTime,&temp->expTime)){ + /* try next position */ + temp2=temp; + temp=temp->next; + }else{ + /* right position found */ + block->next=temp; + if(temp==usedTcbsRoot){ + usedTcbsRoot=block; + }else{ + temp2->next=block; + } + return; + } + }else{ + /* end of list reached */ + block->next=0; + temp2->next=block; + return; + } + } + "} + Operation isTimeGreater(t1:targetTime ref, t2 :targetTime ref):boolean{" + if (t1->sec > t2->sec) return TRUE; + if (t1->sec < t2->sec) return FALSE; + if (t1->nSec > t2->nSec) return TRUE; + return FALSE; + "} + + Operation addTime(t1:targetTime ref, t2:targetTime ref){" + t1->sec += t2->sec; + t1->nSec += t2->nSec; + while(t1->nSec >= 1000000000L){ + t1->sec++; + t1->nSec-=1000000000L; + } + "} + + Operation printList(){" + etTimerControlBlock* temp=usedTcbsRoot; + printf(\"list: \"); + while (temp!=0){ + printf(\"(%ld,%ld),\",temp->expTime.sec,temp->expTime.nSec); + temp=temp->next; + } + printf(\"\\n\"); + "} + StateMachine { + Transition tr0: initial -> Operational { + action { + "int i;" + "usedTcbsRoot=0;" + "freeTcbsRoot=&tcbs[0];" + "tcbs[ET_NB_OF_TCBS-1].next=0;" + "for (i=0;i<ET_NB_OF_TCBS-1;i++){" + "\ttcbs[i].next=&tcbs[i+1];" + "\t}" + } + } + Transition tr1: Operational -> Operational { + triggers { + <startTimeout: timer> + } + action { + "etTimerControlBlock* timer = getTcb();" + "etTime t;" + "if (timer!= 0){" + "\tt.sec=time/1000;" + "\tt.nSec=(time%1000)*1000000L;" + "\ttimer->pTime.sec = 0;" + "\ttimer->pTime.nSec = 0;" + "\ttimer->portIdx=((etReplSubPort*)ifitem)->index;" + "\tgetTimeFromTarget(&(timer->expTime));" + "\taddTime(&(timer->expTime),&t);" + "\tputTcbToUsedList(timer);" + "\t}" + } + } + Transition tr3: Operational -> Operational { + triggers { + <startTimer: timer> + } + action { + "etTimerControlBlock* timer = getTcb();" + "etTime t;" + "if (timer!= 0){" + "\tt.sec=time/1000;" + "\tt.nSec=(time%1000)*1000000L;" + "\ttimer->pTime = t;" + "\ttimer->portIdx=((etReplSubPort*)ifitem)->index;" + "\tgetTimeFromTarget(&(timer->expTime));" + "\taddTime(&(timer->expTime),&t);" + "\tputTcbToUsedList(timer);" + "\t}" + } + } + Transition tr4: Operational -> Operational { + triggers { + <kill: timer> + } + action { + "removeTcbFromUsedList(((etReplSubPort*)ifitem)->index);" + } + } + State Operational { + entry { + "/* prepare */" + } do { + "/* maintain timers */" + "etTimerControlBlock* temp;" + "etTime t;" + "" + "getTimeFromTarget(&t);" + "while (usedTcbsRoot !=0 ){" + "\tif (isTimeGreater(&t,&(usedTcbsRoot->expTime))){" + "\t\ttimer[usedTcbsRoot->portIdx].timeout();" + "\t\ttemp=usedTcbsRoot;" + "\t\tusedTcbsRoot=usedTcbsRoot->next;" + "\t\tif((temp->pTime.sec==0)&&(temp->pTime.nSec==0)){" + "\t\t\t/* single shot timer */" + "\t\t\treturnTcb(temp);" + "\t\t}else{" + "\t\t\t/* periodic timer */" + "\t\t\taddTime(&temp->expTime,&temp->pTime);" + "\t\t\tputTcbToUsedList(temp);" + "\t\t\t}" + "\t\t}else{" + "\t\t\tbreak;" + "\t\t\t}" + "\t}" + } + } + } + } + } + + + ProtocolClass PTimer { + usercode1 {" + #define ET_TIMER_RUNNING 0x01 + #define ET_TIMER_PERIODIC 0x02 + " + } + usercode2 { + "/*uc2*/" + } + incoming { + Message startTimer(time: uint32) + Message startTimeout(time: uint32) + Message kill() + } + outgoing { + Message timeout() + } + conjugate PortClass + { + handle incoming startTimer{ + "if (status==0){ + status=ET_TIMER_RUNNING | ET_TIMER_PERIODIC; + etPort_sendMessage(self, PTimer_IN_startTimer, sizeof(int32), &data); + } + " + } + handle incoming startTimeout{ + "if (status==0){ + status = ET_TIMER_RUNNING; + etPort_sendMessage(self, PTimer_IN_startTimeout, sizeof(int32), &data); + } + " + } + handle outgoing timeout{ + "/* TODO: clear active bit in case of single shot timer */ + if (status!=0){ + if (status==ET_TIMER_RUNNING){ + /* single shot timer */ + status=0; + } + /* msg to fsm */ + (*receiveMessageFunc)(actor, self, msg); + } + " + } + handle incoming kill { + " + if (status!=0){ + status=0; + etPort_sendMessage(self, PTimer_IN_kill, 0,NULL); + } + " + } + Attribute status:int8="0" + } + } + ExternalType tcb -> etTimerControlBlock + ExternalType targetTime -> etTime +} +
\ No newline at end of file diff --git a/runtime/org.eclipse.etrice.modellib.c/model/Types.room b/runtime/org.eclipse.etrice.modellib.c/model/Types.room index b2f65fa2e..7da3adafc 100644 --- a/runtime/org.eclipse.etrice.modellib.c/model/Types.room +++ b/runtime/org.eclipse.etrice.modellib.c/model/Types.room @@ -1,26 +1,26 @@ -RoomModel room.basic.types {
-
- PrimitiveType boolean: ptBoolean -> boolean default "FALSE"
- PrimitiveType char: ptCharacter -> char default "0"
- PrimitiveType int8: ptInteger -> int8 default "0"
- PrimitiveType int16: ptInteger -> int16 default "0"
- PrimitiveType int32: ptInteger -> int32 default "0"
- PrimitiveType int64: ptInteger -> int64 default "0"
-
- PrimitiveType uint8: ptInteger -> uint8 default "0"
- PrimitiveType uint16: ptInteger -> uint16 default "0"
- PrimitiveType uint32: ptInteger -> uint32 default "0"
- PrimitiveType uint64: ptInteger -> uint64 default "0"
-
- PrimitiveType float32:ptReal -> float32 default "0"
- PrimitiveType float64:ptReal -> float64 default "0"
-
-
- // TODO: define strings for C
- PrimitiveType charPtr:ptCharacter -> charPtr default "0"
- PrimitiveType string:ptCharacter -> charPtr default "0"
-
- // et-datatypes for the model
- PrimitiveType etAddressId:ptInteger -> etAddressId default "0"
-
+RoomModel room.basic.types { + + PrimitiveType boolean: ptBoolean -> boolean default "FALSE" + PrimitiveType char: ptCharacter -> char default "0" + PrimitiveType int8: ptInteger -> int8 default "0" + PrimitiveType int16: ptInteger -> int16 default "0" + PrimitiveType int32: ptInteger -> int32 default "0" + PrimitiveType int64: ptInteger -> int64 default "0" + + PrimitiveType uint8: ptInteger -> uint8 default "0" + PrimitiveType uint16: ptInteger -> uint16 default "0" + PrimitiveType uint32: ptInteger -> uint32 default "0" + PrimitiveType uint64: ptInteger -> uint64 default "0" + + PrimitiveType float32:ptReal -> float32 default "0" + PrimitiveType float64:ptReal -> float64 default "0" + + + // TODO: define strings for C + PrimitiveType charPtr:ptCharacter -> charPtr default "0" + PrimitiveType string:ptCharacter -> charPtr default "0" + + // et-datatypes for the model + PrimitiveType etAddressId:ptInteger -> etAddressId default "0" + }
\ No newline at end of file diff --git a/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.service.timing.ATimingService.behavior b/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.service.timing.ATimingService.behavior index ae6653a9e..cbd0bea04 100644 --- a/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.service.timing.ATimingService.behavior +++ b/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.service.timing.ATimingService.behavior @@ -1,144 +1,144 @@ -<?xml version="1.0" encoding="ASCII"?>
-<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.behavior" name="Behavior of ATimingService" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@connections.3/@link" verticalGridUnit="10" version="0.9.1">
- <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
- <link>
- <businessObjects href="../TimingService.room#ActorClass:ATimingService"/>
- </link>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="sg"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../TimingService.room#StateGraph:ATimingService$sg"/>
- </link>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="trp"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="100" y="100">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../TimingService.room#StateGraph:ATimingService$sg"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/>
- </children>
- </children>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="state"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="125" height="90" x="338" y="120">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="65" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20">
- <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="40" y="3" cornerHeight="5" cornerWidth="5"/>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="32" y="24">
- <points x="-3" y="-3"/>
- <points x="-3" y="3"/>
- <points x="-11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="32" y="24">
- <points x="3" y="-3"/>
- <points x="3" y="3"/>
- <points x="11" y="3"/>
- </graphicsAlgorithmChildren>
- <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="32" y="24">
- <points x="-2" y="-3"/>
- <points x="-2" y="3"/>
- <points x="2" y="3"/>
- <points x="2" y="-3"/>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithmChildren>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../TimingService.room#SimpleState:ATimingService$Operational"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1 //@connections.2 //@connections.3" incomingConnections="//@connections.0 //@connections.1 //@connections.2 //@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="65" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Operational"/>
- </children>
- </children>
- </children>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../TimingService.room#InitialTransition:ATimingService$initial"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="init"/>
- </connectionDecorators>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.2/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../TimingService.room#TriggeredTransition:ATimingService$tr1"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr1: <startTimeout:t..."/>
- </connectionDecorators>
- <bendpoints x="440" y="325"/>
- <bendpoints x="440" y="325"/>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.2/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../TimingService.room#TriggeredTransition:ATimingService$tr3"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr3: <startTimer:tim..."/>
- </connectionDecorators>
- <bendpoints x="440" y="325"/>
- <bendpoints x="440" y="325"/>
- </connections>
- <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.2/@anchors.0">
- <properties key="obj-type" value="trans"/>
- <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/>
- <link>
- <businessObjects href="../TimingService.room#TriggeredTransition:ATimingService$tr4"/>
- </link>
- <connectionDecorators visible="true" locationRelative="true" location="1.0">
- <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0">
- <points x="-15" y="5"/>
- <points/>
- <points x="-15" y="-5"/>
- </graphicsAlgorithm>
- </connectionDecorators>
- <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr4: <kill:timer>"/>
- </connectionDecorators>
- <bendpoints x="440" y="325"/>
- <bendpoints x="440" y="325"/>
- </connections>
- <colors red="227" green="238" blue="249"/>
- <colors red="255" green="255" blue="255"/>
- <colors/>
- <colors red="200" green="200" blue="200"/>
- <fonts name="Arial" size="8"/>
- <fonts name="Arial" size="9" bold="true"/>
-</pi:Diagram>
+<?xml version="1.0" encoding="ASCII"?> +<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.behavior" name="Behavior of ATimingService" pictogramLinks="//@link //@children.0/@link //@children.0/@children.1/@link //@children.0/@children.2/@link //@connections.0/@link //@connections.1/@link //@connections.2/@link //@connections.3/@link" verticalGridUnit="10" version="0.9.1"> + <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/> + <link> + <businessObjects href="../TimingService.room#ActorClass:ATimingService"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="sg"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40" cornerHeight="20" cornerWidth="20"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../TimingService.room#StateGraph:ATimingService$sg"/> + </link> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="800" height="80" y="40" font="//@fonts.1" horizontalAlignment="ALIGNMENT_RIGHT" verticalAlignment="ALIGNMENT_TOP" value="/"/> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="trp"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="40" height="40" x="100" y="100"> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="20" height="20" x="10" y="10"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../TimingService.room#StateGraph:ATimingService$sg"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.0" referencedGraphicsAlgorithm="//@children.0/@children.1/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="40" height="20" y="10" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="I"/> + </children> + </children> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="state"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="125" height="90" x="338" y="120"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" background="//@colors.3" foreground="//@colors.2" lineWidth="1" transparency="0.0" width="65" height="30" x="30" y="30" cornerHeight="20" cornerWidth="20"> + <graphicsAlgorithmChildren xsi:type="al:RoundedRectangle" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="15" height="8" x="40" y="3" cornerHeight="5" cornerWidth="5"/> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="32" y="24"> + <points x="-3" y="-3"/> + <points x="-3" y="3"/> + <points x="-11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" x="32" y="24"> + <points x="3" y="-3"/> + <points x="3" y="3"/> + <points x="11" y="3"/> + </graphicsAlgorithmChildren> + <graphicsAlgorithmChildren xsi:type="al:Polygon" foreground="//@colors.2" lineWidth="1" filled="false" lineVisible="true" transparency="0.0" x="32" y="24"> + <points x="-2" y="-3"/> + <points x="-2" y="3"/> + <points x="2" y="3"/> + <points x="2" y="-3"/> + </graphicsAlgorithmChildren> + </graphicsAlgorithmChildren> + </graphicsAlgorithm> + <link> + <businessObjects href="../TimingService.room#SimpleState:ATimingService$Operational"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" outgoingConnections="//@connections.1 //@connections.2 //@connections.3" incomingConnections="//@connections.0 //@connections.1 //@connections.2 //@connections.3" referencedGraphicsAlgorithm="//@children.0/@children.2/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="65" height="30" x="30" y="30" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="Operational"/> + </children> + </children> + </children> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.1/@anchors.0" end="//@children.0/@children.2/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../TimingService.room#InitialTransition:ATimingService$initial"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="init"/> + </connectionDecorators> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.2/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../TimingService.room#TriggeredTransition:ATimingService$tr1"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr1: <startTimeout:t..."/> + </connectionDecorators> + <bendpoints x="440" y="325"/> + <bendpoints x="440" y="325"/> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.2/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../TimingService.room#TriggeredTransition:ATimingService$tr3"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr3: <startTimer:tim..."/> + </connectionDecorators> + <bendpoints x="440" y="325"/> + <bendpoints x="440" y="325"/> + </connections> + <connections xsi:type="pi:FreeFormConnection" visible="true" active="true" start="//@children.0/@children.2/@anchors.0" end="//@children.0/@children.2/@anchors.0"> + <properties key="obj-type" value="trans"/> + <graphicsAlgorithm xsi:type="al:Polyline" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0"/> + <link> + <businessObjects href="../TimingService.room#TriggeredTransition:ATimingService$tr4"/> + </link> + <connectionDecorators visible="true" locationRelative="true" location="1.0"> + <graphicsAlgorithm xsi:type="al:Polygon" background="//@colors.2" foreground="//@colors.2" lineWidth="1" filled="true" transparency="0.0"> + <points x="-15" y="5"/> + <points/> + <points x="-15" y="-5"/> + </graphicsAlgorithm> + </connectionDecorators> + <connectionDecorators visible="true" active="true" locationRelative="true" location="0.5"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" x="10" font="//@fonts.0" value="tr4: <kill:timer>"/> + </connectionDecorators> + <bendpoints x="440" y="325"/> + <bendpoints x="440" y="325"/> + </connections> + <colors red="227" green="238" blue="249"/> + <colors red="255" green="255" blue="255"/> + <colors/> + <colors red="200" green="200" blue="200"/> + <fonts name="Arial" size="8"/> + <fonts name="Arial" size="9" bold="true"/> +</pi:Diagram> diff --git a/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.service.timing.ATimingService.structure b/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.service.timing.ATimingService.structure index 2b5c7bb31..509532e8a 100644 --- a/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.service.timing.ATimingService.structure +++ b/runtime/org.eclipse.etrice.modellib.c/model/diagrams/room.basic.service.timing.ATimingService.structure @@ -1,35 +1,35 @@ -<?xml version="1.0" encoding="ASCII"?>
-<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of ATimingService" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link" verticalGridUnit="10" version="0.9.1">
- <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/>
- <link>
- <businessObjects href="../TimingService.room#ActorClass:ATimingService"/>
- </link>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="cls"/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40">
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40"/>
- <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../TimingService.room#ActorClass:ATimingService"/>
- </link>
- <children xsi:type="pi:ContainerShape" visible="true" active="true">
- <properties key="obj-type" value="port"/>
- <properties key="item-kind" value=""/>
- <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="400">
- <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/>
- </graphicsAlgorithm>
- <link>
- <businessObjects href="../TimingService.room#SPPRef:ATimingService$timer"/>
- </link>
- <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/>
- <children visible="true">
- <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="timer"/>
- </children>
- </children>
- </children>
- <colors red="227" green="238" blue="249"/>
- <colors red="255" green="255" blue="255"/>
- <colors/>
- <fonts name="Arial" size="8"/>
-</pi:Diagram>
+<?xml version="1.0" encoding="ASCII"?> +<pi:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:al="http://eclipse.org/graphiti/mm/algorithms" xmlns:pi="http://eclipse.org/graphiti/mm/pictograms" visible="true" gridUnit="10" diagramTypeId="room.structure" name="Structure of ATimingService" pictogramLinks="//@children.0/@link //@link //@children.0/@children.0/@link" verticalGridUnit="10" version="0.9.1"> + <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.0" lineWidth="1" transparency="0.0" width="1000" height="1000"/> + <link> + <businessObjects href="../TimingService.room#ActorClass:ATimingService"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="cls"/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="880" height="580" x="40" y="40"> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" background="//@colors.1" foreground="//@colors.2" lineWidth="4" transparency="0.5" width="800" height="500" x="40" y="40"/> + <graphicsAlgorithmChildren xsi:type="al:Rectangle" foreground="//@colors.2" lineWidth="4" filled="false" transparency="0.0" width="800" height="500" x="40" y="40"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../TimingService.room#ActorClass:ATimingService"/> + </link> + <children xsi:type="pi:ContainerShape" visible="true" active="true"> + <properties key="obj-type" value="port"/> + <properties key="item-kind" value=""/> + <graphicsAlgorithm xsi:type="al:Rectangle" lineWidth="1" filled="false" lineVisible="false" transparency="0.0" width="80" height="80" x="400"> + <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.2" foreground="//@colors.2" lineWidth="2" transparency="0.0" width="40" height="40" x="20" y="20"/> + </graphicsAlgorithm> + <link> + <businessObjects href="../TimingService.room#SPPRef:ATimingService$timer"/> + </link> + <anchors xsi:type="pi:ChopboxAnchor" referencedGraphicsAlgorithm="//@children.0/@children.0/@graphicsAlgorithm/@graphicsAlgorithmChildren.0"/> + <children visible="true"> + <graphicsAlgorithm xsi:type="al:Text" foreground="//@colors.2" lineWidth="1" filled="false" transparency="0.0" width="80" height="20" font="//@fonts.0" horizontalAlignment="ALIGNMENT_CENTER" value="timer"/> + </children> + </children> + </children> + <colors red="227" green="238" blue="249"/> + <colors red="255" green="255" blue="255"/> + <colors/> + <fonts name="Arial" size="8"/> +</pi:Diagram> |