
public class SimulatedActions extends Object implements Actions
Actions in which no hardware operations are performed.
All actions are logging at info level. Subsystem-level operations such as
alert handling or manipulation of the state bundle are implemented.| Constructor and Description |
|---|
SimulatedActions(Controller control,
StateMachine machine,
org.lsst.ccs.Subsystem subsys,
Publisher publish,
Watchdog wdog)
Saves references to the components that actually implement the actions.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancelSyncTimer()
Cancels the sync timer if it's still running.
|
void |
disableWatchdog()
Disables the watchdog that raises an alert if we don't get any PLC messages for a long time.
|
void |
enableWatchdog()
Enables the watchdog that raises an alert if we don't get any PLC messages for a long time.
|
boolean |
isBadExposureTime(Duration exposureTime)
Determines whether the exposure time has an invalid value, for example, it's below
the minimum.
|
void |
lowerMotionAlert()
Sets the severity of the MOTION alert to NOMINAL.
|
void |
lowerPLCAlert()
Sets the severity of the PLC alert to NOMINAL.
|
void |
lowerSyncAlert()
Sets the severity of the SYNC alert to NOMINAL.
|
void |
lowerWatchdogAlert()
Sets the severity of the PLC_WATCHDOG alert to NOMINAL.
|
boolean |
makeFullContact()
Widens the link to the shutter controller, allowing the full exchange
of all message types.
|
boolean |
makePartialContact()
Makes a link to the shutter controller, just enough to sent rest messages
and receive shutter status messages.
|
void |
publishEnableStatus(boolean isEnabled)
Record when we enter or leave the
Enabled state. |
void |
raisePLCAlert(Error err)
Raises a PLC alert with severity ALARM.
|
void |
raiseSyncAlert()
Raises a SYNC alert with severity ALARM.
|
boolean |
readyForCalibration()
Determines if the shutter is ready for calibration.
|
void |
relay(MsgToPLC eventMsg)
Relays an event to the PLC via the given message instance.
|
void |
resetPLC()
Sends a reset() event to the PLC.
|
void |
saveCalib(CalibDone cal)
Saves the calibration data to a filesystem on the CCS network.
|
void |
sendProfile(MotionDonePLC mot)
Sends the motion profile out on the CCS status bus.
|
void |
setPhysicalState(PhysicalState newState)
Sets the physical shutter custom state that appears in the subsystem's state bundle.
|
void |
setSoftwareState(SoftwareState newState)
Sets the CCS software custom state that appears in the subsystem's state bundle.
|
String |
shutterIsReady()
Determines if the shutter is ready for production data-taking.
|
void |
startFirstCentering()
Sends an event to the PLC that will start it moving one of the blade sets to its center position.
|
void |
startSecondCentering()
Sends an event to the PLC that will start it moving the second blade set to be centered, which is the
one that wasn't moved by
startFirstCentering(). |
void |
startSyncTimer()
Starts a timer which will generate a
syncYimeout() when it expires. |
void |
terminateContact()
Close any connection we may have to the shutter controller and stop decoding any messages
we have already received.
|
public SimulatedActions(Controller control, StateMachine machine, org.lsst.ccs.Subsystem subsys, Publisher publish, Watchdog wdog)
control - A reference to the Controller component.machine - A reference to the StateMachine component.subsys - A reference to the subsystem object.publish - A reference to the Publisher component.wdog - A reference to the Watchdog component.public void cancelSyncTimer()
ActionscancelSyncTimer in interface ActionsActions.startSyncTimer()public void disableWatchdog()
ActionsdisableWatchdog in interface ActionsActions.enableWatchdog()public void enableWatchdog()
ActionsenableWatchdog in interface ActionsActions.disableWatchdog()public boolean isBadExposureTime(Duration exposureTime)
ActionsisBadExposureTime in interface ActionsexposureTime - The time to check.public void lowerMotionAlert()
ActionslowerMotionAlert in interface Actionspublic void lowerPLCAlert()
ActionslowerPLCAlert in interface Actionspublic void lowerSyncAlert()
ActionslowerSyncAlert in interface Actionspublic void lowerWatchdogAlert()
ActionslowerWatchdogAlert in interface Actionspublic boolean makePartialContact()
ActionsmakePartialContact in interface Actionspublic boolean makeFullContact()
ActionsmakeFullContact in interface Actionspublic void publishEnableStatus(boolean isEnabled)
ActionsEnabled state.publishEnableStatus in interface ActionsisEnabled - True if entering, false if exiting.public void setPhysicalState(PhysicalState newState)
ActionssetPhysicalState in interface ActionsnewState - The new state value.public void setSoftwareState(SoftwareState newState)
ActionssetSoftwareState in interface ActionsnewState - The new state value.public void raisePLCAlert(Error err)
ActionsraisePLCAlert in interface Actionserr - The error message received from the PLC.public void raiseSyncAlert()
ActionsraiseSyncAlert in interface Actionspublic boolean readyForCalibration()
ActionsreadyForCalibration in interface Actionspublic void resetPLC()
Actionspublic void relay(MsgToPLC eventMsg)
Actionspublic void saveCalib(CalibDone cal)
Actionspublic void sendProfile(MotionDonePLC mot)
ActionssendProfile in interface Actionspublic void startFirstCentering()
ActionsstartFirstCentering in interface ActionsActions.startSecondCentering()public void startSecondCentering()
ActionsstartFirstCentering().startSecondCentering in interface ActionsActions.startFirstCentering()public String shutterIsReady()
ActionsshutterIsReady in interface Actionspublic void startSyncTimer()
ActionssyncYimeout() when it expires.startSyncTimer in interface ActionsActions.cancelSyncTimer()public void terminateContact()
ActionsterminateContact in interface ActionsCopyright © 2020 LSST. All rights reserved.