From 279889cbff37b7e13cd107d2ee27e7335c39728e Mon Sep 17 00:00:00 2001 From: David Jablonski Date: Sun, 11 Jun 2023 23:24:06 +0200 Subject: [PATCH] param_server: allow to change parameter internally --- protos/param_server/param_server.proto | 44 ++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/protos/param_server/param_server.proto b/protos/param_server/param_server.proto index 0790d7320..89f7518a3 100644 --- a/protos/param_server/param_server.proto +++ b/protos/param_server/param_server.proto @@ -21,6 +21,12 @@ service ParamServerService { * If the type is wrong, the result will be `WRONG_TYPE`. */ rpc ProvideParamInt(ProvideParamIntRequest) returns(ProvideParamIntResponse) { option (mavsdk.options.async_type) = SYNC; } + /* + * Change an int parameter internally. + * + * If the type is wrong, the result will be `WRONG_TYPE`. + */ + rpc ChangeParamInt(ChangeParamIntRequest) returns(ChangeParamIntResponse) { option (mavsdk.options.async_type) = SYNC; } /* * Retrieve a float parameter. * @@ -33,6 +39,12 @@ service ParamServerService { * If the type is wrong, the result will be `WRONG_TYPE`. */ rpc ProvideParamFloat(ProvideParamFloatRequest) returns(ProvideParamFloatResponse) { option (mavsdk.options.async_type) = SYNC; } + /* + * Change a float parameter internally. + * + * If the type is wrong, the result will be `WRONG_TYPE`. + */ + rpc ChangeParamFloat(ChangeParamFloatRequest) returns(ChangeParamFloatResponse) { option (mavsdk.options.async_type) = SYNC; } /* * Retrieve a custom parameter. * @@ -45,6 +57,12 @@ service ParamServerService { * If the type is wrong, the result will be `WRONG_TYPE`. */ rpc ProvideParamCustom(ProvideParamCustomRequest) returns(ProvideParamCustomResponse) { option (mavsdk.options.async_type) = SYNC; } + /* + * Change a custom parameter internally. + * + * If the type is wrong, the result will be `WRONG_TYPE`. + */ + rpc ChangeParamCustom(ChangeParamCustomRequest) returns(ChangeParamCustomResponse) { option (mavsdk.options.async_type) = SYNC; } /* * Retrieve all parameters. */ @@ -54,7 +72,6 @@ service ParamServerService { message RetrieveParamIntRequest { string name = 1; // Name of the parameter } - message RetrieveParamIntResponse { ParamServerResult param_server_result = 1; int32 value = 2; // Value of the requested parameter @@ -68,6 +85,14 @@ message ProvideParamIntResponse { ParamServerResult param_server_result = 1; } +message ChangeParamIntRequest { + string name = 1; // Name of the parameter to change + int32 value = 2; // Value the parameter should be set to +} +message ChangeParamIntResponse { + ParamServerResult param_server_result = 1; +} + message RetrieveParamFloatRequest { string name = 1; // Name of the parameter } @@ -84,10 +109,17 @@ message ProvideParamFloatResponse { ParamServerResult param_server_result = 1; } +message ChangeParamFloatRequest { + string name = 1; // Name of the parameter to change + float value = 2; // Value the parameter should be set to +} +message ChangeParamFloatResponse { + ParamServerResult param_server_result = 1; +} + message RetrieveParamCustomRequest { string name = 1; // Name of the parameter } - message RetrieveParamCustomResponse { ParamServerResult param_server_result = 1; string value = 2; // Value of the requested parameter @@ -101,6 +133,14 @@ message ProvideParamCustomResponse { ParamServerResult param_server_result = 1; } +message ChangeParamCustomRequest { + string name = 1; // Name of the parameter to change + string value = 2; // Value the parameter should be set to +} +message ChangeParamFloatResponse { + ParamServerResult param_server_result = 1; +} + message RetrieveAllParamsRequest {}