
public class NodeModularSubsystem extends Subsystem
Subsystem.DictionarySearchResult, Subsystem.SignalThread, Subsystem.State, Subsystem.StatusBroadcasteractionMonitor, ancillaryGroup, closing, commandBuilder, commandBusSelector, commandGroup, commandMonitor, configurationProxy, currentSubsystem, fac, forceShutdown, initializing, initThread, innerState, inTestContext, LOCAL_EXECUTION_INFO, locks, log, logBusHandler, signalsMonitor, startInEngineeringMode, statusBroadcasterLock, statusBroadcasterThread, statusBusSelector, waitingForCommandTermination| Constructor and Description |
|---|
NodeModularSubsystem(String name,
ConfigurationProxy proxy,
EffectiveNode topNode) |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
forwards a HALT signal to all components (that are signalHandlers)
|
void |
abort(long expectedMaxDelay)
same as abort but with a time span.
|
void |
checkAllHardwareStarted()
checks if all HardwareControllers have been started
|
void |
checkAllHardwareStopped()
checks if all HardwareControllers have been stopped
|
void |
checkHardware()
invoke a checkHardware on all HardwareController
(except when return diag modifies the path of invocation)
|
void |
doShutdown()
invokes the shutdownNow() methods on all components (starting from the top main Module)
|
void |
doStart()
invokes the start() methods on all components (starting from the top main Module)
|
void |
dropConfigurationContext()
Deprecated.
Does not perform an actual rollback
|
protected LocalCommandDictionary |
getCommandBuilder(Object object)
to deprecate: invoke configurable.getCommandBuilder instead.
|
protected Configurable |
getCommandDestination(String commandDestination)
utility method to find a Component out of a Command destination
|
ComponentLookupService |
getLookup() |
List<ViewValue> |
getPreOrderComponentList()
*
|
boolean |
isSlave()
to be overriden : tells if the subsystem execute command (they all do: but these are commands that
go further than the standard list of subsystem commands).
|
void |
loadConfiguration()
Loads the default configuration if it exists.
|
void |
loadConfiguration(String config)
Loads the specified configuration.
|
void |
newConfigurationContext()
Deprecated.
will be neutralized in 2.0 and 2.1 branches.
|
void |
postStart()
invokes the postStart() methods on all components (starting from the top main Module)
|
void |
register(String configurationName,
String tag)
Deprecated.
|
void |
registerConfiguration(String configurationName)
Deprecated.
saveConfiguration should be used instead
|
void |
saveConfiguration()
Saves the current Configuration.
|
void |
saveConfiguration(String configurationName)
Saves a configuration with a new name.
|
protected Subsystem.DictionarySearchResult |
searchForDictionary(Command command)
*
searches for details of an incoming command
|
void |
stop()
same as stop(delay) but with an infinite delay
|
void |
stop(long expectedMaxDelay)
forwards a STOP signal to all components (that are signalHandlers)
|
void |
stopAndWait(long expectedMaxDelay)
forwards a STOP signal to all components and then checks if all hardwares have been stopped within expectedMaxDelay
|
void |
switchConfiguration(ConfigProfile oldProfile,
ConfigProfile newProfile)
TODO: modify this code: the quesiton is what is changed between profiles
2 different cases: after engineering modifications and other switches.
|
addLock, broadcastAlarm, broadcastAlarm, broadcastAlarmClear, broadcastStatus, broadcastStatus, clearAlarms, completeInitialization, createState, executeCommandSingleThread, fillStatus, forceShutdown, getAgentPresenceManager, getAncillaryGroup, getCCSVersions, getCommandBusSelector, getConfiguration, getConfigurationProxy, getCurrentActionThread, getCurrentSubsystemName, getDefaultSelector, getEthHardAddress, getInnerState, getLogger, getMessagingAccess, getName, getNumberCommandThreads, getSoftwareRevision, getStateForPublication, getStatus, getStatusBroadcastPeriod, getStatusBusSelector, getSystemDictionary, getTag, initialisationEndPhase, initLogBusHandler, interruptActionThread, interruptAllRunningCommands, interruptAllSignalThreads, interruptAncillaryThreads, interruptInitThread, isInEngineeringMode, isInTestContext, isListenToStatus, isMaster, isMultithreaded, isStartedInEngineeringMode, lockUpdate, onAck, onCommand, onReply, onStatus, ping, printRunningCommands, publishData, publishData, publishData, publishData, publishData, publishData, publishData, publishMetaData, publishReply, publishStateChange, publishStatus, publishStatus, publishStatus, publishStatus, publishStatus, publishStatus, publishStatusData, publishTrendingStatus, raiseAlarm, rawCommandExecution, registerAsBusMaster, removeLock, removeLogPanicState, searchForDictionary, sendRawStatus, setBusLogHandlerLevel, setCommandBusSelector, setConfigurationProxy, setListenToStatus, setLogFormat, setLogHandlerLevel, setLogLevel, setMultithreaded, setName, setStackTraceDepth, setStatusBroadcastPeriod, setStatusBusSelector, shutdown, start, startStatusBroadcasting, stayAlive, stopStatusBroadcasting, switchToEngineeringMode, switchToErrorState, switchToNormalMode, switchToShutdownState, tryReadyState, updateCurrentSubsystem, updateState, updateState, waitForCommandExecution, waitForReadyState, warningpublic NodeModularSubsystem(String name, ConfigurationProxy proxy, EffectiveNode topNode)
name - should not be emptyproxy - the configuration proxy (local, remote or test)topNode - node describing the top component (main)public boolean isSlave()
Subsystempublic ComponentLookupService getLookup()
public List<ViewValue> getPreOrderComponentList()
public void doStart()
public void postStart()
throws HardwareException
postStart in class SubsystemHardwareException - because some "homing" operations may be tried by the hardwarepublic void doShutdown()
doShutdown in class Subsystemprotected Configurable getCommandDestination(String commandDestination)
commandDestination - protected LocalCommandDictionary getCommandBuilder(Object object)
getCommandBuilder in class Subsystemobject - protected Subsystem.DictionarySearchResult searchForDictionary(Command command) throws CommandInvocationException
searchForDictionary in class Subsystemcommand - CommandInvocationException@Command(description="halt", type=ABORT) public void abort()
@Command(description="halt with expected max delay", type=ABORT) public void abort(long expectedMaxDelay)
@Command(description="stops with expected max delay", type=ACTION) public void stop(long expectedMaxDelay) throws HardwareException
stop in class SubsystemexpectedMaxDelay - time limit for executionHardwareException@Command(description="stops hardware", type=ACTION) public void stop() throws HardwareException
HardwareException@Command(description="waits until all the hardware devices are actually stopped", type=ACTION) public void stopAndWait(long expectedMaxDelay) throws HardwareException, InterruptedException
expectedMaxDelay - HardwareException, - InterruptedExceptionHardwareExceptionInterruptedExceptionpublic void checkHardware()
throws HardwareException
checkHardware in class SubsystemHardwareException - a list of HardwareExceptionpublic void checkAllHardwareStarted()
throws HardwareException
checkAllHardwareStarted in class SubsystemHardwareException - a list of exception fired by hardware that are not startedpublic void checkAllHardwareStopped()
throws HardwareException
checkAllHardwareStopped in class SubsystemHardwareException - a list of exception fired by hardware that are not stopped@Deprecated @Command(description="will create a new context for modifying parameters (engineering mode)", type=ACTION) public final void newConfigurationContext()
@Command(description="@Deprecated: registers a new configuration with name and tag", type=CONFIGURATION) @Deprecated public final void register(@Argument(name="configurationName",description="The Name of the Configuration") String configurationName, @Argument(name="tag",description="The new tag name",defaultValue="") String tag) throws IOException
configurationName - tag - IOException@Deprecated @Command(description="registers a new configuration with a name", type=CONFIGURATION) public final void registerConfiguration(@Argument(name="configurationName",description="The Name of the Configuration") String configurationName) throws IOException
configurationName - IOException@Command(description="Saves a new configuration with a name", type=CONFIGURATION) public final void saveConfiguration(@Argument(name="configurationName",description="The Name of the Configuration") String configurationName) throws IOException
configurationName - the new configuration nameIOException@Command(description="Overwrites the current configuration", type=CONFIGURATION) public final void saveConfiguration() throws IOException
IOException@Command(description="will drop context for modifying parameters (engineering mode)", type=CONFIGURATION) public void dropConfigurationContext()
@Command(description="loads a new configuration with a name", type=CONFIGURATION) public void loadConfiguration(@Argument(name="configurationName",description="The Name of the Configuration") String config) throws Exception
config - The name of the configurationIllegalArgumentException - if the argument is a path or if it does
not match to an existing configuration file (except when loading the default
configuration).Exception@Command(description="loads the default configuration", type=CONFIGURATION) public void loadConfiguration() throws Exception
Exceptionpublic void switchConfiguration(ConfigProfile oldProfile, ConfigProfile newProfile) throws Exception
oldProfile - profile still active in databasenewProfile - profile to be registered afterwardsException - could be that a parameter change is refused by code or that rollback failed afterwardsCopyright © 2015 LSST. All rights reserved.