
public class MpmMain extends Object implements org.lsst.ccs.framework.HasLifecycle, org.lsst.ccs.framework.ClearAlertHandler, org.lsst.ccs.services.alert.AlertListener
| Constructor and Description |
|---|
MpmMain() |
| Modifier and Type | Method and Description |
|---|---|
void |
build()
Build phase
|
org.lsst.ccs.framework.ClearAlertHandler.ClearAlertCode |
canClearAlert(org.lsst.ccs.bus.data.Alert alert,
org.lsst.ccs.bus.states.AlertState alertState)
Callback to clear an
Alert instance. |
void |
clearLatch(String cond)
Clears a (named) latched condition.
|
List<String> |
getLatchNames()
Gets the list of latched condition names.
|
List<String> |
getSwitchNames()
Gets the list of switch names.
|
MpmSysState |
getSystemState()
Gets the state of the protection system.
|
void |
onAlert(org.lsst.ccs.services.alert.AlertEvent event)
Alert event handler.
|
void |
postInit()
Post initialization
|
void |
postStart()
Post start
|
void |
setNamedSwitchOn(String swch,
boolean on)
Turns a (named) switch on or off.
|
void |
setUpdatePeriod(int value)
Sets the update period.
|
public void build()
build in interface org.lsst.ccs.framework.HasLifecyclepublic void postInit()
postInit in interface org.lsst.ccs.framework.HasLifecyclepublic void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecycle@Command(type=QUERY,
description="Get the protection system state")
public MpmSysState getSystemState()
@Command(type=QUERY,
description="Get switch names")
public List<String> getSwitchNames()
throws UtilityException
UtilityException@Command(type=ACTION,
description="Turn on/off a named switch")
public void setNamedSwitchOn(@Argument(description="The switch name")
String swch,
@Argument(description="Whether to turn on")
boolean on)
throws UtilityException
swch - The switch name.on - Whether to turn on or offUtilityException@Command(type=QUERY,
description="Get latched condition names")
public List<String> getLatchNames()
throws UtilityException
UtilityException@Command(type=ACTION,
description="Clear a latched condition")
public void clearLatch(@Argument(description="The condition name")
String cond)
throws UtilityException
cond - The condition name.UtilityException@Command(type=ACTION,
description="Set the update interval")
public void setUpdatePeriod(@Argument(description="The tick period (ms)")
int value)
value - The update period (milliseconds) to set.public org.lsst.ccs.framework.ClearAlertHandler.ClearAlertCode canClearAlert(org.lsst.ccs.bus.data.Alert alert,
org.lsst.ccs.bus.states.AlertState alertState)
Alert instance.canClearAlert in interface org.lsst.ccs.framework.ClearAlertHandleralert - The Alert instance to clear.alertState - The AlertState for the provided Alert.public void onAlert(org.lsst.ccs.services.alert.AlertEvent event)
onAlert in interface org.lsst.ccs.services.alert.AlertListenerevent - The alert eventCopyright © 2020 LSST. All rights reserved.