reactor-c 1.0
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
trigger_t Struct Reference

Trigger struct representing an output, timer, action, or input. More...

#include <lf_types.h>

Data Fields

tag_t intended_tag
 The intended trigger time of this trigger.
bool is_physical
 Flag indicating whether this trigger represents a physical action.
bool is_timer
 Flag indicating whether this trigger is a timer.
tag_t last_known_status_tag
 Last known status tag of the port.
tag_t last_tag
 Tag of the last event scheduled for this action.
reactor_mode_tmode
 Pointer to the enclosing mode of this trigger.
int number_of_reactions
 Number of reactions that are sensitive to this trigger.
interval_t offset
 Minimum delay for an action trigger.
interval_t period
 Minimum interarrival time for an action trigger.
instant_t physical_time_of_arrival
 Physical time at which the message was received on the network.
lf_spacing_policy_t policy
 Policy for handling events scheduled too early.
reaction_t ** reactions
 Array of pointers to reactions that are sensitive to this trigger.
port_status_t status
 Current status of the port at the current logical time.
token_template_t tmplt
 Type and token information template.

Detailed Description

Trigger struct representing an output, timer, action, or input.

Field Documentation

◆ intended_tag

tag_t trigger_t::intended_tag

The intended trigger time of this trigger.

Represents the discrepancy between intended and actual trigger time. Currently only relevant for logical connections using decentralized coordination.

See also
https://github.com/icyphy/lingua-franca/wiki/Logical-Connections

◆ is_physical

bool trigger_t::is_physical

Flag indicating whether this trigger represents a physical action.

True if this denotes a physical action, false otherwise.

◆ is_timer

bool trigger_t::is_timer

Flag indicating whether this trigger is a timer.

True if this is a timer (a special kind of action), false otherwise.

◆ last_known_status_tag

tag_t trigger_t::last_known_status_tag

Last known status tag of the port.

Records the last known status via timed message, port absent, or TAG from RTI. Only present in federated execution.

◆ last_tag

tag_t trigger_t::last_tag

Tag of the last event scheduled for this action.

Only used for actions and will be NEVER otherwise.

◆ mode

reactor_mode_t* trigger_t::mode

Pointer to the enclosing mode of this trigger.

If the trigger is enclosed in multiple modes, this points to the innermost mode. Only present when modal reactors are enabled.

◆ number_of_reactions

int trigger_t::number_of_reactions

Number of reactions that are sensitive to this trigger.

Indicates the size of the reactions array.

◆ offset

interval_t trigger_t::offset

Minimum delay for an action trigger.

For timers, this also represents the maximum delay.

◆ period

interval_t trigger_t::period

Minimum interarrival time for an action trigger.

For timers, this also represents the maximum interarrival time.

◆ physical_time_of_arrival

instant_t trigger_t::physical_time_of_arrival

Physical time at which the message was received on the network.

Based on the local clock. Note: This time is only passed down one level of hierarchy. Default value is NEVER. Only present in federated execution.

◆ policy

lf_spacing_policy_t trigger_t::policy

Policy for handling events scheduled too early.

Determines how to handle events that violate the minimum interarrival time.

See also
lf_spacing_policy_t for available policies.

◆ reactions

reaction_t** trigger_t::reactions

Array of pointers to reactions that are sensitive to this trigger.

These reactions will be executed when the trigger fires.

◆ status

port_status_t trigger_t::status

Current status of the port at the current logical time.

Needs to be reset at the beginning of each logical time. Particularly important for distributed execution to handle message coordination.

See also
port_status_t for possible values.

◆ tmplt

token_template_t trigger_t::tmplt

Type and token information template.

Contains type information and token handling details for the trigger. Note: 'template' is a C++ keyword, hence the abbreviated name.


The documentation for this struct was generated from the following file:
  • /Users/runner/work/reactor-c/reactor-c/include/core/lf_types.h