Skip to content

Commit

Permalink
Merge pull request #189 from pixxelhq/master
Browse files Browse the repository at this point in the history
v5.10.9-Pixxel-7.0.0
  • Loading branch information
swarup-n authored Jan 7, 2025
2 parents 156d878 + 162caad commit edc5c12
Show file tree
Hide file tree
Showing 37 changed files with 67 additions and 66 deletions.
2 changes: 1 addition & 1 deletion distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.yamcs</groupId>
<artifactId>yamcs</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>distribution</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/cascading/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>cascading</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/ccsds-frames/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>ccsds-frames</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/cfdp-udp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>cfdp-udp</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/cfdp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>cfdp</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/perftest1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>perftest1</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/perftest2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>perftest2</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs</groupId>
<artifactId>yamcs</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<groupId>org.yamcs.examples</groupId>
Expand Down
2 changes: 1 addition & 1 deletion examples/pus/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>pus</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/replication1/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>replication1</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/replication2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>replication2</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/replication3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>replication3</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/simulation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>simulation</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/snippets/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>snippets</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/templates/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs.examples</groupId>
<artifactId>examples</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>templates</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion packet-viewer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.yamcs</groupId>
<artifactId>yamcs</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>packet-viewer</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.yamcs</groupId>
<artifactId>yamcs</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>

<packaging>pom</packaging>

Expand Down
2 changes: 1 addition & 1 deletion simulator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.yamcs</groupId>
<artifactId>yamcs</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>simulator</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.yamcs</groupId>
<artifactId>yamcs</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>tests</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion yamcs-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.yamcs</groupId>
<artifactId>yamcs</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>yamcs-api</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion yamcs-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.yamcs</groupId>
<artifactId>yamcs</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>yamcs-client</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion yamcs-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.yamcs</groupId>
<artifactId>yamcs</artifactId>
<version>5.10.9-Pixxel-6.4.1</version>
<version>5.10.9-Pixxel-7.0.0</version>
</parent>

<artifactId>yamcs-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class VcTmPacketHandler implements TmPacketDataLink, VcDownlinkHandler, S
private Parameter spDataInCount, spDataInRate, vcDelta;

// List of published vcDelta's
private ArrayList<ParameterValue> vcDeltas = new ArrayList<>();
private ArrayList<ParameterValue> vcDeltas = new ArrayList<>(1);


public VcTmPacketHandler(String yamcsInstance, String name, VcDownlinkManagedParameters vmp) {
Expand Down Expand Up @@ -120,7 +120,7 @@ public VcTmPacketHandler(String yamcsInstance, String name, VcDownlinkManagedPar
}
}

public synchronized void publishVcDelta(long prevCount, long currentCount, int vcDifference) throws InterruptedException {
public void publishVcDelta(long prevCount, long currentCount, int vcDifference) {
long time = timeService.getMissionTime();
AggregateValue v = new AggregateValue(vcDeltaType.getMemberNames());

Expand All @@ -133,10 +133,6 @@ public synchronized void publishVcDelta(long prevCount, long currentCount, int v
pv.setAcquisitionStatus(AcquisitionStatus.ACQUIRED);
pv.setEngValue(v);

while (Thread.holdsLock(vcDeltas)) {
wait();
}

vcDeltas.add(pv);
}

Expand All @@ -152,12 +148,20 @@ public void handle(DownlinkTransferFrame frame) {
lastFrameSeq = frame.getVcFrameSeq();

// Publish the vcDelta
try {
if (frameLoss != 0)
synchronized (vcDeltas) {
if (frameLoss != 0) {
while (vcDeltas.size() == 1) {
// Wait till consumed
try {
vcDeltas.wait();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
log.error("Interrupted while waiting for vcDeltas to be consumed", e);
}
}
// Produce the vcDelta
publishVcDelta(prevFrameSeq, lastFrameSeq, frameLoss);

} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}

if (frame.containsOnlyIdleData()) {
Expand Down Expand Up @@ -450,11 +454,9 @@ public void setupSystemParameters(SystemParametersService sysParamService) {
}


public synchronized void consumeVcDelta(List<ParameterValue> list) throws InterruptedException {
public void consumeVcDelta(List<ParameterValue> list) {
list.addAll(vcDeltas);
vcDeltas.clear();

notify();
}

@Override
Expand All @@ -463,13 +465,11 @@ public Collection<ParameterValue> getSystemParameters(long time) {
try {
collectSystemParameters(time, list);
synchronized (vcDeltas) {
if (!vcDeltas.isEmpty())
if (!vcDeltas.isEmpty()) {
consumeVcDelta(list);
vcDeltas.notify();
}
}

} catch (InterruptedException e) {
Thread.currentThread().interrupt();

} catch (Exception e) {
log.error("Exception caught when collecting link system parameters", e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public SubServiceTen(String yamcsInstance, YConfiguration config) {

try {
for (Map.Entry<Integer, String> folderN: folders.entrySet())
timetagScheduleDetailReportBucket.putObject(yamcsInstance + "/timetagScheduleDetailReport/" + folderN.getValue() + "/", "application/octet-stream", new HashMap<>(), new byte[0]);
timetagScheduleDetailReportBucket.putObject("timetagScheduleDetailReport/" + folderN.getValue() + "/", "application/octet-stream", new HashMap<>(), new byte[0]);

} catch (IOException e) {
log.error("Unable to create a directory `" + timetagScheduleDetailReportBucket.getName() + "/timetagScheduleDetailReport` for (Service - 11 | SubService - 10)", e);
Expand Down Expand Up @@ -100,7 +100,7 @@ public ArrayList<byte[]> generateTimetagScheduleDetailReport(long gentime, Map<L
Map<String, String> metadata;

if (foundObject == null) {
filename = yamcsInstance + "/timetagScheduleDetailReport/" + folders.get(apid) + "/" + LocalDateTime.ofInstant(
filename = "timetagScheduleDetailReport/" + folders.get(apid) + "/" + LocalDateTime.ofInstant(
Instant.ofEpochSecond(gentime),
ZoneId.of("GMT")
).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'")) + ".csv";
Expand Down Expand Up @@ -239,7 +239,7 @@ public ArrayList<TmPacket> process(TmPacket tmPacket) {
try {
foundObject = findObject(uniqueSignature);
if (foundObject == null) {
String filename = yamcsInstance + "/timetagScheduleDetailReport/" + folders.get(apid) + "/" + LocalDateTime.ofInstant(
String filename = "timetagScheduleDetailReport/" + folders.get(apid) + "/" + LocalDateTime.ofInstant(
Instant.ofEpochSecond(generationTime),
ZoneId.of("GMT")
).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'")) + ".csv";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public SubServiceThirteen(String yamcsInstance, YConfiguration config) {

try {
for (Map.Entry<Integer, String> folderN: folders.entrySet())
timetagScheduleSummaryReportBucket.putObject(yamcsInstance + "/timetagScheduleSummaryReport/" + folderN.getValue() + "/", "application/octet-stream", new HashMap<>(), new byte[0]);
timetagScheduleSummaryReportBucket.putObject("timetagScheduleSummaryReport/" + folderN.getValue() + "/", "application/octet-stream", new HashMap<>(), new byte[0]);

} catch (IOException e) {
log.error("Unable to create a directory `" + timetagScheduleSummaryReportBucket.getName() + "/timetagScheduleSummaryReport` for (Service - 11 | SubService - 13)", e);
Expand Down Expand Up @@ -99,7 +99,7 @@ public void generateTimetagScheduleSummaryReport(long gentime, Map<Long, ArrayLi
Map<String, String> metadata;

if (foundObject == null) {
filename = yamcsInstance + "/timetagScheduleSummaryReport/" + folders.get(apid) + "/" + LocalDateTime.ofInstant(
filename = "timetagScheduleSummaryReport/" + folders.get(apid) + "/" + LocalDateTime.ofInstant(
Instant.ofEpochSecond(gentime),
ZoneId.of("GMT")
).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'")) + ".csv";
Expand Down Expand Up @@ -232,7 +232,7 @@ public ArrayList<TmPacket> process(TmPacket tmPacket) {
ObjectProperties foundObject = findObject(uniqueSignature);

if (foundObject == null) {
String filename = yamcsInstance + "/timetagScheduleSummaryReport/" + folders.get(apid) + "/" + LocalDateTime.ofInstant(
String filename = "timetagScheduleSummaryReport/" + folders.get(apid) + "/" + LocalDateTime.ofInstant(
Instant.ofEpochSecond(generationTime),
ZoneId.of("GMT")
).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'")) + ".csv";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public SubServiceNineteen(String yamcsInstance, YConfiguration config) {
packetStoreStatusReportBucket = PusTmManager.reports;

try {
packetStoreStatusReportBucket.putObject(yamcsInstance + "/packetStoreStatusReport/", "application/octet-stream", new HashMap<>(), new byte[0]);
packetStoreStatusReportBucket.putObject("packetStoreStatusReport/", "application/octet-stream", new HashMap<>(), new byte[0]);

} catch (IOException e) {
log.error("Unable to create a directory `" + packetStoreStatusReportBucket.getName() + "/packetStoreStatusReport` for (Service - 15 | SubService - 19)", e);
Expand All @@ -88,7 +88,7 @@ public PreparedCommand process(PreparedCommand telecommand) {

public void generatePacketStoredStatusReport(long generationTime, Map<Integer, byte[]> packetStoreReportMap) {
long missionTime = PusTmManager.timeService.getMissionTime();
String filename = yamcsInstance + "/packetStoreStatusReport/" + LocalDateTime.ofInstant(
String filename = "packetStoreStatusReport/" + LocalDateTime.ofInstant(
Instant.ofEpochSecond(generationTime),
ZoneId.of("GMT")
).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'")) + ".csv";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public SubServiceThirteen(String yamcsInstance, YConfiguration config) {

try {
for (Map.Entry<Integer, String> folder: packetStoreMap.entrySet())
packetStoreSummaryReportBucket.putObject(yamcsInstance + "/packetStoreSummaryReport/" + folder.getValue() + "/", "application/octet-stream", new HashMap<>(), new byte[0]);
packetStoreSummaryReportBucket.putObject("packetStoreSummaryReport/" + folder.getValue() + "/", "application/octet-stream", new HashMap<>(), new byte[0]);

} catch (IOException e) {
log.error("Unable to create a directory `" + packetStoreSummaryReportBucket.getName() + "/packetStoreSummaryReport` for (Service - 15 | SubService - 13)", e);
Expand All @@ -88,7 +88,7 @@ public void generatePacketStoredSummaryReport(long generationTime, Map<Integer,
).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'")));

for (Map.Entry<Integer, byte[]> packetStoreReport: packetStoreReportMap.entrySet()) {
String filename = yamcsInstance + "/packetStoreSummaryReport/" + packetStoreMap.get(packetStoreReport.getKey()) + "/" + LocalDateTime.ofInstant(
String filename = "packetStoreSummaryReport/" + packetStoreMap.get(packetStoreReport.getKey()) + "/" + LocalDateTime.ofInstant(
Instant.ofEpochSecond(generationTime),
ZoneId.of("GMT")
).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'")) + ".csv";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public SubServiceNine(String yamcsInstance, YConfiguration subServiceSixConfig)
physicalDeviceReportBucket = PusTmManager.reports;

try {
physicalDeviceReportBucket.putObject(yamcsInstance + "/physicalDeviceReport/", "application/octet-stream", new HashMap<>(), new byte[0]);
physicalDeviceReportBucket.putObject("physicalDeviceReport/", "application/octet-stream", new HashMap<>(), new byte[0]);

} catch (IOException e) {
log.error("Unable to create a directory `" + physicalDeviceReportBucket.getName() + "/physicalDeviceReport` for (Service - 2 | SubService - 9)", e);
Expand Down Expand Up @@ -92,7 +92,7 @@ public ArrayList<TmPacket> process(TmPacket tmPacket) {
long generationTime = ByteArrayUtils.decodeCustomInteger(pPkt.getGenerationTime(), 0, PusTmManager.absoluteTimeLength);
long missionTime = PusTmManager.timeService.getMissionTime();

String filename = yamcsInstance + "/physicalDeviceReport/" + LocalDateTime.ofInstant(
String filename = "physicalDeviceReport/" + LocalDateTime.ofInstant(
Instant.ofEpochSecond(generationTime),
ZoneId.of("GMT")
).format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss'Z'")) + ".json";
Expand Down
Loading

0 comments on commit edc5c12

Please sign in to comment.