Package org.yamcs

Class CommandOption

java.lang.Object
org.yamcs.CommandOption

public class CommandOption extends Object
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.
  • Constructor Details

    • CommandOption

      public CommandOption(String id, String verboseName, CommandOption.CommandOptionType type)
      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

      public String getId()
    • getVerboseName

      public String getVerboseName()
    • getType

    • withHelp

      public CommandOption withHelp(String help)
      Specify detailed guidance on how to use this attribute. UI clients may use this to show to users.
    • getHelp

      public String getHelp()
    • coerceValue

      public Yamcs.Value coerceValue(Yamcs.Value value)
      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

      public Yamcs.Value coerceValue(Object value)
      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

      public String toString()
      Overrides:
      toString in class Object