reactor-c 1.0
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
reactor.h
Go to the documentation of this file.
1
17
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
44
52
60
61#ifdef FEDERATED_DECENTRALIZED
62
68
75
81
88
96
103
104#endif // FEDERATED_DECENTRALIZED
105
116
127
145void* lf_allocate(size_t count, size_t size, struct allocation_record_t** head);
146
160
166
176
186const char* lf_reactor_name(self_base_t* self);
187
199
200#endif /* REACTOR_H */
A higher level API to the clock utilities provided by the platform API.
#define lf_reactor_name(reactor)
Return the instance name of the reactor.
Definition reaction_macros.h:222
#define lf_set_present(out)
Mark a port present.
Definition reaction_macros.h:48
#define lf_reactor_full_name(reactor)
Return the fully qualified name of the reactor.
Definition reaction_macros.h:234
void lf_request_stop(void)
Request a stop to execution as soon as possible.
bool lf_is_tag_after_stop_tag(environment_t *env, tag_t tag)
Return true if the provided tag is after stop tag.
int64_t interval_t
Interval of time.
Definition tag.h:107
void lf_set_fed_maxwait(interval_t offset)
Set the global maxwait for the current federate.
interval_t lf_get_fed_maxwait(void)
Return the global maxwait for the current federate.
void lf_set_sta(interval_t offset)
Set the global STA (safe to advance) offset for federated execution.
interval_t lf_get_sta(void)
Return 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.
self_base_t * lf_new_reactor(size_t size)
Allocate memory for a new runtime instance of a reactor.
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_reactor(self_base_t *self)
Free the specified reactor.
void lf_print_snapshot(environment_t *env)
Print a snapshot of the priority queues used during execution (for debugging).
void lf_free_all_reactors(void)
Free all the reactors that are allocated with lf_new_reactor(size_t).
Type definitions that are widely used across different parts of the runtime.
Header file of the runtime infrastructure for modes in the C target of Lingua Franca.
Support for optimizing sparse input through multiports.
void lf_set_stp_offset(interval_t offset)
Set the global STP offset on advancement of logical time for federated execution.
interval_t lf_get_stp_offset(void)
Return the global STP offset on advancement of logical time for federated execution.
Allocation record to keep track of dynamically-allocated memory.
Definition lf_types.h:499
Execution environment.
Definition environment.h:52
Base type for ports.
Definition lf_token.h:202
The base type for all reactor self structs.
Definition lf_types.h:519
A tag is a time, microstep pair.
Definition tag.h:119
Time and tag definitions and functions for Lingua Franca.
Definitions of tracepoint functions for use with the C code generator and any other code generator th...
Core utility functions for Lingua Franca.