public class Alerts extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.lsst.ccs.bus.data.Alert |
COMM_ERROR
We raise this alert when the subsystem tried and failed to send a command to TB_Server.
|
static org.lsst.ccs.bus.data.Alert |
INTERNAL_ERROR
We raise this alert when none of the other alerts are applicable.
|
static org.lsst.ccs.bus.data.Alert |
SERVER_ERROR
We raise this alert when the TB_Server replies to a command with an error
or warning message.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
raiseCommAlert(org.lsst.ccs.services.alert.AlertService al,
org.lsst.ccs.drivers.commons.DriverException exc)
Raises a comm alert.
|
static void |
raiseInternalAlert(org.lsst.ccs.services.alert.AlertService al,
Throwable exc)
Raises an internal error alert.
|
static void |
raiseServerAlert(org.lsst.ccs.services.alert.AlertService al,
TBServerException exc)
Raises a server alert.
|
static void |
registerAllAlerts(org.lsst.ccs.services.alert.AlertService al)
Registers all the alerts defined in this class.
|
public static org.lsst.ccs.bus.data.Alert SERVER_ERROR
RaiseAlertStrategy ALWAYS.public static org.lsst.ccs.bus.data.Alert COMM_ERROR
DriverException.
Since comm problems may persist for more than a few seconds and since we poll for
status every one or two seconds, we'll use the RaiseAlertStrategy ON_SEVERITY_CHANGE.public static org.lsst.ccs.bus.data.Alert INTERNAL_ERROR
RaiseAlertStrategy ON_SEVERITY_CHANGE.public static void registerAllAlerts(org.lsst.ccs.services.alert.AlertService al)
AlertService.ALWAYS.al - an instance of the alert service.public static void raiseServerAlert(org.lsst.ccs.services.alert.AlertService al,
TBServerException exc)
al - an instance of the alert service.exc - the exception containing the server's error message.SERVER_ERRORpublic static void raiseCommAlert(org.lsst.ccs.services.alert.AlertService al,
org.lsst.ccs.drivers.commons.DriverException exc)
al - an instance of the alert service.exc - the exception raised by the comm driver.COMM_ERRORpublic static void raiseInternalAlert(org.lsst.ccs.services.alert.AlertService al,
Throwable exc)
al - an instance of the alert service.exc - the exception raised by the subsystem code or the Java runtime.INTERNAL_ERRORCopyright © 2023 LSST. All rights reserved.