public class DemoSubsystem
extends org.lsst.ccs.Subsystem
implements org.lsst.ccs.framework.HasLifecycle
| Modifier and Type | Class and Description |
|---|---|
static class |
DemoSubsystem.AState |
static class |
DemoSubsystem.OtherState |
| Modifier and Type | Field and Description |
|---|---|
protected PeriodicTask |
dataPublisher
Scheduler task that publishes heartbeat status messages.
|
static org.lsst.ccs.bus.data.Alert |
MONITOR_ALERT |
protected org.lsst.ccs.services.AgentPeriodicTaskService |
periodicTaskService |
protected org.lsst.ccs.Subsystem |
subsys |
| Constructor and Description |
|---|
DemoSubsystem() |
| Modifier and Type | Method and Description |
|---|---|
void |
build() |
String |
echoWithOptions(Options opts,
String input) |
Object[] |
getSampleArrayData() |
DemoData |
getSampleData() |
void |
init() |
void |
postInit() |
void |
postStart()
Initializes the subsystem.
|
void |
raiseCustomAlert(org.lsst.ccs.bus.states.AlertState severity,
String cause) |
void |
runTracerTest(boolean enable) |
void |
setNumberOfExceptionInMonitoringThread(int nExeptions) |
void |
setPeriodicTaskSleepTime(long sleep) |
void |
setSampleDataSize(int size) |
Object |
testCommand(boolean accept,
int delayBeforeAck,
int delayAfterAck,
int timeout,
boolean returnException) |
Object |
testCommandArguments(boolean b1,
int varName,
String nick,
List<Integer> intList,
List<String> stringList,
String returnType,
String... var) |
List<String> |
testCommandArgumentsReturnTypeValues() |
void |
testSystemQuery0() |
void |
testSystemQuery1() |
String |
testTimeout(int sleepSeconds) |
void |
testUserAction0() |
void |
testUserQuery0() |
void |
testUserQuery1() |
void |
throwAnException() |
void |
updateLimits(String low,
String high) |
void |
updateState(String componentName,
DemoState state) |
getLogHandler, getNumberCommandThreads, ping, printRunningCommands, setLogFormat, setLogHandlerLevel, setLogLevel, setStackTraceDepthcreateHelper, executeCommandRequest, getAgentInfo, getAgentPersistenceService, getAgentService, getAgentServices, getCommandCount, getComponentConfigurationEnvironment, getComponentConfigurationEnvironmentByName, getComponentLookup, getCurrentAction, getDescription, getEnvironmentLockService, getEnvironmentMessagingAccess, getLogger, getMessagingAccess, getName, getScheduler, helper, initAgent, initLogBusHandler, isInEngineeringMode, populateComponentLookup, preInit, preStart, printComponentNodeTree, publishSubsystemDataOnStatusBus, sendAck, sendNack, sendStatusMessage, setAgentName, shutdownAgent, shutdownAgent, startAgent, vetoTransitionToNormalModeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprotected PeriodicTask dataPublisher
@LookupField(strategy=TREE) protected org.lsst.ccs.services.AgentPeriodicTaskService periodicTaskService
@LookupField(strategy=TOP) protected org.lsst.ccs.Subsystem subsys
public static final org.lsst.ccs.bus.data.Alert MONITOR_ALERT
public void postStart()
postStart in interface org.lsst.ccs.framework.HasLifecyclepublic void postInit()
postInit in interface org.lsst.ccs.framework.HasLifecyclepublic void build()
build in interface org.lsst.ccs.framework.HasLifecycle@Command(type=ACTION) public void setNumberOfExceptionInMonitoringThread(int nExeptions)
public void init()
init in interface org.lsst.ccs.framework.HasLifecycle@Command(type=ACTION, description="update limits") public void updateLimits(String low, String high)
@Command(type=QUERY, description="raise custom alert") public void raiseCustomAlert(org.lsst.ccs.bus.states.AlertState severity, String cause)
@Command(type=QUERY, description="Get Subsystem Data Sample") public DemoData getSampleData()
@Command(type=QUERY, description="Set Subsystem Data Sample") public void setSampleDataSize(int size)
@Command(type=QUERY, description="Get Subsystem Array Sample") public Object[] getSampleArrayData()
@Command(type=QUERY, description="Throw an Exception") public void throwAnException()
@Command(type=ACTION, description="Enable/Disable Publishing Tracer Test Messages") public void runTracerTest(boolean enable)
@Command(type=ACTION, description="Time out (action command)") public String testTimeout(int sleepSeconds)
@Command(type=QUERY, level=0, category=USER, description="Empty level 0 category USER type QUERY command") public void testUserQuery0()
@Command(type=ACTION, level=0, category=USER, description="Empty level 0 category USER type QUERY command") public void testUserAction0()
@Command(type=QUERY, level=1, category=USER, description="Empty level 0 category USER type QUERY command") public void testUserQuery1()
@Command(type=QUERY, level=0, category=SYSTEM, description="Empty level 0 category USER type QUERY command") public void testSystemQuery0()
@Command(type=QUERY, level=1, category=SYSTEM, description="Empty level 0 category USER type QUERY command") public void testSystemQuery1()
@Command(type=QUERY, level=0, description="Test sending ACK/NACK. Delays are in seconds.", autoAck=false) public Object testCommand(@Argument(description="If false, command is rejected with a NACK.") boolean accept, @Argument(defaultValue="0") int delayBeforeAck, @Argument(description="Delay between ACK and the result.",defaultValue="0") int delayAfterAck, @Argument(defaultValue="0") int timeout, @Argument(defaultValue="false") boolean returnException)
@Command(type=QUERY, level=0, description="Test various types of command arguments and return types.") public Object testCommandArguments(@Argument(name="namedBool",description="boolean argument with name but no default") boolean b1, @Argument(defaultValue="0",description="unnamed int argument with default 0") int varName, @Argument(defaultValue="Che",description="String argument: nickname",name="nickname") String nick, @Argument(description="List of integers") List<Integer> intList, @Argument(description="List of strings") List<String> stringList, @Argument(description="Kind of object to return",allowedValueProvider="testCommandArgumentsReturnTypeValues") String returnType, @Argument(name="vararg",description="String...") String... var)
@Option(name="invert",description="Invert the provided input String") @Option(name="uppercase",description="Uppercate the provided input String") @Option(name="space",description="Space apart the letters") @Command(description="A Command with Options") public String echoWithOptions(Options opts, String input)
Copyright © 2023 LSST. All rights reserved.