public abstract class GenericMCM<MinionT extends Enum<MinionT>,GroupT extends Enum<GroupT>,EventT extends Enum<EventT>,StateT extends Enum<StateT>,CommandT extends Enum<CommandT>>
extends org.lsst.ccs.Subsystem
implements org.lsst.ccs.framework.HasLifecycle
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,AlertDispatcher> |
dispatchers |
protected static org.lsst.ccs.utilities.logging.Logger |
log |
protected Map<GroupT,Map<String,MinionT>> |
minions |
protected MCMUtilities<MinionT,GroupT,EventT> |
mu |
protected Random |
random |
| Constructor and Description |
|---|
GenericMCM() |
GenericMCM(String name) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCommandValidity(CommandT cmd) |
<MinionStateT extends Enum<MinionStateT>> |
checkState(GroupT g,
MinionT sys,
MinionStateT... state) |
<MinionStateT extends Enum<MinionStateT>> |
checkState(GroupT g,
MinionT sys,
MinionStateT state) |
Future<?> |
execute(Runnable r) |
<MinionStateT extends Enum<MinionStateT>> |
expectingState(GroupT g,
MinionT m,
MinionStateT state) |
String[] |
getAlertDispatchers() |
protected MCMUtilities |
getMcmUtilities() |
protected abstract Class<StateT> |
getStateClass() |
void |
init() |
protected abstract void |
initAllowedTransitions() |
protected abstract void |
initMCM() |
<MinionStateT extends Enum<MinionStateT>> |
isInState(GroupT g,
MinionT sys,
MinionStateT state) |
void |
onAlert(AlertNotification notif) |
void |
publishEvent(MCMIR2Event e) |
ScheduledFuture<?> |
schedule(Runnable r,
Duration delay) |
Object |
send(GroupT g,
MinionT dst,
String command,
Object... parms) |
Future<Object> |
sendAsync(GroupT g,
MinionT dst,
String command,
Object... parms) |
Object |
sendLongCommand(GroupT g,
MinionT dst,
long duration,
String command,
Object... parms) |
void |
setAbortingOnAlarmMinions(GroupT g,
MinionT... m) |
protected void |
setState(StateT s) |
void |
start() |
String |
status() |
<MinionStateT extends Enum<MinionStateT>> |
waitForState(GroupT g,
MinionT sys,
MinionStateT state,
long timeout) |
void |
waitMillis(long millis) |
<MinionStateT extends Enum<MinionStateT>> |
watchForState(GroupT g,
MinionT sys,
MinionStateT state) |
getLogHandler, getNumberCommandThreads, ping, printRunningCommands, setLogFormat, setLogHandlerLevel, setLogLevel, setStackTraceDepth, switchToEngineeringMode, switchToNormalModeaddCommandsFromObject, addStateChangeListener, broadcastStatus, checkAllHardwareStopped, createHelper, executeCommandRequest, getAgentInfo, getAgentLockService, getAgentPeriodicTaskService, getAgentPersistenceService, getAgentService, getAgentServices, getAgentStatusAggregatorService, getCCSVersions, getCommandCount, getComponentConfigurationEnvironment, getComponentConfigurationEnvironmentByName, getComponentLookup, getConfigurationService, getCurrentAction, getDataProviderDictionaryService, getDescription, getDistributionInfo, getEnvironmentLockService, getEnvironmentMessagingAccess, getLogger, getMessagingAccess, getMonitor, getName, getScheduler, getState, getState, getStatusBroadcastPeriod, helper, internalCheckHardware, isConnectedToTheBuses, isInEngineeringMode, isInState, isInState, populateComponentLookup, preBuild, preInit, printComponentNodeTree, publishSubsystemDataOnStatusBus, removeStateChangeListener, sendAck, sendNack, sendStatusMessage, setAgentName, setAgentProperty, shutdownAgent, startAgent, startAgent, updateAgentComponentState, updateAgentState, updateAgentState, waitForclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected MCMUtilities<MinionT extends Enum<MinionT>,GroupT extends Enum<GroupT>,EventT extends Enum<EventT>> mu
protected Map<GroupT extends Enum<GroupT>,Map<String,MinionT extends Enum<MinionT>>> minions
@LookupField(strategy=CHILDREN) protected Map<String,AlertDispatcher> dispatchers
protected Random random
protected static final org.lsst.ccs.utilities.logging.Logger log
public GenericMCM()
public GenericMCM(String name)
public void init()
init in interface org.lsst.ccs.framework.HasLifecyclepublic void start()
start in interface org.lsst.ccs.framework.HasLifecycleprotected MCMUtilities getMcmUtilities()
protected abstract void initAllowedTransitions()
protected abstract void initMCM()
protected void setState(StateT s)
protected void checkCommandValidity(CommandT cmd)
public void onAlert(AlertNotification notif)
@Command public String[] getAlertDispatchers()
@Command public String status()
public void publishEvent(MCMIR2Event e)
public Object send(GroupT g, MinionT dst, String command, Object... parms) throws Exception
Exceptionpublic Object sendLongCommand(GroupT g, MinionT dst, long duration, String command, Object... parms) throws Exception
Exceptionpublic <MinionStateT extends Enum<MinionStateT>> Future<org.lsst.ccs.bus.messages.StatusMessage> watchForState(GroupT g, MinionT sys, MinionStateT state)
public <MinionStateT extends Enum<MinionStateT>> void waitForState(GroupT g, MinionT sys, MinionStateT state, long timeout)
public void waitMillis(long millis)
public <MinionStateT extends Enum<MinionStateT>> void checkState(GroupT g, MinionT sys, MinionStateT state)
@SafeVarargs public final <MinionStateT extends Enum<MinionStateT>> void checkState(GroupT g, MinionT sys, MinionStateT... state)
public <MinionStateT extends Enum<MinionStateT>> boolean isInState(GroupT g, MinionT sys, MinionStateT state)
public <MinionStateT extends Enum<MinionStateT>> MCMUtilities.ExpectedStateCombination<MinionStateT> expectingState(GroupT g, MinionT m, MinionStateT state)
@SafeVarargs public final void setAbortingOnAlarmMinions(GroupT g, MinionT... m)
public ScheduledFuture<?> schedule(Runnable r, Duration delay)
Copyright © 2019 LSST. All rights reserved.