From 8184c0488859bdfcdda4aa88efa46acccd9c204c Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Fri, 3 Nov 2023 13:45:05 +1300 Subject: [PATCH] param_server: add subscription for changed params Signed-off-by: Julian Oes --- protos/param_server/param_server.proto | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/protos/param_server/param_server.proto b/protos/param_server/param_server.proto index 0790d7320..b44c1d958 100644 --- a/protos/param_server/param_server.proto +++ b/protos/param_server/param_server.proto @@ -49,6 +49,15 @@ service ParamServerService { * Retrieve all parameters. */ rpc RetrieveAllParams(RetrieveAllParamsRequest) returns(RetrieveAllParamsResponse) { option (mavsdk.options.async_type) = SYNC; } + + // Subscribe to changed int param. + rpc SubscribeChangedParamInt(SubscribeChangedParamIntRequest) returns(stream ChangedParamIntResponse) { option (mavsdk.options.async_type) = ASYNC; } + + // Subscribe to changed float param. + rpc SubscribeChangedParamFloat(SubscribeChangedParamFloatRequest) returns(stream ChangedParamFloatResponse) { option (mavsdk.options.async_type) = ASYNC; } + + // Subscribe to changed custom param. + rpc SubscribeChangedParamCustom(SubscribeChangedParamCustomRequest) returns(stream ChangedParamCustomResponse) { option (mavsdk.options.async_type) = ASYNC; } } message RetrieveParamIntRequest { @@ -108,6 +117,21 @@ message RetrieveAllParamsResponse { AllParams params = 1; // Collection of all parameters } +message SubscribeChangedParamIntRequest {} +message ChangedParamIntResponse { + IntParam param = 1; // Param that changed +} + +message SubscribeChangedParamFloatRequest {} +message ChangedParamFloatResponse { + FloatParam param = 1; // Param that changed +} + +message SubscribeChangedParamCustomRequest {} +message ChangedParamCustomResponse { + CustomParam param = 1; // Param that changed +} + /* * Type for integer parameters. */