Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

param_server: allow to change parameter internally #317

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 42 additions & 2 deletions protos/param_server/param_server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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.
*
Expand All @@ -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.
*/
Expand All @@ -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
Expand All @@ -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
}
Expand All @@ -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
Expand All @@ -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 ChangeParamCustomResponse {
ParamServerResult param_server_result = 1;
}


message RetrieveAllParamsRequest {}

Expand Down