|
|
|
|
|
|
|
Defines the type of a variable that holds a Timer value.
|
|
|
|
|
Defines the maximum allowed value of a Timer, after which it overflows.
|
|
|
Get Timer Value(nameid, value, itstaskid)
|
|
Defines the code for retrieving the current value of a Timer.
|
|
|
Declare Timer(nameid, itstaskid)
|
?<begin>$<CK_defineThisAlarm> ?<==> yes ?<?>extern void tim_hndlr_$<nameid>();
|
Defines the code for declaring a Timer (OS Object).
|
This API is used when generating the code for declaring a Timer
The code is generated in the file type_def.h
|
API definition: DECLARE_TIM ER($nameid) ;
Generated Code: DECLARE_TIM ER(timer_10 ms);
|
Define Timer(nameid, itstaskid)
|
"?<begin>$<CK_defineThisAlarm> ?<==> yes ?<?>void tim_hndlr_$<nameid> ()
GENERATE_EVENT($<nameid>);
|
Defines the code for defining a Timer (OS Object).
|
This API is used when generating the code for defining a Software Timer.
The code is generated in the file glob_dat.c
|
API definition: DEFINE_TIME R($nameid);
Generated Code: DEFINE_TIME R(timer_10m s);
|
Create Timer(nameid, itstaskid)
|
|
Defines the code for creating a Timer (OS Object).
|
This API is used when generating the code for creating a Software Timer.
This code is generated in the file glob_dat.c, in the function on_startup_cod e .
The function on_startup_cod e is called at the startup of the generated application.
|
API definition: CREATE_TIME R($nameid);
Generated Code: CREATE_TIME R(timer_10m s);
|
Destroy Timer(nameid, itstaskid)
|
|
Defines the code for destroying a Timer (OS Object).
|
This API is used when generating the code for destroying a Software Timer.
This code is generated in the file glob_dat.c, in the function on_exit_code .
The function on_exit_code is called at the end of the generated application.
|
API definition: DESTROY_TIM ER($nameid) ;
Generated Code: DESTROY_TIM ER(timer_10 ms);
|
Install Relative Timer(nameid, value, cycle, counter, itstaskid)
|
install_mainloop_timer((unsigned long int) ($<value>) + (?<begin>$<counter> ?<==> ?<?>ms_counter?<:>$<counter>?<end>), tim_hndlr_$<nameid>);
|
Defines the code for installing a Timer (OS Object) with a relative value.
|
This API is used when installing a Timer using relative time.
For example, when using a scheduling operation with an Event, that uses a Timer for this operation. The generated code will use the definition of this API to install the timer.
The code for this operation will be generated in the file <module>.c
|
For an Event defined to be a Task-Event.
install_mai nloop_rel_t imer((unsig ned long int) ($<value>) + (?<begin>$< counter> ?<==> ?<?>ms_coun ter?<:>$<co unter>?<end >), tim_hndlr_$ <nameid>);
install_mai nloop_rel_t imer((unsig ned long int) (100) + (ms_counter ), tim_hndlr_E V);
|
Install Absolute Timer(nameid, value, cycle, counter, itstaskid)
|
|
Defines the code for installing a Timer (OS Object) with an absolute value.
|
This API is used when installing a Timer using absolute time.
For example, when using a scheduling operation with an Event that uses a Timer for this operation. The generated code will use the definition of this API to install the timer.
The code for this operation will be generated in the file <module>.c
|
For an Event defined to be a Task-Event.
install_mai nloop_abs_t imer((unsig ned long int) ($<value>) + (?<begin>$< counter> ?<==> ?<?>ms_coun ter?<:>$<co unter>?<end >), tim_hndlr_$ <nameid>);
install_mai nloop_abs_t imer((unsig ned long int) (100) + (ms_counter ), tim_hndlr_E V);
|
Clear Timer(nameid, itstaskid)
|
|
Defines the code for clearing a Timer (OS Object).
|
This API is used in the code section that handles the Timer expiration.
If the Timer was tested to be expired, the Event related to this Timer is generated.
Just before generating the Event, the timer is cleared.
|
For an Event defined to be a Task-Event, using a Timer.
API's Parameters: nameid = EV
API definition: Clear_Timer (tim_hndlr_ $nameid)
Clear_Timer (tim_hndlr_ EV)
|
Test for Timer Expiration(nameid, itstaskid)
|
|
Defines the code for testing a Timer (OS Object) for expiration.
|
This API is used in the code section that handles the Timer expiration.
This API definition is used in order to find out if a timer has expired.
The code related to this API is generated in the file <module>.c
|
For an Event defined to be a Task-Event, using a Timer.
API's Parameters: nameid = EV
API definition: TEST_TIMER( tim_hndlr_$ nameid)
Generated Code: TEST_TIMER( tim_hndlr_E V)
|
Cancel Timer(nameid, itstaskid)
|
|
Defines the code for canceling a Timer.
|
This API is used just before installing the Timer.
If the Event related to the timer has the Design-Attribute: "CK_cancelBeforeSet" with the value "yes", then the definition of this API is put before the timer installation code.
|
For an Event defined to be a Task-Event, using a Timer.
API's Parameters: nameid = EV
API definition: TEST_TIMER( tim_hndlr_$ nameid)
Generated Code: TEST_TIMER( tim_hndlr_E V)
|