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 String
CNAME_ASSIGNMENTS
static String
CNAME_BINARY
static String
CNAME_CMDNAME
static String
CNAME_COMMENT
static String
CNAME_GENTIME
static String
CNAME_ORIGIN
static String
CNAME_SEQNUM
static String
CNAME_SOURCE
static String
CNAME_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 void
addAttribute(org.yamcs.protobuf.Commanding.CommandHistoryAttribute cha)
void
addStringAttribute(String name, String value)
void
addVerifierConfig(String name, org.yamcs.protobuf.Commanding.VerifierConfig verifierConfig)
boolean
disableCommandVerifiers()
void
disableCommandVerifiers(boolean b)
boolean
disableTransmissionContraints()
void
disableTransmissionContraints(boolean b)
static PreparedCommand
fromCommandHistoryEntry(org.yamcs.protobuf.Commanding.CommandHistoryEntry che)
static PreparedCommand
fromTuple(Tuple t, XtceDb xtcedb)
Map<Argument,Value>
getArgAssignment()
org.yamcs.protobuf.Commanding.CommandHistoryAttribute
getAttribute(String name)
List<org.yamcs.protobuf.Commanding.CommandHistoryAttribute>
getAttributes()
byte[]
getBinary()
String
getCmdName()
org.yamcs.protobuf.Commanding.CommandId
getCommandId()
static org.yamcs.protobuf.Commanding.CommandId
getCommandId(Tuple t)
String
getCommandName()
String
getComment()
long
getGenerationTime()
String
getId()
MetaCommand
getMetaCommand()
String
getOrigin()
int
getSequenceNumber()
String
getSource()
String
getStringAttribute(String attrname)
long
getTransmissionContraintCheckStart()
String
getUsername()
UUID
getUUID()
Map<String,org.yamcs.protobuf.Commanding.VerifierConfig>
getVerifierOverride()
boolean
isPendingTransmissionConstraints()
void
setArgAssignment(Map<Argument,Value> argAssignment, Set<String> userAssignedArgumentNames)
void
setBinary(byte[] b)
void
setComment(String comment)
void
setMetaCommand(MetaCommand cmd)
void
setPendingTransmissionConstraints(boolean b)
void
setSource(String source)
void
setStringAttribute(String name, String value)
void
setTransmissionContraintCheckStart(long transmissionContraintCheckStart)
void
setUsername(String username)
String
toString()
Tuple
toTuple()
-
-
-
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)
-
-