diff options
author | Eyrak Paen | 2021-07-15 17:23:56 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2021-07-15 17:23:56 +0000 |
commit | 2bfac76a0a0704215fe829e85a71ce472363d92c (patch) | |
tree | 95da16230984825aaeb25935507f469193d83ba4 /runtime | |
parent | b363530f2f9fb84dd033e63c6b4cf6f026ad3342 (diff) | |
parent | 3b0812ce983c609058f0ec42d5553ca36a472396 (diff) | |
download | org.eclipse.etrice-2bfac76a0a0704215fe829e85a71ce472363d92c.tar.gz org.eclipse.etrice-2bfac76a0a0704215fe829e85a71ce472363d92c.tar.xz org.eclipse.etrice-2bfac76a0a0704215fe829e85a71ce472363d92c.zip |
Merge "[runtime.c] Add error log when timer start fails due to max timer limit"
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/org.eclipse.etrice.modellib.c/model/etrice/api/timer.room | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/timer.room b/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/timer.room index e4f24aecd..0de990a2d 100644 --- a/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/timer.room +++ b/runtime/org.eclipse.etrice.modellib.c/model/etrice/api/timer.room @@ -266,7 +266,7 @@ RoomModel etrice.api.timer { action ''' etTimerControlBlock* timer = getTcb(); etTime t; - if (timer!= 0){ + if (timer!= 0) { t.sec=transitionData/1000; t.nSec=(transitionData%1000)*1000000L; timer->pTime.sec = 0; @@ -275,7 +275,10 @@ RoomModel etrice.api.timer { getTime(&(timer->expTime)); addTime(&(timer->expTime),&t); putTcbToUsedList(timer); - }''' + } else { + etLogger_logError("ATimerService: no timer available!"); + } + ''' } Transition tr3: Operational -> Operational { triggers { @@ -284,7 +287,7 @@ RoomModel etrice.api.timer { action ''' etTimerControlBlock* timer = getTcb(); etTime t; - if (timer!= 0){ + if (timer!= 0) { t.sec=transitionData/1000; t.nSec=(transitionData%1000)*1000000L; timer->pTime = t; @@ -292,7 +295,10 @@ RoomModel etrice.api.timer { getTime(&(timer->expTime)); addTime(&(timer->expTime),&t); putTcbToUsedList(timer); - }''' + } else { + etLogger_logError("ATimerService: no timer available!"); + } + ''' } Transition tr4: Operational -> Operational { triggers { |