
public abstract class GenericMMM<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 Logger |
log |
protected Map<GroupT,Map<String,MinionT>> |
minions |
protected MMMUtilities<MinionT,GroupT,EventT> |
mu |
protected Random |
random |
| Constructor and Description |
|---|
GenericMMM() |
GenericMMM(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 MMMUtilities |
getMmmUtilities() |
protected abstract Class<StateT> |
getStateClass() |
void |
init() |
protected abstract void |
initAllowedTransitions() |
protected abstract void |
initMMM() |
<MinionStateT extends Enum<MinionStateT>> |
isInState(GroupT g,
MinionT sys,
MinionStateT state) |
void |
onAlert(AlertNotification notif) |
void |
publishEvent(MMMIR2Event 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, setStackTraceDepthbroadcastStatus, checkAllHardwareStopped, createHelper, executeCommandRequest, getAgentInfo, getAgentPersistenceService, getAgentService, getAgentServices, getCCSVersions, getCommandCount, getComponentConfigurationEnvironment, getComponentConfigurationEnvironmentByName, getComponentLookup, getCurrentAction, getDescription, getDistributionInfo, getEnvironmentLockService, getEnvironmentMessagingAccess, getLogger, getMessagingAccess, getName, getScheduler, getStatusBroadcastPeriod, helper, internalCheckHardware, isConnectedToTheBuses, isInEngineeringMode, populateComponentLookup, preBuild, printComponentNodeTree, publishSubsystemDataOnStatusBus, sendAck, sendNack, sendStatusMessage, setAgentName, shutdownAgent, startAgent, vetoTransitionToNormalModeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected MMMUtilities<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 Logger log
public GenericMMM()
public GenericMMM(String name)
public void init()
init in interface org.lsst.ccs.framework.HasLifecyclepublic void start()
start in interface org.lsst.ccs.framework.HasLifecycleprotected MMMUtilities getMmmUtilities()
protected abstract void initAllowedTransitions()
protected abstract void initMMM()
protected void setState(StateT s)
protected void checkCommandValidity(CommandT cmd)
public void onAlert(AlertNotification notif)
public void publishEvent(MMMIR2Event 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>> MMMUtilities.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 © 2021 LSST. All rights reserved.