All Downloads are FREE. Search and download functionalities are using the official Maven repository.

yamcs.protobuf.packets.packets_service.proto Maven / Gradle / Ivy

There is a newer version: 5.10.9
Show newest version
syntax="proto2";

package yamcs.protobuf.packets;

option java_package = "org.yamcs.protobuf";
option java_outer_classname = "PacketsServiceProto";
option java_multiple_files = true;

import "google/protobuf/timestamp.proto";

import "yamcs/api/annotations.proto";
import "yamcs/api/httpbody.proto";
import "yamcs/protobuf/yamcs.proto";
import "yamcs/protobuf/mdb/mdb.proto";
import "yamcs/protobuf/packets/packets.proto";

service PacketsApi {

  // List packet names
  rpc ListPacketNames(ListPacketNamesRequest) returns (ListPacketNamesResponse) {
    option (yamcs.api.route) = {
      get: "/api/archive/{instance}/packet-names"
    };
  }
  
  // List packets
  rpc ListPackets(ListPacketsRequest) returns (ListPacketsResponse) {
    option (yamcs.api.route) = {
      get: "/api/archive/{instance}/packets"
    };
  }
  
  // Get a packet
  rpc GetPacket(GetPacketRequest) returns (TmPacketData) {
    option (yamcs.api.route) = {
      get: "/api/archive/{instance}/packets/{pname}/{gentime}/{seqnum}"
      additional_bindings {
        get: "/api/archive/{instance}/packets/{gentime}/{seqnum}"
        deprecated: true
      }
    };
  }

  // Extract data from a stored packet
  //
  // This call uses the current Mission Database to perform a standalone
  // extraction of a single stored packet, returning contained parameter
  // values, and corresponding bit positions.
  rpc ExtractPacket(ExtractPacketRequest) returns (ExtractPacketResponse) {
    option (yamcs.api.route) = {
      get: "/api/archive/{instance}/packets/{pname}/{gentime}/{seqnum}:extract"
      additional_bindings {
        get: "/api/archive/{instance}/packets/{gentime}/{seqnum}:extract"
        deprecated: true
      }
    };
  }
  
  // Streams back packets
  rpc StreamPackets(StreamPacketsRequest) returns (stream TmPacketData) {
    option (yamcs.api.route) = {
      post: "/api/stream-archive/{instance}:streamPackets"
      body: "*"
    };
  }
  
  // Export a raw packet
  rpc ExportPacket(ExportPacketRequest) returns (yamcs.api.HttpBody) {
    option (yamcs.api.route) = {
      get: "/api/archive/{instance}/packets/{pname}/{gentime}/{seqnum}:export"
      additional_bindings {
        get: "/api/archive/{instance}/packets/{gentime}/{seqnum}:export"
        deprecated: true
      }
    };
  }
  
  // Export raw packets
  rpc ExportPackets(ExportPacketsRequest) returns (stream yamcs.api.HttpBody) {
    option (yamcs.api.route) = {
      get: "/api/archive/{instance}:exportPackets"
    };
  }
  
  // Subscribe to packets
  //
  // This subscription is performed at stream or processor level.
  //
  // The identifier of the packets is not filled in.
  rpc SubscribePackets(SubscribePacketsRequest) returns (stream TmPacketData) {
    option (yamcs.api.websocket) = {
      topic: "packets"
    };
  }
  
  // Subscribe to containers
  rpc SubscribeContainers(SubscribeContainersRequest) returns (stream ContainerData) {
    option (yamcs.api.websocket) = {
      topic: "containers"
    };
  }
}

message ListPacketNamesRequest {
  // Yamcs instance name.
  optional string instance = 1;
}

message ListPacketNamesResponse {
  // Known packet names.
  repeated string name = 1 [deprecated=true];

  // Known packet names.
  repeated string packets = 2;

  // Known link names.
  repeated string links = 3;
}

message ListPacketsRequest {
  // Yamcs instance name.
  optional string instance = 1;
  
  // The zero-based row number at which to start outputting results.
  // Default: ``0``
  //
  // This option is deprecated and will be removed in a later version.
  // Use the returned continuationToken instead.
  optional int64 pos = 2 [deprecated = true];
  
  // The maximum number of returned records per page. Choose this value too high
  // and you risk hitting the maximum response size limit enforced by the server.
  // Default: ``100``
  optional int32 limit = 3;
  
  // The order of the returned results. Can be either ``asc`` or ``desc``. Default: ``desc``
  optional string order = 4;
  
  // The archived name of the packets. Names must match exactly.
  repeated string name = 5;

  // Filter by the link where the packet was received from.
  optional string link = 9;

  // Continuation token returned by a previous page response.
  optional string next = 6;
  
  // Filter the lower bound of the packet's generation time. Specify a date
  // string in ISO 8601 format. This bound is inclusive.
  optional google.protobuf.Timestamp start = 7;
  
  // Filter the upper bound of the packet's generation time. Specify a date
  // string in ISO 8601 format. This bound is exclusive.
  optional google.protobuf.Timestamp stop = 8;
}

message ListPacketsResponse {
  repeated TmPacketData packet = 1;

  // Token indicating the response is only partial. More results can then
  // be obtained by performing the same request (including all original
  // query parameters) and setting the ``next`` parameter to this token.
  optional string continuationToken = 2;
}

message GetPacketRequest {
  // Yamcs instance name.
  optional string instance = 1;

  // Stored packet name
  optional string pname = 4;

  // An exact match of the packet's generation time in
  // ISO 8601 format.
  optional google.protobuf.Timestamp gentime = 2;

  // Yamcs-specific archive distinguisher
  optional int32 seqnum = 3;
}

message StreamPacketsRequest {
  // Yamcs instance name.
  optional string instance = 1;
  optional google.protobuf.Timestamp start = 2;
  optional google.protobuf.Timestamp stop = 3;
  repeated string name = 4;
}

message ExtractPacketRequest {
  // Yamcs instance name.
  optional string instance = 1;

  // Stored packet name
  optional string pname = 4;

  // An exact match of the packet's generation time in
  // ISO 8601 format.
  optional google.protobuf.Timestamp gentime = 2;

  // Yamcs-specific archive distinguisher
  optional int32 seqnum = 3;
}

message ExtractPacketResponse {
  // Packet name
  optional string packetName = 1;

  // Contained entries
  repeated ExtractedParameterValue parameterValues = 2;

  // Messages generated during packet extraction
  repeated string messages = 3;
}

// Contents of a container, can be either a parameter entry, or
// a nested container entry.
message ExtractedParameterValue {

  // Qualified name of the parameter
  optional mdb.ParameterInfo parameter = 1;

  // Qualified name of the container that defines this
  // specific entry.
  optional mdb.ContainerInfo entryContainer = 2;

  // Absolute location in bits, within the full packet
  optional int32 location = 3;

  // Bit length
  optional int32 size = 4;

  // Raw value
  optional Value rawValue = 5;

  // Engineering value
  optional Value engValue = 6;
}

message ExportPacketRequest {
  // Yamcs instance name.
  optional string instance = 1;

  // Stored packet name
  optional string pname = 4;
  
  // An exact match of the packet's generation time in
  // ISO 8601 format.
  optional google.protobuf.Timestamp gentime = 2;

  // Yamcs-specific archive distinguisher
  optional int32 seqnum = 3;
}

message ExportPacketsRequest {
  // Yamcs instance name.
  optional string instance = 1;
  
  // Filter the lower bound of the packet's generation time. Specify a date
  // string in ISO 8601 format. This bound is inclusive.
  optional google.protobuf.Timestamp start = 2;
  
  // Filter the upper bound of the packet's generation time. Specify a date
  // string in ISO 8601 format. This bound is exclusive.
  optional google.protobuf.Timestamp stop = 3;
  
  // The archived name of the packets. Names must match exactly.
  repeated string name = 4;
}

message SubscribePacketsRequest {
  // Yamcs instance name.
  optional string instance = 1;

  // Stream name. This is mutually exclusive with the field ``processor``.
  optional string stream = 2;
  
  // Processor name. This is mutually exclusive with the field ``stream``.
  optional string processor = 3;
}

message SubscribeContainersRequest {
  // Yamcs instance name.
  optional string instance = 1;
  
  // Processor name.
  optional string processor = 2;
  
  // Container names to subscribe to.
  repeated string names = 3;
}

message ContainerData {
  // Container name.
  optional string name = 1;

  // When the container's packet was generated (packet time)
  optional google.protobuf.Timestamp generationTime = 2;

  // Whent the container's packet was received by Yamcs
  optional google.protobuf.Timestamp receptionTime = 3;

  // Container bytes
  optional bytes binary = 4;
  
  // Sequence count - it is generated by the link when the container is injected into Yamcs.
  // In case this is part of a sub-container, the sequence count is the one from the encompassing container
  optional uint32 seqCount = 5;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy