Skip to content

Commit

Permalink
Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
erlingrj committed May 15, 2024
1 parent 91ef875 commit 7cfa09e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ public static void addClockSyncCompileDefinitions(FederateInstance federate) {
defs.put("_LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL", String.valueOf(options.trials));
defs.put("_LF_CLOCK_SYNC_ATTENUATION", String.valueOf(options.attenuation));

if (options.collectStats) {
defs.put("_LF_CLOCK_SYNC_COLLECT_STATS", "");
}
if (options.collectStats) {
defs.put("_LF_CLOCK_SYNC_COLLECT_STATS", "");
}
CompileDefinitionsProperty.INSTANCE.update(federate.targetConfig, defs);
}

Expand All @@ -291,7 +291,6 @@ public static void addDisableClockSyncCompileDefinitions(FederateInstance federa
CompileDefinitionsProperty.INSTANCE.update(federate.targetConfig, defs);
}


/** Generate a file to be included by CMake. */
public static void generateCMakeInclude(
FederateInstance federate, FederationFileConfig fileConfig) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ protected Class<ClockSyncMode> enumClass() {
* <li>STARTUP: Clock synchronization occurs at startup only.
* <li>ON: Clock synchronization occurs at startup and at runtime.
* </ul>
* The values associated with the enum must match what is defined in
* clock_sync.h in reactor-c
*
* The values associated with the enum must match what is defined in clock_sync.h in reactor-c
*
* @author Edward A. Lee
*/
public enum ClockSyncMode {
OFF(1),
INIT(2),
ON(3);
private final int value;

private ClockSyncMode(int value) {
this.value = value;
}
Expand All @@ -34,6 +36,7 @@ private ClockSyncMode(int value) {
public String toString() {
return this.name().toLowerCase();
}

public int toInt() {
return this.value;
}
Expand Down

0 comments on commit 7cfa09e

Please sign in to comment.