Package org.yamcs.xtce
Class MetaCommand
- java.lang.Object
-
- org.yamcs.xtce.NameDescription
-
- org.yamcs.xtce.MetaCommand
-
- All Implemented Interfaces:
Serializable
public class MetaCommand extends NameDescription
The MetaCommand is the base type for a tele-command.The rules for MetaCommand inheritance as follows:
- A MetaCommand may extend another using the BaseMetaCommand element
- BaseMetaCommands that form loops are illegal
- Its CommandContainer is only inherited if the BaseContainer is explicitly set between the child and parent.
- The same rules apply to MetaCommand/CommandContainer inheritance as described in SequenceContainer/BaseContainer.
Specific rules by element and attribute are:
- BaseMetaCommand/ArgumentAssignment Child’s content will override parent’s content if present, otherwise child gets parent’s content if it is specified.
- If argument is the same name, it overrides the parent’s ArgumentAssignment.
- ArgumentList Child’s content is appended to parent’s content if present
- CommandContainer Special Case: inherited like other containers if CommandContainer/BaseContainer set. Otherwise it is not inherited.
- TransmissionConstraintList Child’s content prefixed to parent’s content if present
- DefaultSignificance Child’s content will override parent’s content if present, otherwise child gets parent’s content if specified
- VerifierSet Child’s content prefixed to parent’s content if present but: - Same verifiers are overridden by the child
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.yamcs.xtce.NameDescription
NameDescription.Builder<T extends NameDescription.Builder<T>>
-
-
Field Summary
-
Fields inherited from class org.yamcs.xtce.NameDescription
ancillaryData, name, PATH_SEPARATOR, qualifiedName, xtceAliasSet
-
-
Constructor Summary
Constructors Constructor Description MetaCommand(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddArgument(Argument arg)Adds an argument to the command.voidaddArgumentAssignment(ArgumentAssignment aa)voidaddTransmissionConstrain(TransmissionConstraint constraint)voidaddVerifier(CommandVerifier cmdVerifier)ArgumentgetArgument(String argumentName)returns an argument based on name or null if it doesn't existList<ArgumentAssignment>getArgumentAssignmentList()returns the argument assignment list in relation to the inheritance - this is the list of arguments of the parent(s) which are assigned when the inheritance takes place returns null if there is no such argumentList<Argument>getArgumentList()returns the list of arguments of this command can be empty if the command doesn't have argumentsMetaCommandgetBaseMetaCommand()CommandContainergetCommandContainer()List<CommandVerifier>getCommandVerifiers()SignificancegetDefaultSignificance()List<TransmissionConstraint>getTransmissionConstraintList()booleanhasCommandVerifiers()booleanhasTransmissionConstraints()booleanisAbstract()voidprint(PrintStream out)voidsetAbstract(boolean a)Set the command as abstract or non abstract.voidsetArgumentAssignmentList(List<ArgumentAssignment> argumentAssignmentList)voidsetBaseMetaCommand(MetaCommand mc)voidsetCommandContainer(CommandContainer mcc)voidsetDefaultSignificance(Significance defaultSignificance)-
Methods inherited from class org.yamcs.xtce.NameDescription
addAlias, addAliases, addAncillaryData, getAlias, getAliasSet, getAncillaryData, getLongDescription, getName, getName, getOpsName, getQualifiedName, getShortDescription, getSubsystemName, getSubsystemName, setAliasSet, setAncillaryData, setLongDescription, setName, setQualifiedName, setShortDescription
-
-
-
-
Constructor Detail
-
MetaCommand
public MetaCommand(String name)
-
-
Method Detail
-
setAbstract
public void setAbstract(boolean a)
Set the command as abstract or non abstract. Abstract commands cannot be instantiated- Parameters:
a-
-
isAbstract
public boolean isAbstract()
-
setCommandContainer
public void setCommandContainer(CommandContainer mcc)
-
getCommandContainer
public CommandContainer getCommandContainer()
-
setBaseMetaCommand
public void setBaseMetaCommand(MetaCommand mc)
-
getBaseMetaCommand
public MetaCommand getBaseMetaCommand()
-
getArgumentAssignmentList
public List<ArgumentAssignment> getArgumentAssignmentList()
returns the argument assignment list in relation to the inheritance - this is the list of arguments of the parent(s) which are assigned when the inheritance takes place returns null if there is no such argument- Returns:
-
getArgumentList
public List<Argument> getArgumentList()
returns the list of arguments of this command can be empty if the command doesn't have arguments- Returns:
-
getArgument
public Argument getArgument(String argumentName)
returns an argument based on name or null if it doesn't exist- Parameters:
argumentName-- Returns:
-
addArgument
public void addArgument(Argument arg)
Adds an argument to the command.- Parameters:
arg- - the argument to be added
-
addTransmissionConstrain
public void addTransmissionConstrain(TransmissionConstraint constraint)
-
getTransmissionConstraintList
public List<TransmissionConstraint> getTransmissionConstraintList()
-
addArgumentAssignment
public void addArgumentAssignment(ArgumentAssignment aa)
-
hasTransmissionConstraints
public boolean hasTransmissionConstraints()
-
getDefaultSignificance
public Significance getDefaultSignificance()
-
setDefaultSignificance
public void setDefaultSignificance(Significance defaultSignificance)
-
addVerifier
public void addVerifier(CommandVerifier cmdVerifier)
-
hasCommandVerifiers
public boolean hasCommandVerifiers()
-
getCommandVerifiers
public List<CommandVerifier> getCommandVerifiers()
-
print
public void print(PrintStream out)
-
setArgumentAssignmentList
public void setArgumentAssignmentList(List<ArgumentAssignment> argumentAssignmentList)
-
-