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

Merged
merged 23 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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#dnet-ad-hoc"
byeonggiljun marked this conversation as resolved.
Show resolved Hide resolved
- 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
2 changes: 2 additions & 0 deletions core/src/main/java/org/lflang/target/Target.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import org.lflang.target.property.CompilerProperty;
import org.lflang.target.property.CoordinationOptionsProperty;
import org.lflang.target.property.CoordinationProperty;
import org.lflang.target.property.DNETProperty;
import org.lflang.target.property.DockerProperty;
import org.lflang.target.property.ExportDependencyGraphProperty;
import org.lflang.target.property.ExportToYamlProperty;
Expand Down Expand Up @@ -593,6 +594,7 @@ public void initialize(TargetConfig config) {
CompilerProperty.INSTANCE,
CoordinationOptionsProperty.INSTANCE,
CoordinationProperty.INSTANCE,
DNETProperty.INSTANCE,
DockerProperty.INSTANCE,
FilesProperty.INSTANCE,
KeepaliveProperty.INSTANCE,
Expand Down
25 changes: 25 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,25 @@
package org.lflang.target.property;

/**
* If true, the RTI sends DNET signals during the execution of federation. The default is ture (for
* now, for testing).
byeonggiljun marked this conversation as resolved.
Show resolved Hide resolved
*/
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";
}
}
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/c/reactor-c
Loading