Skip to content

Commit

Permalink
Merge pull request #190 from pixxelhq/master
Browse files Browse the repository at this point in the history
v5.10.9-Pixxel-7.1.0
  • Loading branch information
swarup-n authored Jan 9, 2025
2 parents edc5c12 + 0227bdd commit 4a34270
Show file tree
Hide file tree
Showing 36 changed files with 78 additions and 51 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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.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-7.0.0</version>
<version>5.10.9-Pixxel-7.1.0</version>
</parent>

<artifactId>yamcs-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ public void sendEvent(EventSeverity severity, String type, String msg, long gent
log.debug("event: {}; {}; {}", severity, type, msg);
}

Event.Builder eventb = newEvent().setSeverity(severity).setMessage(msg).setGenerationTime(gentime);
Event.Builder eventb = newEvent()
.setSeverity(severity)
.setMessage(msg)
.setGenerationTime(gentime);
if (type != null) {
eventb.setType(type);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,24 @@ public static EventProducer getEventProducer(String yamcsInstance, String source

return eventProducer;
}

/**
*
* @param yamcsInstance
* @param source
* source for the events
* @param repeatedEventTimeoutMillisec
* suppress events that repeat in this interval
* @param repeatedEventReduction
* supress event generation count
* @return an event producer for the given instance, source and with the repeated event reduction turned on.
*/
public static EventProducer getEventProducer(String yamcsInstance, String source,
long repeatedEventTimeoutMillisec, boolean repeatedEventReduction) {
EventProducer eventProducer = getEventProducer(yamcsInstance);
eventProducer.setRepeatedEventReduction(repeatedEventReduction, repeatedEventTimeoutMillisec);
eventProducer.setSource(source);

return eventProducer;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class SessionManager {
*
* In terms of OAuth this corresponds to the lifetime of a refresh token.
*/
private static final long SESSION_IDLE = 30 * 60 * 1000L; // 30 minutes
private static final long SESSION_IDLE = 2 * 60 * 60 * 1000L; // 2 hours

private ConcurrentMap<String, UserSession> sessions = new ConcurrentHashMap<>();
private CopyOnWriteArraySet<SessionListener> sessionListeners = new CopyOnWriteArraySet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ public class SubServiceFour implements PusSubService {
Log log;

EventProducer eventProducer;
static String source = "s(5,4) | High Severity Events";
static String preSource = "s(5,4) | High Severity Events";

public SubServiceFour(String yamcsInstance, YConfiguration subServiceSixConfig) {
this.yamcsInstance = yamcsInstance;
log = new Log(getClass(), yamcsInstance);

eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, this.getClass().getSimpleName(), 10_000, false);
}

@Override
Expand Down Expand Up @@ -95,8 +97,7 @@ public ArrayList<TmPacket> process(TmPacket tmPacket) {
}
}

eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, this.getClass().getSimpleName(), 120000);
eventProducer.setSource(source + " | " + ServiceOne.ccsdsApids.get(apid));
eventProducer.setSource(preSource + " | " + ServiceOne.ccsdsApids.get(apid));

eventDec += " is thrown";
eventProducer.sendEvent(EventSeverity.CRITICAL, ServiceOne.ccsdsApids.get(apid), eventDec, tmPacket.getGenerationTime());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ public class SubServiceOne implements PusSubService {

EventProducer eventProducer;

static String source = "s(5,1) | Informative Events";
static String preSource = "s(5,1) | Informative Events";

public SubServiceOne(String yamcsInstance, YConfiguration subServiceSixConfig) {
this.yamcsInstance = yamcsInstance;
log = new Log(getClass(), yamcsInstance);

eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, this.getClass().getSimpleName(), 10_000, false);
}

@Override
Expand Down Expand Up @@ -97,8 +99,7 @@ public ArrayList<TmPacket> process(TmPacket tmPacket) {
}
}

eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, this.getClass().getSimpleName(), 120000);
eventProducer.setSource(source + " | " + ServiceOne.ccsdsApids.get(apid));
eventProducer.setSource(preSource + " | " + ServiceOne.ccsdsApids.get(apid));

eventDec += " is thrown";
eventProducer.sendEvent(EventSeverity.WATCH, ServiceOne.ccsdsApids.get(apid), eventDec, tmPacket.getGenerationTime());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ public class SubServiceThree implements PusSubService {
Log log;

EventProducer eventProducer;
static String source = "s(5,3) | Medium Severity Events";
static String preSource = "s(5,3) | Medium Severity Events";

public SubServiceThree(String yamcsInstance, YConfiguration subServiceSixConfig) {
this.yamcsInstance = yamcsInstance;
log = new Log(getClass(), yamcsInstance);

eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, this.getClass().getSimpleName(), 10_000, false);
}

@Override
Expand Down Expand Up @@ -96,8 +98,7 @@ public ArrayList<TmPacket> process(TmPacket tmPacket) {
}
}

eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, this.getClass().getSimpleName(), 120000);
eventProducer.setSource(source + " | " + ServiceOne.ccsdsApids.get(apid));
eventProducer.setSource(preSource + " | " + ServiceOne.ccsdsApids.get(apid));

eventDec += " is thrown";
eventProducer.sendEvent(EventSeverity.DISTRESS, ServiceOne.ccsdsApids.get(apid), eventDec, tmPacket.getGenerationTime());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ public class SubServiceTwo implements PusSubService {
Log log;

EventProducer eventProducer;
static String source = "s(5,2) | Low Severity Events";
static String preSource = "s(5,2) | Low Severity Events";

public SubServiceTwo(String yamcsInstance, YConfiguration subServiceSixConfig) {
this.yamcsInstance = yamcsInstance;
log = new Log(getClass(), yamcsInstance);

eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, this.getClass().getSimpleName(), 10_000, false);
}

@Override
Expand Down Expand Up @@ -95,8 +97,7 @@ public ArrayList<TmPacket> process(TmPacket tmPacket) {
}
}

eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, this.getClass().getSimpleName(), 120000);
eventProducer.setSource(source + " | " + ServiceOne.ccsdsApids.get(apid));
eventProducer.setSource(preSource + " | " + ServiceOne.ccsdsApids.get(apid));

eventDec += " is thrown";
eventProducer.sendEvent(EventSeverity.WARNING, ServiceOne.ccsdsApids.get(apid), eventDec, tmPacket.getGenerationTime());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

public class SubServiceEight implements PusSubService {
EventProducer eventProducer;
String yamcsInstance;

static final String source = "Service: 1 | SubService: 8 | Failure";
static final String TC_COMPLETION_EXECUTION_FAILED = "TC_COMPLETION_EXECUTION_FAILED";

public SubServiceEight(String yamcsInstance) {
// FIXME: Confirm the repeatedEventTimeoutMillisec value, which most likely depends on the datarate of TM
eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, this.getClass().getSimpleName(), 10);
eventProducer.setSource(source);
this.yamcsInstance = yamcsInstance;
eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, source, 10_000, false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

public class SubServiceOne implements PusSubService {
EventProducer eventProducer;
String yamcsInstance;

static final String source = "Service: 1 | SubService: 1 | ACCEPTED";
static final String TC_ACCEPTANCE_SUCCESS = "TC_ACCEPTANCE_SUCCESS";

public SubServiceOne(String yamcsInstance) {
// FIXME: Confirm the repeatedEventTimeoutMillisec value, which most likely depends on the datarate of TM
eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, this.getClass().getSimpleName(), 10);
eventProducer.setSource(source);
this.yamcsInstance = yamcsInstance;
eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, source, 10_000, false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

public class SubServiceSeven implements PusSubService {
EventProducer eventProducer;
String yamcsInstance;

static final String source = "Service: 1 | SubService: 7 | Completion";
static final String TC_COMPLETION_EXECUTION_SUCCESS = "TC_COMPLETION_EXECUTION_SUCCESS";

public SubServiceSeven(String yamcsInstance) {
// FIXME: Confirm the repeatedEventTimeoutMillisec value, which most likely depends on the datarate of TM
eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, this.getClass().getSimpleName(), 10);
eventProducer.setSource(source);
this.yamcsInstance = yamcsInstance;
eventProducer = EventProducerFactory.getEventProducer(yamcsInstance, source, 10_000, false);
}

@Override
Expand Down
Loading

0 comments on commit 4a34270

Please sign in to comment.