
public interface HardwareController
Note that these methods are invoked as part of a top to bottom tree walking of the components that make the modular structure of the enclosing subsystem.
| Modifier and Type | Method and Description |
|---|---|
default TreeWalkerDiag |
checkHardware()
Override to initiate interaction with the hardware.
|
default void |
checkStopped()
Override with specific code to stop the hardware.
|
default TreeWalkerDiag checkHardware() throws HardwareException
PhaseState.INITIALIZING state.
If accessing the hardware is considered as having failed, this method
should throw an HardwareException. This will
interrupt the startup process and make the subsystem go to
OperationalState.ENGINEERING_FAULT and stays in PhaseState.INITIALIZING.
The startup process will be resumed with a call to
org.lsst.ccs.Subsystem#completeInitialization() that will invoke
HardwareController#checkStarted()
If this method is considered having succeeded, the state goes to
OperationalState.ENGINEERING_OK and PhaseState.OPERATIONAL
TreeWalkerDiag indicating if
this component has already performed hardware checking for its own
components (HANDLING_CHILDREN) or if the framework should do it
(GO)HardwareException - if any failure interacting with the hardware
occurs. The exception is caught by the framework.default void checkStopped()
throws HardwareException
org.lsst.ccs.Subsystem#shutdown() or
org.lsst.ccs.Subsystem#stop(long). At the time it is called, the
enclosing subsystem is in PhaseState.CLOSING phase
If a failure in stopping hardware is noticed, the implementation should
throw an HardwareException. This will interrupt the
shutdown process
If no HardwareException is thrown, the shutdown process will
resume.
HardwareException - if a failure occurs while stopping
the hardware.Copyright © 2020 LSST. All rights reserved.