Skip to content

Commit

Permalink
-Add GDL90Devices SystemParameter
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo-gomez-windhover committed Feb 22, 2024
1 parent ca3b728 commit 7434716
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions src/main/java/com/windhoverlabs/yamcs/gdl90/GDL90Link.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,15 @@ public GDL90Device(
}

public String toString() {
return "Host:" + this.host + ", Port:" + this.port + ", Sending:" + this.alive;
return "\"Host:"
+ this.host
+ ", Port:"
+ this.port
+ ", Alive:"
+ this.alive
+ ", BlackListed:"
+ this.blackListed
+ "\"";
}
}
/* Configuration Defaults */
Expand All @@ -146,6 +154,8 @@ public String toString() {
private Parameter outOfSyncParam;
private Parameter streamEventCountParam;
private Parameter logEventCountParam;

private Parameter devicesParam;
private int streamEventCount;
private int logEventCount;

Expand Down Expand Up @@ -732,7 +742,7 @@ private synchronized void sendOwnshipReport() throws IOException {
ownship.Latitude = 44.90708;
ownship.Longitude = -122.99488;
// TODO: Should be used for AHRS heading bit
ownship.TrueHeading = this.config.getBoolean("TrueHeading");
ownship.TrueHeading = this.config.getBoolean("TrueHeading", true);

org.yamcs.protobuf.Pvalue.ParameterValue pvLatitude = paramsToSend.get("Latitude");

Expand Down Expand Up @@ -1142,6 +1152,12 @@ public void setupSystemParameters(SystemParametersService sysParamCollector) {
linkName + "/logEventCountParam",
Yamcs.Value.Type.UINT64,
"Event count from log files");

devicesParam =
sysParamCollector.createSystemParameter(
linkName + "/GDL90Devices",
Yamcs.Value.Type.STRING,
"Current gdl90 devices and status");
}

@Override
Expand All @@ -1163,6 +1179,7 @@ protected void collectSystemParameters(long time, List<ParameterValue> list) {
list.add(SystemParametersService.getPV(outOfSyncParam, time, outOfSync));
list.add(SystemParametersService.getPV(streamEventCountParam, time, streamEventCount));
list.add(SystemParametersService.getPV(logEventCountParam, time, logEventCount));
list.add(SystemParametersService.getPV(devicesParam, time, gdl90Devices.toString()));
}

@Override
Expand Down

0 comments on commit 7434716

Please sign in to comment.