lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.generator.c.InteractingContainedReactors Class Reference

Helper class to handle code generation of contained reactors. More...

Public Member Functions

Set< Instantiation > containedReactors ()
 Return the set of contained reactors that have ports that are referenced by reactions of the container reactor.
 InteractingContainedReactors (Reactor reactor)
 Scan the reactions of the specified reactor and record which ports are referenced by reactions and which reactions are triggered by such ports.
Set< Port > portsOfInstance (Instantiation containedReactor)
 Return the set of ports of the specified contained reactor that are referenced by reactions of the container reactor.
List< Integer > reactionsTriggered (Instantiation containedReactor, Port port)
 Return the indices of the reactions triggered by the specified port of the specified contained reactor or an empty list if there are none.

Package Attributes

LinkedHashMap< Instantiation, LinkedHashMap< Port, LinkedList< Integer > > > portsByContainedReactor
 Data structure that for each instantiation of a contained reactor.

Detailed Description

Helper class to handle code generation of contained reactors.

Author
Edward A. Lee
Soroush Bateni
Hou Seng Wong

Constructor & Destructor Documentation

◆ InteractingContainedReactors()

org.lflang.generator.c.InteractingContainedReactors.InteractingContainedReactors ( Reactor reactor)

Scan the reactions of the specified reactor and record which ports are referenced by reactions and which reactions are triggered by such ports.

Member Function Documentation

◆ containedReactors()

Set< Instantiation > org.lflang.generator.c.InteractingContainedReactors.containedReactors ( )

Return the set of contained reactors that have ports that are referenced by reactions of the container reactor.

◆ portsOfInstance()

Set< Port > org.lflang.generator.c.InteractingContainedReactors.portsOfInstance ( Instantiation containedReactor)

Return the set of ports of the specified contained reactor that are referenced by reactions of the container reactor.

Return an empty set if there are none.

Parameters
containedReactorThe contained reactor.

◆ reactionsTriggered()

List< Integer > org.lflang.generator.c.InteractingContainedReactors.reactionsTriggered ( Instantiation containedReactor,
Port port )

Return the indices of the reactions triggered by the specified port of the specified contained reactor or an empty list if there are none.

Parameters
containedReactorThe contained reactor.
portThe port.

Member Data Documentation

◆ portsByContainedReactor

LinkedHashMap<Instantiation, LinkedHashMap<Port, LinkedList<Integer> > > org.lflang.generator.c.InteractingContainedReactors.portsByContainedReactor
package
Initial value:
=
new LinkedHashMap<>()

Data structure that for each instantiation of a contained reactor.

This provides a set of input and output ports that trigger reactions of the container, are read by a reaction of the container, or that receive data from a reaction of the container. For each port, this provides a list of reaction indices that are triggered by the port, or an empty list if there are no reactions triggered by the port.


The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/generator/c/InteractingContainedReactors.java