
public final class TopContext extends Object
| Constructor and Description |
|---|
TopContext(Actions actions)
Saves the action implementations for this context.
|
| Modifier and Type | Method and Description |
|---|---|
default EventReply |
calibDone(CalibDone cal)
Indicates that a Hall calibration operation has been successful.
|
default EventReply |
calibrate(Calibrate cal)
Requests a Hall calibration.
|
default EventReply |
changeAxisEnable(org.lsst.ccs.subsystem.motorplatform.bus.ChangeAxisEnable req)
Requests that the enable state of the given axis be changed.
|
default EventReply |
changeBrakeState(Axis ax,
ChangeBrakeState.State newState)
Requests that the brake state on a given axis be changed.
|
default EventReply |
clearAllFaults(org.lsst.ccs.subsystem.motorplatform.bus.ClearAllFaults req)
Requests that fault conditions be cleared for both axes.
|
default EventReply |
clearAxisFaults(org.lsst.ccs.subsystem.motorplatform.bus.ClearAxisFaults req)
Requests that fault conditions be cleared for the given axis.
|
default EventReply |
closeShutter()
Requests that a closing of the shutter be started.
|
default EventReply |
contactLost()
Indicates that the subsystem can't communicate properly with the shutter PLC.
|
default EventReply |
disable()
Indicates that the shutter hardware protection is forbidding shutter operation.
|
default EventReply |
disableAllAxes(org.lsst.ccs.subsystem.motorplatform.bus.DisableAllAxes req)
Requests that both axes be disabled.
|
default EventReply |
enable()
Indicates that the shutter hardware protection is is allowing shutter operation.
|
default EventReply |
enableAllAxes(org.lsst.ccs.subsystem.motorplatform.bus.EnableAllAxes req)
Requests that both axes be enabled.
|
default EventReply |
error()
Indicates that the shutter tried and failed to carry out a requested operation.
|
void |
finish()
Cleans up a context that's not in active use.
|
Actions |
getActions()
Obtains the set of action implementations owned by this context.
|
String |
getName()
Gets the name of this context.
|
org.lsst.ccs.subsystem.shutter.statemachine.State<C> |
getState()
Gets the current state of this context.
|
default EventReply |
gotoCenter()
Requests that the shutter prepare for power-down by placing both blade sets in the center
position.
|
default EventReply |
gotoProd()
Requests that the shutter, if it's ready to do so, accept subsequent requests to take exposures.
|
default EventReply |
ignored(Ignored.Reason reason)
Indicates that the shutter PLC state machine has ignored an event sent to it.
|
void |
init() |
void |
makeTransition(org.lsst.ccs.subsystem.shutter.statemachine.State<C> newState,
Runnable action)
Performs a state transition, calling the appropriate exit and
entry methods while running the transition action in between.
|
default EventReply |
motionDone(MotionDonePLC mot)
Indicates that a blade set has successfully completed a motion.
|
default EventReply |
moveAxisAbsolute(org.lsst.ccs.subsystem.motorplatform.bus.MoveAxisAbsolute req)
Requests that the given axis be moved to a given absolute position.
|
default EventReply |
moveAxisRelative(org.lsst.ccs.subsystem.motorplatform.bus.MoveAxisRelative req)
Requests that an axis change its position by a certain offset.
|
default EventReply |
openShutter()
Requests that an opening of the shutter be started.
|
default EventReply |
plcIsDisabled()
Indicates that shutter controller has sent a status message in which the reported state
is Enabled.
|
default EventReply |
plcIsEnabled()
Indicates that the shutter controller has sent a status message in which reported
state is Disabled.
|
default EventReply |
reset()
Requests that the shutter controller stop any motion in progress and
reset its state machine to its initial state.
|
default EventReply |
resync()
Triggers another attempt to synchronize states with the PLC.
|
default EventReply |
syncTimeout()
Indicates that after a reset the PLC has taken too long to reach one of
the designated after-reset states.
|
default EventReply |
takeExposure(Duration exposureTime)
Requests that an exposure of the given duration be started.
|
default EventReply |
timer()
Indicates that an exposure in progress has run for its allotted time.
|
public TopContext(Actions actions)
actions - The action implementations.NullPointerException - if the actions ref is null.public void init()
public final org.lsst.ccs.subsystem.shutter.statemachine.State<C> getState()
public String getName()
public final void makeTransition(org.lsst.ccs.subsystem.shutter.statemachine.State<C> newState,
Runnable action)
newState - the next value for the current state.action - The action, possibly null, associated with the transition.NullPointerException - if newState is null.public final Actions getActions()
public void finish()
public EventReply contactLost()
EventscontactLost in interface Eventspublic EventReply ignored(Ignored.Reason reason)
Eventspublic EventReply plcIsEnabled()
Eventsenable()
and disable() event messages sent from the controller.plcIsEnabled in interface Eventspublic EventReply plcIsDisabled()
Eventsenable()
and disable() event messages sent from the controller.plcIsDisabled in interface Eventspublic EventReply resync()
Eventspublic EventReply syncTimeout()
EventssyncTimeout in interface Eventspublic EventReply enable()
Eventspublic EventReply disable()
Eventspublic EventReply motionDone(MotionDonePLC mot)
EventsmotionDone in interface Eventsmot - The motion profile.public EventReply calibrate(Calibrate cal)
Eventspublic EventReply calibDone(CalibDone cal)
Eventspublic EventReply error()
Eventspublic EventReply reset()
Eventspublic EventReply takeExposure(Duration exposureTime)
EventstakeExposure in interface EventsexposureTime - The length of the exposure. If null or too short a duration the
event is rejected.public EventReply openShutter()
EventsopenShutter in interface Eventspublic EventReply timer()
Eventspublic EventReply closeShutter()
EventscloseShutter in interface Eventspublic EventReply gotoProd()
Eventspublic EventReply gotoCenter()
EventsgotoCenter in interface Eventspublic EventReply moveAxisAbsolute(org.lsst.ccs.subsystem.motorplatform.bus.MoveAxisAbsolute req)
EventsmoveAxisAbsolute in interface Eventsreq - Contains the request parameters. If null then the event is rejected.public EventReply moveAxisRelative(org.lsst.ccs.subsystem.motorplatform.bus.MoveAxisRelative req)
EventsmoveAxisRelative in interface Eventsreq - Contains the request parameters. If null then event is rejected.public EventReply clearAllFaults(org.lsst.ccs.subsystem.motorplatform.bus.ClearAllFaults req)
EventsclearAllFaults in interface Eventsreq - Contains the request parameters. If null then the event is rejected.public EventReply changeAxisEnable(org.lsst.ccs.subsystem.motorplatform.bus.ChangeAxisEnable req)
EventschangeAxisEnable in interface Eventsreq - Contains the request parameters. If null then the event is rejected.public EventReply changeBrakeState(Axis ax, ChangeBrakeState.State newState)
EventschangeBrakeState in interface Eventsax - The PLC task axis to affect.newState - The desired brake state.public EventReply clearAxisFaults(org.lsst.ccs.subsystem.motorplatform.bus.ClearAxisFaults req)
EventsclearAxisFaults in interface Eventsreq - Contains the request parameters. If null then the event is rejected.public EventReply enableAllAxes(org.lsst.ccs.subsystem.motorplatform.bus.EnableAllAxes req)
EventsenableAllAxes in interface Eventsreq - Contains the request parameters. If null then event is rejected.public EventReply disableAllAxes(org.lsst.ccs.subsystem.motorplatform.bus.DisableAllAxes req)
EventsdisableAllAxes in interface Eventsreq - Contains the request parameters. If null then the event is rejected.Copyright © 2019 LSST. All rights reserved.