Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package org.yamcs.alarms;
import java.util.ArrayList;
import org.yamcs.yarch.DataType;
import org.yamcs.yarch.Stream;
import org.yamcs.yarch.Tuple;
import org.yamcs.yarch.TupleDefinition;
public abstract class AlarmStreamer implements AlarmListener {
protected Stream stream;
final DataType dataType;
final TupleDefinition tdefTemplate;
public static final String CNAME_TRIGGER_TIME = "triggerTime";
public static final String CNAME_SEQ_NUM = "seqNum";
public static final String CNAME_CLEARED_BY = "clearedBy";
public static final String CNAME_CLEAR_MSG = "clearedMessage";
public static final String CNAME_CLEARED_TIME = "clearedTime";
public static final String CNAME_ACK_BY = "acknowledgedBy";
public static final String CNAME_ACK_MSG = "acknowledgeMessage";
public static final String CNAME_ACK_TIME = "acknowledgeTime";
public static final String CNAME_SHELVED_BY = "shelvedBy";
public static final String CNAME_SHELVED_MSG = "shelvedMessage";
public static final String CNAME_SHELVED_TIME = "shelvedTime";
public static final String CNAME_SHELVE_DURATION = "shelvedDuration";
public static final String CNAME_UPDATE_TIME = "updateTime";
public static final String CNAME_VALUE_COUNT = "valueCount";
public static final String CNAME_VIOLATION_COUNT = "violationCount";
public AlarmStreamer(Stream s, DataType dataType, TupleDefinition tdefTemplate) {
this.stream = s;
this.dataType = dataType;
this.tdefTemplate = tdefTemplate;
}
@Override
public void notifySeverityIncrease(ActiveAlarm activeAlarm) {
TupleDefinition tdef = tdefTemplate.copy();
ArrayList