Package org.yamcs.commanding
Class PreparedCommand
- java.lang.Object
-
- org.yamcs.commanding.PreparedCommand
-
public class PreparedCommand extends Object
This class is to keep track of a command binary and source included
-
-
Field Summary
Fields Modifier and Type Field Description static StringCNAME_ASSIGNMENTSstatic StringCNAME_BINARYstatic StringCNAME_CMDNAMEstatic StringCNAME_COMMENTstatic StringCNAME_GENTIMEstatic StringCNAME_ORIGINstatic StringCNAME_SEQNUMstatic StringCNAME_SOURCEstatic StringCNAME_USERNAME
-
Constructor Summary
Constructors Constructor Description PreparedCommand(byte[] binary)Used for testing the uplinkersPreparedCommand(org.yamcs.protobuf.Commanding.CommandId id)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttribute(org.yamcs.protobuf.Commanding.CommandHistoryAttribute cha)voidaddStringAttribute(String name, String value)voidaddVerifierConfig(String name, org.yamcs.protobuf.Commanding.VerifierConfig verifierConfig)booleandisableCommandVerifiers()voiddisableCommandVerifiers(boolean b)booleandisableTransmissionContraints()voiddisableTransmissionContraints(boolean b)static PreparedCommandfromCommandHistoryEntry(org.yamcs.protobuf.Commanding.CommandHistoryEntry che)static PreparedCommandfromTuple(Tuple t, XtceDb xtcedb)Map<Argument,Value>getArgAssignment()org.yamcs.protobuf.Commanding.CommandHistoryAttributegetAttribute(String name)List<org.yamcs.protobuf.Commanding.CommandHistoryAttribute>getAttributes()byte[]getBinary()StringgetCmdName()org.yamcs.protobuf.Commanding.CommandIdgetCommandId()static org.yamcs.protobuf.Commanding.CommandIdgetCommandId(Tuple t)StringgetCommandName()StringgetComment()longgetGenerationTime()StringgetId()MetaCommandgetMetaCommand()StringgetOrigin()intgetSequenceNumber()StringgetSource()StringgetStringAttribute(String attrname)longgetTransmissionContraintCheckStart()StringgetUsername()UUIDgetUUID()Map<String,org.yamcs.protobuf.Commanding.VerifierConfig>getVerifierOverride()booleanisPendingTransmissionConstraints()voidsetArgAssignment(Map<Argument,Value> argAssignment, Set<String> userAssignedArgumentNames)voidsetBinary(byte[] b)voidsetComment(String comment)voidsetMetaCommand(MetaCommand cmd)voidsetPendingTransmissionConstraints(boolean b)voidsetSource(String source)voidsetStringAttribute(String name, String value)voidsetTransmissionContraintCheckStart(long transmissionContraintCheckStart)voidsetUsername(String username)StringtoString()TupletoTuple()
-
-
-
Field Detail
-
CNAME_GENTIME
public static final String CNAME_GENTIME
- See Also:
- Constant Field Values
-
CNAME_SEQNUM
public static final String CNAME_SEQNUM
- See Also:
- Constant Field Values
-
CNAME_ORIGIN
public static final String CNAME_ORIGIN
- See Also:
- Constant Field Values
-
CNAME_USERNAME
public static final String CNAME_USERNAME
- See Also:
- Constant Field Values
-
CNAME_BINARY
public static final String CNAME_BINARY
- See Also:
- Constant Field Values
-
CNAME_CMDNAME
public static final String CNAME_CMDNAME
- See Also:
- Constant Field Values
-
CNAME_SOURCE
public static final String CNAME_SOURCE
- See Also:
- Constant Field Values
-
CNAME_ASSIGNMENTS
public static final String CNAME_ASSIGNMENTS
- See Also:
- Constant Field Values
-
CNAME_COMMENT
public static final String CNAME_COMMENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getGenerationTime
public long getGenerationTime()
-
setSource
public void setSource(String source)
-
getSource
public String getSource()
-
setComment
public void setComment(String comment)
-
getComment
public String getComment()
-
getCmdName
public String getCmdName()
-
getAttribute
public org.yamcs.protobuf.Commanding.CommandHistoryAttribute getAttribute(String name)
-
getId
public String getId()
-
getOrigin
public String getOrigin()
-
getSequenceNumber
public int getSequenceNumber()
-
getCommandName
public String getCommandName()
-
getCommandId
public org.yamcs.protobuf.Commanding.CommandId getCommandId()
-
getUUID
public UUID getUUID()
-
getCommandId
public static org.yamcs.protobuf.Commanding.CommandId getCommandId(Tuple t)
-
toTuple
public Tuple toTuple()
-
setBinary
public void setBinary(byte[] b)
-
getUsername
public String getUsername()
-
getAttributes
public List<org.yamcs.protobuf.Commanding.CommandHistoryAttribute> getAttributes()
-
fromTuple
public static PreparedCommand fromTuple(Tuple t, XtceDb xtcedb)
-
fromCommandHistoryEntry
public static PreparedCommand fromCommandHistoryEntry(org.yamcs.protobuf.Commanding.CommandHistoryEntry che)
-
addAttribute
public void addAttribute(org.yamcs.protobuf.Commanding.CommandHistoryAttribute cha)
-
getBinary
public byte[] getBinary()
-
setUsername
public void setUsername(String username)
-
getMetaCommand
public MetaCommand getMetaCommand()
-
setMetaCommand
public void setMetaCommand(MetaCommand cmd)
-
isPendingTransmissionConstraints
public boolean isPendingTransmissionConstraints()
-
setPendingTransmissionConstraints
public void setPendingTransmissionConstraints(boolean b)
-
getTransmissionContraintCheckStart
public long getTransmissionContraintCheckStart()
-
setTransmissionContraintCheckStart
public void setTransmissionContraintCheckStart(long transmissionContraintCheckStart)
-
setArgAssignment
public void setArgAssignment(Map<Argument,Value> argAssignment, Set<String> userAssignedArgumentNames)
-
disableTransmissionContraints
public void disableTransmissionContraints(boolean b)
-
disableTransmissionContraints
public boolean disableTransmissionContraints()
- Returns:
- true if the transmission constraints have to be disabled for this command
-
disableCommandVerifiers
public boolean disableCommandVerifiers()
- Returns:
- true if the command verifiers have to be disabled for this command
-
disableCommandVerifiers
public void disableCommandVerifiers(boolean b)
-
addVerifierConfig
public void addVerifierConfig(String name, org.yamcs.protobuf.Commanding.VerifierConfig verifierConfig)
-
-