FaultManager

class lsst.ts.m2gui.FaultManager(limit_switch_status)

Bases: object

Fault manager to record the system error.

Parameters:
limit_switch_statusdict

Default limit switch status.

Attributes:
signal_errorSignalError

Signal to report the new or cleared errors.

signal_limit_switchSignalLimitSwitch

Signal to report the updated status of limit switch.

errorsset [int]

Errors in the controller.

limit_switch_status_retractdict

Retract limit switch status. The key is the name of limit switch. The value is the status in bool. True if the limit switch is triggered, otherwise, False.

limit_switch_status_extenddict

Extend limit switch status. The key is the name of limit switch. The value is the status in bool. True if the limit switch is triggered, otherwise, False.

Methods Summary

add_error(error)

Add the error.

clear_error(error)

Clear the error.

has_error()

Has the error or not.

reset_errors()

Reset errors.

reset_limit_switch_status(limit_switch_type)

Reset the limit switch status.

update_limit_switch_status(...)

Update the limit switch status.

Methods Documentation

add_error(error)

Add the error.

Parameters:
errorint

Error code.

clear_error(error)

Clear the error.

Parameters:
errorint

Error code.

has_error()

Has the error or not.

Returns:
bool

True if there is the error. Otherwise, False.

reset_errors()

Reset errors.

reset_limit_switch_status(limit_switch_type)

Reset the limit switch status.

Parameters:
limit_switch_typeenum lsst.ts.m2com.LimitSwitchType

Type of limit switch.

Raises:
ValueError

Unsupported limit switch type.

update_limit_switch_status(limit_switch_type, ring, number, new_status)

Update the limit switch status.

Parameters:
limit_switch_typeenum lsst.ts.m2com.LimitSwitchType

Type of limit switch.

ringenum Ring

Name of ring.

numberint

Number of actuator.

new_statusbool

New status of limit switch. If the limit switch is triggered, put True, otherwise, False.

Raises:
ValueError

Unsupported limit switch type.

ValueError

The limit switch is not in the list.