How to stop a task

Forum related to ERIKA Enterprise and RT-Druid version 2

Moderator: paolo.gai

Locked
sergifern

How to stop a task

Post by sergifern »

Hi!
I have a problem to stop a task. When I have a task on (with SetRelAlarm), I would like to stop and then Set on again but with a different period. I have found TerminateTask() function, but the compiler says that the function is not declared. I should add some other library? There is another function to do what I want?

Thanks,
Sergi
paolo.gai
Administrator
Posts: 877
Joined: Thu Dec 07, 2006 12:11 pm

Re: How to stop a task

Post by paolo.gai »

If you specified the period using SetRelAlarm, and you want to change period, you should first cancel the alarm using CancelAlarm, and then set again a new period using SetRelAlarm.

If you want to kill the running task, you can use TerminateTask. (but note that TerminateTask is NOT available under FP, EDF, FRSK kernels!).

Ciao,

PJ
Locked