11#if defined STANDALONE_RTI || defined LF_ENCLAVES
int64_t interval_t
Interval of time.
Definition tag.h:107
tag_t downstream_next_event_tag(scheduling_node_t *node, uint16_t node_sending_new_net_id)
Determine whether the specified scheduling node is needed to receive a downstream next event tag (DNE...
void notify_downstream_advance_grant_if_safe(scheduling_node_t *e, bool visited[])
For all scheduling nodes downstream of the specified node, determine whether they should be notified ...
void update_scheduling_node_next_event_tag_locked(scheduling_node_t *e, tag_t next_event_tag)
Update the next event tag of an scheduling node.
void notify_tag_advance_grant(scheduling_node_t *e, tag_t tag)
Notify a tag advance grant (TAG) message to the specified scheduling node.
scheduling_node_state_t
State of the scheduling node during execution.
Definition rti_common.h:32
void invalidate_min_delays()
Invalidate the min_delays, num_min_delays, and the fields that indicate cycles of all nodes.
void _logical_tag_complete(scheduling_node_t *e, tag_t completed)
Update the completed tag for the specified node.
execution_mode_t
Mode of execution of a federate.
Definition rti_common.h:26
void update_min_delays()
If necessary, update the min_delays and the fields that indicate cycles.
bool is_in_zero_delay_cycle(scheduling_node_t *node)
Return true if the node is in a zero-delay cycle.
void initialize_scheduling_node(scheduling_node_t *e, uint16_t id)
Initialize the scheduling node with the specified ID.
void notify_advance_grant_if_safe(scheduling_node_t *e)
Either send to a federate or unblock an enclave to give it a tag.
void free_scheduling_nodes(scheduling_node_t **scheduling_nodes, uint16_t number_of_scheduling_nodes)
Free dynamically allocated memory on the scheduling nodes and the scheduling node array itself.
void notify_provisional_tag_advance_grant(scheduling_node_t *e, tag_t tag)
Notify a provisional tag advance grant (PTAG) message to the specified scheduling node.
bool is_in_cycle(scheduling_node_t *node)
Return true if the node is in a cycle (possibly a zero-delay cycle).
tag_t get_dnet_candidate(tag_t next_event_tag, tag_t minimum_delay)
Find the tag g that is the latest tag that satisfies lf_tag_add(g, minimum_delay) < next_event_tag.
tag_t earliest_future_incoming_message_tag(scheduling_node_t *e)
Given a node (enclave or federate), find the tag of the earliest possible incoming message (EIMT) fro...
tag_t eimt_strict(scheduling_node_t *e)
Given a node (enclave or federate), find the earliest incoming message tag (EIMT) from any immediatel...
void initialize_rti_common(rti_common_t *rti_common)
Initialize the fields of the rti_common struct.
void notify_downstream_next_event_tag(scheduling_node_t *e, tag_t tag)
Notify a downstream next event tag (DNET) signal to the specified scheduling node.
tag_advance_grant_t tag_advance_grant_if_safe(scheduling_node_t *e)
Determine whether the specified scheduling node is eligible for a tag advance grant,...
@ PENDING
Waiting for upstream scheduling nodes.
Definition rti_common.h:38
@ GRANTED
Most recent MSG_TYPE_NEXT_EVENT_TAG has been granted.
Definition rti_common.h:36
@ NOT_CONNECTED
The scheduling node has not connected.
Definition rti_common.h:34
@ REALTIME
Definition rti_common.h:26
@ FAST
Definition rti_common.h:26
Struct for minimum delays from upstream nodes.
Definition rti_common.h:45
tag_t min_delay
Minimum delay from upstream.
Definition rti_common.h:49
int id
ID of the upstream node.
Definition rti_common.h:47
Common RTI data structure for both remote standalone RTI and local RTI used in enclaved execution.
Definition rti_common.h:103
lf_mutex_t * mutex
The RTI mutex for making thread-safe access to the shared state.
Definition rti_common.h:121
bool dnet_disabled
Boolean indicating that DNET is enabled.
Definition rti_common.h:119
tag_t max_stop_tag
RTI's decided stop tag for the scheduling nodes.
Definition rti_common.h:113
bool tracing_enabled
Boolean indicating that tracing is enabled.
Definition rti_common.h:117
scheduling_node_t ** scheduling_nodes
The scheduling nodes.
Definition rti_common.h:105
uint16_t number_of_scheduling_nodes
Number of scheduling nodes.
Definition rti_common.h:107
int num_scheduling_nodes_handling_stop
Number of scheduling nodes handling stop.
Definition rti_common.h:115
tag_t * min_delays
Matrix of minimum delays between pairs of nodes.
Definition rti_common.h:111
Information about the scheduling nodes coordinated by the RTI.
Definition rti_common.h:64
scheduling_node_state_t state
State of the scheduling node.
Definition rti_common.h:78
int flags
One of IS_IN_ZERO_DELAY_CYCLE, IS_IN_CYCLE.
Definition rti_common.h:93
uint16_t * immediate_upstreams
Array of immediate upstream scheduling node ids.
Definition rti_common.h:80
uint16_t num_immediate_upstreams
Size of the array of immediate upstream scheduling nodes and delays.
Definition rti_common.h:85
execution_mode_t mode
FAST or REALTIME.
Definition rti_common.h:91
tag_t last_provisionally_granted
The maximum PTAG that has been provisionally granted (or NEVER if none granted).
Definition rti_common.h:72
tag_t completed
The largest logical tag completed by the scheduling node (or NEVER if no LTC has been received).
Definition rti_common.h:68
uint16_t id
ID of this scheduling node.
Definition rti_common.h:66
tag_t last_granted
The maximum TAG that has been granted so far (or NEVER if none granted).
Definition rti_common.h:70
tag_t next_event
Most recent NET received from the scheduling node (or NEVER if none received).
Definition rti_common.h:74
uint16_t num_immediate_downstreams
Size of the array of immediate downstream scheduling nodes.
Definition rti_common.h:89
uint16_t * immediate_downstreams
Array of immediate downstream scheduling node ids.
Definition rti_common.h:87
tag_t last_DNET
Most recent DNET.
Definition rti_common.h:76
interval_t * immediate_upstream_delays
Minimum delay on connections from immediate upstream scheduling nodes.
Definition rti_common.h:83
Definition rti_common.h:124
tag_t tag
The tag value to grant, or NEVER if there is no tag advance grant.
Definition rti_common.h:126
bool is_provisional
True for PTAG, false for TAG.
Definition rti_common.h:128
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.