FaultManager

class lsst.ts.m2gui.FaultManager(limit_switch_status: dict)

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.

summary_faults_statusint

Summary faults status in the cell controller.

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.

report_enabled_faults_mask(mask)

Report the enabled faults mask.

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.

update_summary_faults_status(status)

Update the summary faults status.

Methods Documentation

add_error(error: int) None

Add the error.

Parameters

errorint

Error code.

clear_error(error: int) None

Clear the error.

Parameters

errorint

Error code.

has_error() bool

Has the error or not.

Returns

bool

True if there is the error. Otherwise, False.

report_enabled_faults_mask(mask: int) None

Report the enabled faults mask.

Parameters

maskint

Enabled faults mask.

reset_errors() None

Reset errors.

reset_limit_switch_status(limit_switch_type: LimitSwitchType) None

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: LimitSwitchType, ring: Ring, number: int, new_status: Status) None

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_statusenum Status

New status of limit switch.

Raises

ValueError

Unsupported limit switch type.

ValueError

The limit switch is not in the list.

update_summary_faults_status(status: int) None

Update the summary faults status.

Parameters

statusint

New status.