![]() |
reactor-c 1.0
C Runtime for Lingua Franca
|
Definitions for the C target of Lingua Franca shared by threaded and unthreaded versions. More...
#include "lf_types.h"#include "modes.h"#include "port.h"#include "tag.h"#include "clock.h"#include "tracepoint.h"#include "util.h"Go to the source code of this file.
Macros | |
| #define | SUPPRESS_UNUSED_WARNING(x) |
| Macro to suppress warnings about unused variables. | |
Functions | |
| void * | lf_allocate (size_t count, size_t size, struct allocation_record_t **head) |
| Allocate memory and record on the specified allocation record (a self struct). | |
| void | lf_free_all_reactors (void) |
Free all the reactors that are allocated with lf_new_reactor(size_t). | |
| void | lf_free_reactor (self_base_t *self) |
| Free the specified reactor. | |
| interval_t | lf_get_fed_maxwait (void) |
| Return the global maxwait for the current federate. | |
| interval_t | lf_get_sta (void) |
| Return the global STA (safe to advance) offset for federated execution. | |
| interval_t | lf_get_stp_offset (void) |
| Return the global STP offset on advancement of logical time for federated execution. | |
| bool | lf_is_tag_after_stop_tag (environment_t *env, tag_t tag) |
| Return true if the provided tag is after stop tag. | |
| self_base_t * | lf_new_reactor (size_t size) |
| Allocate memory for a new runtime instance of a reactor. | |
| void | lf_print_snapshot (environment_t *env) |
| Print a snapshot of the priority queues used during execution (for debugging). | |
| const char * | lf_reactor_full_name (self_base_t *self) |
| Return the full name of the reactor. | |
| const char * | lf_reactor_name (self_base_t *self) |
| Return the instance name of the reactor. | |
| void | lf_request_stop (void) |
| Request a stop to execution as soon as possible. | |
| void | lf_set_fed_maxwait (interval_t offset) |
| Set the global maxwait for the current federate. | |
| void | lf_set_present (lf_port_base_t *port) |
| Mark the given port's is_present field as true. | |
| void | lf_set_sta (interval_t offset) |
| Set the global STA (safe to advance) offset for federated execution. | |
| void | lf_set_stop_tag (environment_t *env, tag_t tag) |
| Set the stop tag if it is less than the stop tag of the specified environment. | |
| void | lf_set_stp_offset (interval_t offset) |
| Set the global STP offset on advancement of logical time for federated execution. | |
Definitions for the C target of Lingua Franca shared by threaded and unthreaded versions.
This header file defines functions that programmers use in the body of reactions for reading and writing inputs and outputs and scheduling future events. Other functions that might be useful to application programmers are also defined here.
Many of these functions have macro wrappers defined in reaction_macros.h.
| #define SUPPRESS_UNUSED_WARNING | ( | x | ) |
Macro to suppress warnings about unused variables.
| interval_t lf_get_stp_offset | ( | void | ) |
Return the global STP offset on advancement of logical time for federated execution.
| void lf_set_stp_offset | ( | interval_t | offset | ) |
Set the global STP offset on advancement of logical time for federated execution.
| offset | A non-negative time value to be applied as the STP offset. |