All Downloads are FREE. Search and download functionalities are using the official Maven repository.

yamcs.protobuf.alarms.alarms.proto Maven / Gradle / Ivy

There is a newer version: 5.10.9
Show newest version
syntax="proto2";

package yamcs.protobuf.alarms;

option java_package = "org.yamcs.protobuf";
option java_outer_classname = "AlarmsProto";
option java_multiple_files = true;

import "google/protobuf/timestamp.proto";

import "yamcs/protobuf/yamcs.proto";
import "yamcs/protobuf/mdb/mdb.proto";
import "yamcs/protobuf/pvalue/pvalue.proto";
import "yamcs/protobuf/events/events.proto";


message AcknowledgeInfo {
  optional string acknowledgedBy = 1;
  optional string acknowledgeMessage = 2;
  optional google.protobuf.Timestamp acknowledgeTime = 5;
}

message ShelveInfo {
  optional string shelvedBy = 1;
  optional string shelveMessage = 2;
  optional google.protobuf.Timestamp shelveTime = 3;
  //when the shelving will expire (can be unset which means that it will never expire)
  optional google.protobuf.Timestamp shelveExpiration = 4; 
}

message ClearInfo {
  optional string clearedBy = 1;
  optional google.protobuf.Timestamp clearTime = 2;
  //if the alarm has been manually cleared, this is the message provided by the operator
  optional string clearMessage = 3;
}

enum AlarmNotificationType {
  ACTIVE = 1;  // Initial active alarms at the moment of request
  TRIGGERED = 2;  // Whenever a new alarm triggers
  SEVERITY_INCREASED = 3;  // Whenever an alarm jumps severity
  VALUE_UPDATED = 4;  // Whenever a value is updated (even if that value is not a violation by itself)
  ACKNOWLEDGED = 5;  // Whenever somebody acknowledged an alarm (it could be that it is still OOL)
  CLEARED = 6; // When the alarm was really cleared by the server (acknowledged && not OOL)
  RTN = 7; // When the parameter that triggered the alarm has returned to normal (the alarm may still be triggered if it has not been acknowledged)
  SHELVED = 8; //when the alarm has been shelved
  UNSHELVED = 9; //when the alarm has been unshelved (either by operator request or automatically at timer expiration)
  RESET = 10; //when a latching alarm has been reset  
  
  TRIGGERED_PENDING = 11; //when an alarm first becomes active but the minimum number of violations has not been met. When that number is met, a TRIGGERED event will be sent
}

enum AlarmType {
  PARAMETER = 1;
  EVENT = 2;
}

enum AlarmSeverity {
  WATCH = 1;
  WARNING = 2;
  DISTRESS = 3;
  CRITICAL = 4;
  SEVERE = 5;
}

// Summary of an alarm applicable for Parameter or Event (possibly
// other in the future) alarms.
// Contains detailed information on the value occurrence that initially
// triggered the alarm, the most severe value since it originally triggered,
// and the latest value at the time of your request.
message AlarmData {
  optional AlarmType type = 1;
  optional google.protobuf.Timestamp triggerTime = 2;

  // For parameter alarms, this is the id of the parameters
  // For event alarms
  //   - the id.namespace is /yamcs/event/, unless 
  //     EVENT_SOURCE starts with a "/" in which case the namespace
  //     is just the 
  //   - the id.name is the 
  optional NamedObjectId id = 3;

  // Distinguisher between multiple alarms for the same id
  optional uint32 seqNum = 4;

  optional AlarmSeverity severity = 5;

  // Number of times the object was in alarm state
  optional uint32 violations = 6;

  // Number of samples received for the object
  optional uint32 count = 7;
  
  optional AcknowledgeInfo acknowledgeInfo = 8;
  optional AlarmNotificationType notificationType = 9;

  // Additional detail in case the alarm is of type PARAMETER
  optional ParameterAlarmData parameterDetail = 10;
  
  // Additional detail in case the alarm is of type EVENT
  optional EventAlarmData eventDetail = 11;

  // Whether the alarm will stay triggered even when the process is OK
  optional bool latching = 12;

  // if the process that generated the alarm is ok (i.e. parameter is within limits)
  optional bool processOK = 13;
  // triggered is same with processOK except when the alarm is latching
  optional bool triggered = 14;
  // if the operator has acknowledged the alarm
  optional bool acknowledged = 15;

  // Details in case the alarm was shelved
  optional ShelveInfo shelveInfo = 16;

  optional ClearInfo clearInfo = 17;

  // Time when the alarm was last updated
  optional google.protobuf.Timestamp updateTime = 18;

  // Whether this alarm may be updated by this processor.
  // Set to false when the alarms are mirrored from another Yamcs instance.
  optional bool readonly = 19;
  
  // An alarm is in pending state if the minViolations has not been reached
  // The alarm is not actually triggered in this case
  // This is only sent when true
  optional bool pending = 20;
}

message ParameterAlarmData {
  optional pvalue.ParameterValue triggerValue = 1;
  optional pvalue.ParameterValue mostSevereValue = 2;
  optional pvalue.ParameterValue currentValue = 3;
  optional mdb.ParameterInfo parameter = 4;
}

message EventAlarmData {
  optional events.Event triggerEvent = 1;
  optional events.Event mostSevereEvent = 2;
  optional events.Event currentEvent = 3;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy