Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyrak Paen2021-07-15 17:23:56 +0000
committerGerrit Code Review @ Eclipse.org2021-07-15 17:23:56 +0000
commit2bfac76a0a0704215fe829e85a71ce472363d92c (patch)
tree95da16230984825aaeb25935507f469193d83ba4 /runtime
parentb363530f2f9fb84dd033e63c6b4cf6f026ad3342 (diff)
parent3b0812ce983c609058f0ec42d5553ca36a472396 (diff)
downloadorg.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.room14
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 {

Back to the top