Package org.yamcs.xtce
Class MetaCommand
java.lang.Object
org.yamcs.xtce.NameDescription
org.yamcs.xtce.MetaCommand
- All Implemented Interfaces:
Serializable
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:
-
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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addArgument
(Argument arg) Adds an argument to the command.void
void
addTransmissionConstrain
(TransmissionConstraint constraint) void
addVerifier
(CommandVerifier cmdVerifier) getArgument
(String argumentName) returns an argument based on name or null if it doesn't existreturns 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 argumentreturns the list of arguments of this command can be empty if the command doesn't have argumentsgetEffectiveArgument
(String argumentName) Same asgetArgument(String)
but looks up the argument also in the parentreturns the list of all arguments including those inherited from the parentreturns the command significance either directly defined or inherited from the parentboolean
boolean
boolean
void
print
(PrintStream out) void
setAbstract
(boolean a) Set the command as abstract or non abstract.void
setArgumentAssignmentList
(List<ArgumentAssignment> argumentAssignmentList) void
void
void
setDefaultSignificance
(Significance defaultSignificance) Methods inherited from class org.yamcs.xtce.NameDescription
addAlias, addAliases, addAncillaryData, getAlias, getAliasSet, getAncillaryData, getLongDescription, getName, getName, getOpsName, getQualifiedName, getShortDescription, getSubsystemName, getSubsystemName, qualifiedName, setAliasSet, setAncillaryData, setLongDescription, setName, setQualifiedName, setShortDescription
-
Constructor Details
-
MetaCommand
-
-
Method Details
-
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
-
getCommandContainer
-
setBaseMetaCommand
-
getBaseMetaCommand
-
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
returns the list of arguments of this command can be empty if the command doesn't have arguments- Returns:
-
getEffectiveArgumentList
returns the list of all arguments including those inherited from the parent -
getEffectiveArgumentAssignmentList
-
getArgument
returns an argument based on name or null if it doesn't existThe argument is only looked up in the current meta command, not in its parent.
- Parameters:
argumentName
-- Returns:
-
getEffectiveArgument
Same asgetArgument(String)
but looks up the argument also in the parent -
addArgument
Adds an argument to the command.- Parameters:
arg
- - the argument to be added
-
addTransmissionConstrain
-
getTransmissionConstraintList
- Returns:
- the list of transmission constraints (can be empty but not null)
-
addArgumentAssignment
-
hasTransmissionConstraints
public boolean hasTransmissionConstraints() -
getEffectiveDefaultSignificance
returns the command significance either directly defined or inherited from the parentReturns null of no significance is attached to the command
-
getDefaultSignificance
-
setDefaultSignificance
-
addVerifier
-
hasCommandVerifiers
public boolean hasCommandVerifiers() -
getCommandVerifiers
-
print
-
setArgumentAssignmentList
-