Skip to content

Commit

Permalink
param_server: allow to change parameter internally
Browse files Browse the repository at this point in the history
  • Loading branch information
dayjaby committed Jun 11, 2023
1 parent 6b0cc8f commit 8a62fff
Showing 1 changed file with 42 additions and 2 deletions.
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

0 comments on commit 8a62fff

Please sign in to comment.