
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 void |
calibDone(Channel<EventReply> chan,
CalibDone cal)
Indicates that a Hall calibration operation has been successful.
|
default void |
calibrate(Channel<EventReply> chan,
Calibrate cal)
Requests a Hall calibration.
|
default void |
changeAxisEnable(Channel<EventReply> chan,
org.lsst.ccs.subsystem.motorplatform.bus.ChangeAxisEnable req)
Requests that the enable state of the given axis be changed.
|
default void |
changeBrakeState(Channel<EventReply> chan,
Axis ax,
ChangeBrakeState.State newState)
Requests that the brake state on a given axis be changed.
|
default void |
clearAllFaults(Channel<EventReply> chan,
org.lsst.ccs.subsystem.motorplatform.bus.ClearAllFaults req)
Requests that fault conditions be cleared for both axes.
|
default void |
clearAxisFaults(Channel<EventReply> chan,
org.lsst.ccs.subsystem.motorplatform.bus.ClearAxisFaults req)
Requests that fault conditions be cleared for the given axis.
|
default void |
closeShutter(Channel<EventReply> chan)
Requests that a closing of the shutter be started.
|
default void |
contactLost(Channel<EventReply> chan)
Indicates that the subsystem can't communicate properly with the shutter PLC.
|
default void |
disable(Channel<EventReply> chan)
Indicates that the shutter hardware protection is forbidding shutter operation.
|
default void |
disableAllAxes(Channel<EventReply> chan,
org.lsst.ccs.subsystem.motorplatform.bus.DisableAllAxes req)
Requests that both axes be disabled.
|
default void |
enable(Channel<EventReply> chan)
Indicates that the shutter hardware protection is is allowing shutter operation.
|
default void |
enableAllAxes(Channel<EventReply> chan,
org.lsst.ccs.subsystem.motorplatform.bus.EnableAllAxes req)
Requests that both axes be enabled.
|
default void |
error(Channel<EventReply> chan,
Error err)
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 void |
gotoCenter(Channel<EventReply> chan)
Requests that the shutter prepare for power-down by placing both blade sets in the center
position.
|
default void |
gotoProd(Channel<EventReply> chan)
Requests that the shutter, if it's ready to do so, accept subsequent requests to take exposures.
|
default void |
homeAxis(Channel<EventReply> chan,
org.lsst.ccs.subsystem.motorplatform.bus.HomeAxis req)
Requests that the shutter perform a homing operation for the given axis.
|
default void |
ignored(Channel<EventReply> chan,
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 void |
motionDone(Channel<EventReply> chan,
MotionDonePLC mot)
Indicates that a blade set has successfully completed a motion.
|
default void |
moveAxisAbsolute(Channel<EventReply> chan,
org.lsst.ccs.subsystem.motorplatform.bus.MoveAxisAbsolute req)
Requests that the given axis be moved to a given absolute position.
|
default void |
moveAxisRelative(Channel<EventReply> chan,
org.lsst.ccs.subsystem.motorplatform.bus.MoveAxisRelative req)
Requests that an axis change its position by a certain offset.
|
default void |
openShutter(Channel<EventReply> chan)
Requests that an opening of the shutter be started.
|
default void |
plcIsDisabled(Channel<EventReply> chan)
Indicates that shutter controller has sent a status message in which the reported state
is Enabled.
|
default void |
plcIsEnabled(Channel<EventReply> chan)
Indicates that the shutter controller has sent a status message in which reported
state is Disabled.
|
default void |
reset(Channel<EventReply> chan)
Requests that the shutter controller stop any motion in progress and
reset its state machine to one of its initial states.
|
default void |
resync(Channel<EventReply> chan)
Triggers another attempt to synchronize states with the PLC.
|
default void |
syncTimeout(Channel<EventReply> chan)
Indicates that after a reset the PLC has taken too long to reach one of
the designated after-reset states.
|
default void |
takeExposure(Channel<EventReply> chan,
Duration exposureTime)
Requests that an exposure of the given duration be started.
|
default void |
timer(Channel<EventReply> chan)
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 void contactLost(Channel<EventReply> chan) throws InterruptedException
EventscontactLost in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void ignored(Channel<EventReply> chan, Ignored.Reason reason) throws InterruptedException
Eventsignored in interface Eventschan - The channel used to deliver the event reply.reason - The reason why the event was rejected.InterruptedException - if inter-task communication is interrupted.public void homeAxis(Channel<EventReply> chan, org.lsst.ccs.subsystem.motorplatform.bus.HomeAxis req) throws InterruptedException
EventshomeAxis in interface Eventschan - The channel used to deliver the event reply.req - Contains the request parameters. If null then the event is rejected.InterruptedException - if inter-task communication is interrupted.public void plcIsEnabled(Channel<EventReply> chan) throws InterruptedException
Eventsenable()
and disable() event messages sent from the controller.plcIsEnabled in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void plcIsDisabled(Channel<EventReply> chan) throws InterruptedException
Eventsenable()
and disable() event messages sent from the controller.plcIsDisabled in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void resync(Channel<EventReply> chan) throws InterruptedException
Eventsresync in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void syncTimeout(Channel<EventReply> chan) throws InterruptedException
EventssyncTimeout in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void enable(Channel<EventReply> chan) throws InterruptedException
Eventsenable in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void disable(Channel<EventReply> chan) throws InterruptedException
Eventsdisable in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void motionDone(Channel<EventReply> chan, MotionDonePLC mot) throws InterruptedException
EventsmotionDone in interface Eventschan - The channel used to deliver the event reply.mot - The motion profile.InterruptedException - if inter-task communication is interrupted.public void calibrate(Channel<EventReply> chan, Calibrate cal) throws InterruptedException
Eventscalibrate in interface Eventschan - The channel used to deliver the event reply.cal - The calibration parameters. If null the event is rejected.InterruptedException - if inter-task communication is interrupted.public void calibDone(Channel<EventReply> chan, CalibDone cal) throws InterruptedException
EventscalibDone in interface Eventschan - The channel used to deliver the event reply.cal - The results of the calibration.InterruptedException - if inter-task communication is interrupted.public void error(Channel<EventReply> chan, Error err) throws InterruptedException
Eventserror in interface Eventschan - The channel used to deliver the event reply.err - The error message received from the shutter.InterruptedException - if inter-task communication is interrupted.public void reset(Channel<EventReply> chan) throws InterruptedException
Eventsreset in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void takeExposure(Channel<EventReply> chan, Duration exposureTime) throws InterruptedException
EventstakeExposure in interface Eventschan - The channel used to deliver the event reply.exposureTime - The length of the exposure. If null or too short a duration the
event is rejected.InterruptedException - if inter-task communication is interrupted.public void openShutter(Channel<EventReply> chan) throws InterruptedException
EventsopenShutter in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void timer(Channel<EventReply> chan) throws InterruptedException
Eventstimer in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void closeShutter(Channel<EventReply> chan) throws InterruptedException
EventscloseShutter in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void gotoProd(Channel<EventReply> chan) throws InterruptedException
EventsgotoProd in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void gotoCenter(Channel<EventReply> chan) throws InterruptedException
EventsgotoCenter in interface Eventschan - The channel used to deliver the event reply.InterruptedException - if inter-task communication is interrupted.public void moveAxisAbsolute(Channel<EventReply> chan, org.lsst.ccs.subsystem.motorplatform.bus.MoveAxisAbsolute req) throws InterruptedException
EventsmoveAxisAbsolute in interface Eventschan - The channel used to deliver the event reply.req - Contains the request parameters. If null then the event is rejected.InterruptedException - if inter-task communication is interrupted.public void moveAxisRelative(Channel<EventReply> chan, org.lsst.ccs.subsystem.motorplatform.bus.MoveAxisRelative req) throws InterruptedException
EventsmoveAxisRelative in interface Eventschan - The channel used to deliver the event reply.req - Contains the request parameters. If null then event is rejected.InterruptedException - if inter-task communication is interrupted.public void clearAllFaults(Channel<EventReply> chan, org.lsst.ccs.subsystem.motorplatform.bus.ClearAllFaults req) throws InterruptedException
EventsclearAllFaults in interface Eventschan - The channel used to deliver the event reply.req - Contains the request parameters. If null then the event is rejected.InterruptedException - if inter-task communication is interrupted.public void changeAxisEnable(Channel<EventReply> chan, org.lsst.ccs.subsystem.motorplatform.bus.ChangeAxisEnable req) throws InterruptedException
EventschangeAxisEnable in interface Eventschan - The channel used to deliver the event reply.req - Contains the request parameters. If null then the event is rejected.InterruptedException - if inter-task communication is interrupted.public void changeBrakeState(Channel<EventReply> chan, Axis ax, ChangeBrakeState.State newState) throws InterruptedException
EventschangeBrakeState in interface Eventschan - The channel used to deliver the event reply.ax - The PLC task axis to affect.newState - The desired brake state.InterruptedException - if inter-task communication is interrupted.public void clearAxisFaults(Channel<EventReply> chan, org.lsst.ccs.subsystem.motorplatform.bus.ClearAxisFaults req) throws InterruptedException
EventsclearAxisFaults in interface Eventschan - The channel used to deliver the event reply.req - Contains the request parameters. If null then the event is rejected.InterruptedException - if inter-task communication is interrupted.public void enableAllAxes(Channel<EventReply> chan, org.lsst.ccs.subsystem.motorplatform.bus.EnableAllAxes req) throws InterruptedException
EventsenableAllAxes in interface Eventschan - The channel used to deliver the event reply.req - Contains the request parameters. If null then event is rejected.InterruptedException - if inter-task communication is interrupted.public void disableAllAxes(Channel<EventReply> chan, org.lsst.ccs.subsystem.motorplatform.bus.DisableAllAxes req) throws InterruptedException
EventsdisableAllAxes in interface Eventschan - The channel used to deliver the event reply.req - Contains the request parameters. If null then the event is rejected.InterruptedException - if inter-task communication is interrupted.Copyright © 2019 LSST. All rights reserved.