Package org.yamcs
Class CommandOption
java.lang.Object
org.yamcs.CommandOption
A command option. Instances of this class should be registered once, system-wide, against an instance of
YamcsServer
. While not enforced, it is preferred to use a Plugin.onLoad(YConfiguration)
hook as this
will guarantee that the registration is done only once.-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionCommandOption
(String id, String verboseName, CommandOption.CommandOptionType type) Create a new command option. -
Method Summary
Modifier and TypeMethodDescriptioncoerceValue
(Object value) Returns a new value whose type matches more closely the type of this command option.coerceValue
(Yamcs.Value value) Returns a new value whose type matches more closely the type of this command option.getHelp()
getId()
getType()
toString()
Specify detailed guidance on how to use this attribute.
-
Constructor Details
-
CommandOption
Create a new command option.- Parameters:
id
- a system-wide unique identifier for this option. This identifier will be used by clients when submitting commands, and will also be used for storage in Command History.verboseName
- a human-readable name for this option. Used by UI clients.type
- the expected type of option values. UI clients may use this to enforce specific controls.
-
-
Method Details
-
getId
-
getVerboseName
-
getType
-
withHelp
Specify detailed guidance on how to use this attribute. UI clients may use this to show to users. -
getHelp
-
coerceValue
Returns a new value whose type matches more closely the type of this command option.The purpose here, is that we want to be forgiving on clients that run commands, while at the same time be more specific when it is recorded in Command History, or passed to a link.
-
coerceValue
Returns a new value whose type matches more closely the type of this command option.The purpose here, is that we want to be forgiving on clients that run commands, while at the same time be more specific when it is recorded in Command History, or passed to a link.
-
toString
-