lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.tests.compiler.PortInstanceTests Class Reference

Test the PortInstance class. More...

Public Member Functions

void createRange () throws Exception
void multiportDestination () throws Exception

Protected Member Functions

void clearConnections (ReactorInstance r)
 Clear connections.
void connect (PortInstance src, int srcStart, int srcWidth, PortInstance dst, int dstStart, int dstWidth)
 Connection between multiports.
void connect (PortInstance src, PortInstance dst)
 Simple connection of two ports.
PortInstance newInputPort (String name, ReactorInstance container)
PortInstance newOutputPort (String name, ReactorInstance container)
PortInstance newPort (String name, ReactorInstance container)
ReactionInstance newReaction (PortInstance trigger)
 Return a new reaction triggered by the specified port.
ReactorInstance newReactor (String name, ReactorInstance container)

Detailed Description

Test the PortInstance class.

Member Function Documentation

◆ clearConnections()

void org.lflang.tests.compiler.PortInstanceTests.clearConnections ( ReactorInstance r)
protected

Clear connections.

This recursively clears them for all contained reactors.

◆ connect() [1/2]

void org.lflang.tests.compiler.PortInstanceTests.connect ( PortInstance src,
int srcStart,
int srcWidth,
PortInstance dst,
int dstStart,
int dstWidth )
protected

Connection between multiports.

This should be used only for connections that would be allowed in the syntax (i.e., no cross-hierarchy connections), but this is not checked.

Parameters
srcThe sending port.
srcStartThe starting index of the source port range.
srcWidthThe width of the source port range.
dstThe receiving port.
dstStartThe starting index of the destination port range.
dstWidthThe width of the destination port range.

◆ connect() [2/2]

void org.lflang.tests.compiler.PortInstanceTests.connect ( PortInstance src,
PortInstance dst )
protected

Simple connection of two ports.

This should be used only for connections that would be allowed in the syntax (i.e., no cross-hierarchy connections), but this is not checked.

Parameters
srcThe sending port.
dstThe receiving port.

◆ createRange()

void org.lflang.tests.compiler.PortInstanceTests.createRange ( ) throws Exception

◆ multiportDestination()

void org.lflang.tests.compiler.PortInstanceTests.multiportDestination ( ) throws Exception

◆ newInputPort()

PortInstance org.lflang.tests.compiler.PortInstanceTests.newInputPort ( String name,
ReactorInstance container )
protected

◆ newOutputPort()

PortInstance org.lflang.tests.compiler.PortInstanceTests.newOutputPort ( String name,
ReactorInstance container )
protected

◆ newPort()

PortInstance org.lflang.tests.compiler.PortInstanceTests.newPort ( String name,
ReactorInstance container )
protected

◆ newReaction()

ReactionInstance org.lflang.tests.compiler.PortInstanceTests.newReaction ( PortInstance trigger)
protected

Return a new reaction triggered by the specified port.

Parameters
triggerThe triggering port.

◆ newReactor()

ReactorInstance org.lflang.tests.compiler.PortInstanceTests.newReactor ( String name,
ReactorInstance container )
protected

The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/core/src/test/java/org/lflang/tests/compiler/PortInstanceTests.java