AlarmStateTracker

org.eso.ias.sink.email.AlarmStateTracker
See theAlarmStateTracker companion object

AlarmStateTracker records the changes of the state of an alarm to be notified to the user by email or some other mechanism.

The update of an alarm is a AlarmState. The state is one of the values defined in Alarm so it records activation, priority, validity and deactivation.

The tracker saves the state of the last round i.e. the actual state before resetting. This allows to know if the state changed since the last reset and also avoid saving states if they did not change from one time interval to another

The AlarmStateTracker is immutable. New change of state are added at the head of the list.

Value parameters

id

the identifier of the alarm

stateChanges

The state changes recorded so far for the current time interval

stateOfLastRound

the last state before resetting

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

Attributes

Returns

The actual state, if exists

def numOfChanges: Int

Attributes

Returns

the number of changes of states recorded

Reset the AlarmStateTracker to be ready to record the changes of states of the next time interval

Reset the AlarmStateTracker to be ready to record the changes of states of the next time interval

Attributes

Returns

The AlarmStateTracker to record changes during the next time interval

def stateUpdate(alarm: Alarm, validity: IasValidity, timestamp: Long): AlarmStateTracker

Build a new AlarmStateTracker that records the new alarm change at a given time.

Build a new AlarmStateTracker that records the new alarm change at a given time.

Value parameters

alarm

The new alarm

timestamp

The timestamp when the alarm has been produced

validity

the validity

Attributes

Returns

the AlarmStateTracker that records this change

Concrete fields

val id: String