AlarmRuleRunner#

class lsst.ts.watcher.AlarmRuleRunner(rule_name, index)#

Bases: Controller

Parameters:

Methods Summary

amain(**kwargs)

close_tasks()

Close all tasks.

do_acknowledge(data)

Acknowledge the alarm of this rule.

do_configure(data)

Configure the currently loaded alarm rule.

do_mute(data)

Mute the alarm of this rule.

do_run(data)

Run the alarm rule.

do_stop(data)

Stop the alarm rule.

do_unacknowledge(data)

Unacknowledge the alarm of this rule.

do_unmute(data)

Unmute the alarm of this rule.

make_from_cmd_line(**kwargs)

output_alarm(alarm)

Output the alarm event for one alarm.

start()

Finish construction and start running the alarm rule.

Methods Documentation

async classmethod amain(**kwargs)#
Parameters:

kwargs (Any)

Return type:

None

async close_tasks()#

Close all tasks.

Return type:

None

async do_acknowledge(data)#

Acknowledge the alarm of this rule.

Parameters:

data (cmd_acknowledge.DataType) – The data for the acknowledge command.

Return type:

None

async do_configure(data)#

Configure the currently loaded alarm rule.

Parameters:

data (cmd_configure.DataType) – Configuration.

Raises:

salobj.ExpectedError – If self.state.state is not lsst.ts.xml.enums.AlarmRule.AlarmRuleState.UNCONFIGURED.

Return type:

None

async do_mute(data)#

Mute the alarm of this rule.

Parameters:

data (cmd_mute.DataType) – The data for the mute command.

Return type:

None

async do_run(data)#

Run the alarm rule.

The alarm rule must have been configured.

Parameters:

data (cmd_run.DataType) – Ignored.

Raises:

salobj.ExpectedError – If self.state.state is not lsst.ts.xml.enums.Script.AlarmRuleState.CONFIGURED.

Return type:

None

async do_stop(data)#

Stop the alarm rule.

Parameters:

data (cmd_stop.DataType) – Ignored.

Return type:

None

Notes

This is usually called when the Watcher goes to DISABLED state.

async do_unacknowledge(data)#

Unacknowledge the alarm of this rule.

Parameters:

data (cmd_unacknowledge.DataType) – The data for the unacknowledge command.

Return type:

None

async do_unmute(data)#

Unmute the alarm of this rule.

Parameters:

data (cmd_unmute.DataType) – The data for the unmute command.

Return type:

None

classmethod make_from_cmd_line(**kwargs)#
Parameters:

kwargs (Any)

Return type:

AlarmRuleRunner | None

async output_alarm(alarm)#

Output the alarm event for one alarm.

async start()#

Finish construction and start running the alarm rule.

Return type:

None