reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
reactor.h
Go to the documentation of this file.
1
18#ifndef REACTOR_H
19#define REACTOR_H
20
21#include "lf_types.h"
22#include "modes.h" // Modal model support
23#include "port.h"
24#include "tag.h" // Time-related functions.
25#include "clock.h" // Time-related functions.
26#include "tracepoint.h"
27#include "util.h"
28
32#define SUPPRESS_UNUSED_WARNING(x) (void)(x)
33
35
42
48
53void lf_set_stop_tag(environment_t* env, tag_t tag);
54
55#ifdef FEDERATED_DECENTRALIZED
56
60interval_t lf_get_stp_offset(void);
61
66void lf_set_stp_offset(interval_t offset);
67
68#endif // FEDERATED_DECENTRALIZED
69
78
87void lf_request_stop(void);
88
102void* lf_allocate(size_t count, size_t size, struct allocation_record_t** head);
103
115self_base_t* lf_new_reactor(size_t size);
116
120void lf_free_all_reactors(void);
121
129void lf_free_reactor(self_base_t* self);
130
131#endif /* REACTOR_H */
A higher level API to the clock utilities provided by the platform API.
Type definitions that are widely used across different parts of the runtime.
#define lf_set_present(out)
Mark a port present.
Definition reaction_macros.h:48
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.
Definition reactor_common.c:145
self_base_t * lf_new_reactor(size_t size)
Allocate memory for a new runtime instance of a reactor.
Definition reactor_common.c:112
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).
Definition reactor_common.c:90
void lf_free_reactor(self_base_t *self)
Free the specified reactor.
Definition reactor_common.c:129
void lf_print_snapshot(environment_t *env)
Print a snapshot of the priority queues used during execution (for debugging).
Definition reactor_threaded.c:964
void lf_request_stop(void)
Request a stop to execution as soon as possible.
Definition reactor_threaded.c:503
void lf_free_all_reactors(void)
Free all the reactors that are allocated with lf_new_reactor(size_t).
Definition reactor_common.c:134
bool lf_is_tag_after_stop_tag(environment_t *env, tag_t tag)
Return true if the provided tag is after stop tag.
Definition reactor_common.c:222
Definition lf_types.h:259
Execution environment. This struct contains information about the execution environment....
Definition environment.h:69
Base type for ports. Port structs are customized types because their payloads are type specific....
Definition lf_token.h:140
The base type for all reactor self structs.
Definition lf_types.h:278
Definition tag.h:81
Time and tag definitions and functions for Lingua Franca.
int64_t interval_t
Definition tag.h:71
Definitions of tracepoint functions for use with the C code generator and any other code generator th...