alarmserver.alarmserver.AlarmServer

Package alarmserver :: Module alarmserver :: Class AlarmServer |
[hide private]
[frames] | no frames]

# Class AlarmServer

source code

Known Subclasses:
  - gui.AlarmServerModel

An alarm server with the possibility to define alarms, raise, acknowledge and clear them.

Instance Methods | [hide private]
__init__(self) | source code
acknowledge(self, alarm_nr) Acknowledge a specific alarm identified via alarm_nr. | source code
acknowledge_all(self) Acknowledge all current alarms. | source code
alarm_coming(self, alarm_nr) Set the alarm with the given number to active. | source code
alarm_going(self, alarm_nr) Set the alarm with the given number to inactive. | source code
clear(self, alarm_nr) Remove the alarm with the given number from the list of current alarms. | source code
clear_all(self) Remove all alarms from the list of current alarms. | source code
define_alarm(self, alarm_nr, alarm_text) Define a new alarm and add it to the list `defined_alarms`. | source code

Instance Variables | [hide private]
list | current_alarms list of current alarms
dict | defined_alarms dictionary of all defined alarms, key is the alarm number

Properties | [hide private]
list | unacknowledged_alarms list of all unacknowledged alarms

Method Details | [hide private]

### acknowledge(self, alarm_nr) | source code
Acknowledge a specific alarm identified via alarm_nr. Parameters: `alarm_nr` (int)

### alarm_coming(self, alarm_nr) | source code
Set the alarm with the given number to active. If the alarm is not active but in the current alarm list the counter will be raised by one. If the alarm is not in the current alarm list it will be inserted. The `time_coming` attribute is set to the current time if the alarm has been inactive. Parameters: `alarm_nr` (int)

### alarm_going(self, alarm_nr) | source code
Set the alarm with the given number to inactive. The `time_going` attribute is set to the current time if the alarm has been active. Parameters: `alarm_nr` (int)

### clear(self, alarm_nr) | source code
Remove the alarm with the given number from the list of current alarms. All instance variables will be set to their initial value. Parameters: `alarm_nr` (int)

### define_alarm(self, alarm_nr, alarm_text) | source code
Define a new alarm and add it to the list `defined_alarms`. Parameters: `alarm_nr` (int) - key value for accessing the alarm `alarm_text` (basestring) - text describing the alarm

Property Details | [hide private]

### unacknowledged_alarms list of all unacknowledged alarms Get Method: unreachable.unacknowledged_alarms(self) - list of all unacknowledged alarms Type: list