Skip to content

Commit

Permalink
Add log_streaming
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Oes <[email protected]>
  • Loading branch information
julianoes committed Apr 1, 2024
1 parent c000fb5 commit a3f009b
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions protos/log_streaming/log_streaming.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
syntax = "proto3";

package mavsdk.rpc.logging;

option java_package = "io.mavsdk.logging";
option java_outer_classname = "LogStreamingProto";

// Provide log streaming data.
service LogStreamingService {
// Start streaming logging data.
rpc StartLogStreaming(StartLogStreamingRequest) returns(StartLogStreamingResponse) {}
// Stop streaming logging data.
rpc StopLogStreaming(StopLogStreamingRequest) returns(StopLogStreamingResponse) {}
// Subscribe to logging messages
rpc SubscribeLogStreamingRaw(SubscribeLogStreamingRawRequest) returns(stream LogStreamingRawResponse) {}
}

message StartLogStreamingRequest {}
message StartLogStreamingResponse {
LogStreamingResult logging_result = 1;
}

message StopLogStreamingRequest {}
message StopLogStreamingResponse {
LogStreamingResult logging_result = 1;
}

message SubscribeLogStreamingRawRequest {}
message LogStreamingRawResponse {
LogStreamingRaw logging_raw = 1; // A message containing logged data
}

// Raw logging data type
message LogStreamingRaw {
uint32 first_message_offset = 1; // Offset into data where first message starts
bytes data = 2; // Logged data
}

// Result type.
message LogStreamingResult {
// Possible results returned for logging requests
enum Result {
SUCCESS = 0; // Request succeeded
NO_SYSTEM = 1; // No system connected
CONNECTION_ERROR = 2; // Connection error
BUSY = 3; // System busy
COMMAND_DENIED = 4; // Command denied
TIMEOUT = 5; // Timeout
UNKNOWN = 6; // Unknown error
}

Result result = 1; // Result enum value
string result_str = 2; // Human-readable English string describing the result
}

0 comments on commit a3f009b

Please sign in to comment.