
public class ShutterGUISubsystem extends Object implements org.lsst.ccs.messaging.CommandOriginator, org.lsst.ccs.messaging.StatusMessageListener
| Constructor and Description |
|---|
ShutterGUISubsystem() |
| Modifier and Type | Method and Description |
|---|---|
JComponent |
getControlsComponent() |
JComponent |
getDisplayComponent() |
void |
initGui(org.lsst.ccs.messaging.AgentMessagingLayer aml)
Sets up GUI action listeners, status bus listeners and starts attempting to get
the blade set positions from the worker subsystem.
|
static void |
main(String[] args) |
void |
onStatusMessage(org.lsst.ccs.bus.messages.StatusMessage s)
Updates the GUI in response to status bus messages from the shutter worker.
|
void |
processAck(org.lsst.ccs.bus.messages.CommandAck ack)
Does nothing.
|
void |
processNack(org.lsst.ccs.bus.messages.CommandNack nack)
Does nothing.
|
void |
processResult(org.lsst.ccs.bus.messages.CommandResult res)
Updates the GUI when we receive the current positions of the shutter blade sets.
|
void |
sendCloseShutter() |
void |
sendMoveToPosition(ShutterSide side,
double targetPosition) |
void |
sendOpenShutter() |
void |
sendTakeExposure(double exposureTime) |
void |
setUpActionListeners(ShutterControlPanel control)
Binds actions to the shutter Swing controls.
|
public static void main(String[] args) throws InterruptedException, InvocationTargetException
public void initGui(org.lsst.ccs.messaging.AgentMessagingLayer aml)
aml - the AgentMessagingLayer for this GUI subsystemInterruptedExceptionInvocationTargetExceptionpublic JComponent getDisplayComponent()
public JComponent getControlsComponent()
public void sendMoveToPosition(ShutterSide side, double targetPosition)
public void sendTakeExposure(double exposureTime)
public void sendCloseShutter()
public void sendOpenShutter()
public void onStatusMessage(org.lsst.ccs.bus.messages.StatusMessage s)
onStatusMessage in interface org.lsst.ccs.messaging.StatusMessageListeners - the status bus messagepublic void processAck(org.lsst.ccs.bus.messages.CommandAck ack)
processAck in interface org.lsst.ccs.messaging.CommandOriginatorack - the CommandAckpublic void processNack(org.lsst.ccs.bus.messages.CommandNack nack)
processNack in interface org.lsst.ccs.messaging.CommandOriginatornack - the CommandNackpublic void processResult(org.lsst.ccs.bus.messages.CommandResult res)
processResult in interface org.lsst.ccs.messaging.CommandOriginatorres - the CommandResult
When the positions arrive we give them to the shutter assembly drawing and make it visible.
We also cancel the ping task and shut down the executor service that runs it.public void setUpActionListeners(ShutterControlPanel control)
control - the panel of controlsCopyright © 2016 LSST. All rights reserved.