yamcs.protobuf.commanding.commanding.proto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of yamcs-api Show documentation
Show all versions of yamcs-api Show documentation
Used by external clients to communicate with Yamcs
syntax="proto2";
package yamcs.protobuf.commanding;
option java_package = "org.yamcs.protobuf";
import "yamcs/protobuf/yamcs.proto";
import "yamcs/protobuf/mdb/mdb.proto";
import "google/protobuf/timestamp.proto";
message CommandId {
required int64 generationTime = 1;
required string origin = 2;
required int32 sequenceNumber = 3; //this has to be unique in relation to the generation time and origin
optional string commandName = 4;
}
/************* Command Queue Control ********************/
enum QueueState {
BLOCKED = 1;
DISABLED = 2;
ENABLED = 3;
}
message CommandQueueInfo {
optional string instance = 1;
optional string processorName = 2;
optional string name = 3;
optional QueueState state = 4;
optional int32 nbSentCommands = 5;
optional int32 nbRejectedCommands = 6;
optional int32 stateExpirationTimeS = 7;
repeated CommandQueueEntry entry = 8;
optional int32 order = 9;
repeated string users = 10;
repeated string groups = 11;
optional mdb.SignificanceInfo.SignificanceLevelType minLevel = 12;
}
/*One entry (command) in the command queue*/
message CommandQueueEntry {
required string instance = 1;
required string processorName = 2;
required string queueName = 3;
required CommandId cmdId = 4;
optional string source = 5;
optional bytes binary = 6;
optional string username = 7;
optional int64 yamcsGenerationTime = 8 [deprecated = true];
optional string generationTimeUTC = 10 [deprecated = true];
optional string uuid = 9;
optional string comment = 11;
optional google.protobuf.Timestamp generationTime = 12;
}
message CommandQueueEvent {
enum Type {
COMMAND_ADDED = 1;
COMMAND_REJECTED = 2;
COMMAND_SENT = 3;
}
optional Type type = 1;
optional CommandQueueEntry data = 2;
}
message CommandQueueRequest {
optional CommandQueueInfo queueInfo = 1; // for SetQueueState
optional CommandQueueEntry queueEntry = 2; //for SendCommand and RejectCommand
optional bool rebuild = 3[default=false]; //if rebuild is true, the binary packet will be recreated to include new time and sequence count
}
/* this message is sent as response to validate, in case the significance is defined for a commands*/
message CommandSignificance {
optional int32 sequenceNumber = 1; //the sequence number of the command sent
optional mdb.SignificanceInfo significance = 2;
}
/********************* Command History ***********************/
message CommandHistoryAttribute {
optional string name = 1;
optional Value value = 2;
optional int64 time = 3;
}
message CommandAssignment {
optional string name = 1;
optional Value value = 2;
optional bool userInput = 3;
}
message CommandHistoryEntry {
required CommandId commandId = 1;
//required string cmdName = 2; //removed because it's part of the CommandId
repeated CommandHistoryAttribute attr = 3;
optional string generationTimeUTC = 4;
repeated CommandAssignment assignment = 5;
}