org.yamcs.alarms.AlarmStreamer Maven / Gradle / Ivy
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
© 2015 - 2024 Weber Informatics LLC | Privacy Policy