![]() |
reactor-c 1.0
C Runtime for Lingua Franca
|
API functions for scheduling actions. More...
Go to the source code of this file.
Functions | |
| bool | lf_check_deadline (void *self, bool invoke_deadline_handler) |
| Check the deadline of the currently executing reaction against the current physical time. | |
| trigger_handle_t | lf_schedule (void *action, interval_t offset) |
| Schedule an action to occur with the specified time offset with no payload (no value conveyed). | |
| trigger_handle_t | lf_schedule_copy (void *action, interval_t offset, void *value, size_t length) |
| Schedule an action to occur with the specified value and time offset with a copy of the specified value. | |
| trigger_handle_t | lf_schedule_int (void *action, interval_t extra_delay, int value) |
| Schedule the specified action with an integer value at a later logical time. | |
| trigger_handle_t | lf_schedule_token (void *action, interval_t extra_delay, lf_token_t *token) |
| Schedule the specified action at a later tag with the specified token as a payload. | |
| trigger_handle_t | lf_schedule_trigger (environment_t *env, trigger_t *trigger, interval_t delay, lf_token_t *token) |
| Schedule the specified trigger to execute in the specified environment with given delay and token. | |
| trigger_handle_t | lf_schedule_value (void *action, interval_t extra_delay, void *value, int length) |
| Variant of lf_schedule_token that creates a token to carry the specified value. | |
| void | lf_update_deadline (void *self, interval_t updated_deadline) |
| Update the deadline of the currently executing reaction. | |
API functions for scheduling actions.
Most of these functions take a void* pointer to an action, which will be internally cast to a lf_action_base_t* pointer. The cast could be done by macros in reaction_macros.h, but unlike the macros defined there, it is common for lf_schedule functions to be invoked outside of reaction bodies. This means that users writing code in separate library files are responsible for ensuring that the void* pointer is indeed a valid lf_action_base_t* pointer before passing it to lf_schedule. The compiler will not check this.