Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A target property for handling downstream next event tag (DNET) signal #2400

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ts-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ jobs:
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
- name: Perform TypeScript tests
run: |
./gradlew targetTest -Ptarget=TypeScript
# -Druntime="git://github.com/lf-lang/reactor-ts.git#master"
./gradlew targetTest -Ptarget=TypeScript -Druntime="git://github.com/lf-lang/reactor-ts.git#master"
- name: Report to CodeCov
uses: ./.github/actions/report-code-coverage
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.lflang.target.property.AuthProperty;
import org.lflang.target.property.ClockSyncModeProperty;
import org.lflang.target.property.ClockSyncOptionsProperty;
import org.lflang.target.property.DNETProperty;
import org.lflang.target.property.TracingProperty;
import org.lflang.target.property.type.ClockSyncModeType.ClockSyncMode;

Expand Down Expand Up @@ -323,6 +324,9 @@ private String getRtiCommand(List<FederateInstance> federates, boolean isRemote)
if (targetConfig.getOrDefault(TracingProperty.INSTANCE).isEnabled()) {
commands.add(" -t \\");
}
if (!targetConfig.getOrDefault(DNETProperty.INSTANCE)) {
commands.add(" -d \\");
}
commands.addAll(
List.of(
" -n " + federates.size() + " \\",
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/org/lflang/target/Target.java
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ public void initialize(TargetConfig config) {
CompilerProperty.INSTANCE,
CoordinationOptionsProperty.INSTANCE,
CoordinationProperty.INSTANCE,
DNETProperty.INSTANCE,
DockerProperty.INSTANCE,
FilesProperty.INSTANCE,
KeepaliveProperty.INSTANCE,
Expand Down
27 changes: 27 additions & 0 deletions core/src/main/java/org/lflang/target/property/DNETProperty.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.lflang.target.property;

/**
* @brief Target property turning on or off the DNET signal optimization.
* <p>If this target property is true, the RTI sends DNET (downstream next event tag) signals to
* an upstream federate to tell the federate that sending LTC and NET signals with tags less
* than the specified value is unnecessary. The default is true.
*/
public final class DNETProperty extends BooleanProperty {

/** Singleton target property instance. */
public static final DNETProperty INSTANCE = new DNETProperty();

private DNETProperty() {
super();
}

@Override
public Boolean initialValue() {
return true;
}

@Override
public String name() {
return "DNET";
}
}
Loading