From 763c01e1a1ec6f52424a11c9707eca3acf203a95 Mon Sep 17 00:00:00 2001 From: NourElMenshawy Date: Mon, 1 Jul 2024 10:07:33 +0200 Subject: [PATCH] This commit updates the core.proto to include enhancements to the CoreService: The introduction of the ListComponents RPC provides the capability to list all components connected to the system, such as computers, cameras, servos, and gimbals. This feature enhances system introspection and management for users. --- protos/core/core.proto | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/protos/core/core.proto b/protos/core/core.proto index 3df5592be..d201a58dc 100644 --- a/protos/core/core.proto +++ b/protos/core/core.proto @@ -20,6 +20,10 @@ service CoreService { * need to be increased to prevent timeouts. */ rpc SetMavlinkTimeout(SetMavlinkTimeoutRequest) returns(SetMavlinkTimeoutResponse) {} + /* + * List all components (computers, cameras, servos, gimbals, etc.) connected to the system. + */ + rpc ListComponents (ListComponentsRequest) returns (ListComponentsResponse) {} } message SubscribeConnectionStateRequest {} @@ -36,3 +40,18 @@ message SetMavlinkTimeoutResponse {} message ConnectionState { bool is_connected = 2; // Whether the vehicle got connected or disconnected } + +// Defines a request to list components of all systems. +message ListComponentsRequest {} + +// Defines a single system's components. +message SystemComponents { + uint32 system_id = 1; // System ID + repeated uint32 component_ids = 2; // List of component IDs for this system +} + +// Defines the response for a request to list components of all systems. +// It includes a list of systems, each with their own list of component IDs. +message ListComponentsResponse { + repeated SystemComponents systems = 1; // List of systems with their components +} \ No newline at end of file