Skip to content

Commit 8a62fff

Browse files
committed
param_server: allow to change parameter internally
1 parent 6b0cc8f commit 8a62fff

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

protos/param_server/param_server.proto

+42-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ service ParamServerService {
2121
* If the type is wrong, the result will be `WRONG_TYPE`.
2222
*/
2323
rpc ProvideParamInt(ProvideParamIntRequest) returns(ProvideParamIntResponse) { option (mavsdk.options.async_type) = SYNC; }
24+
/*
25+
* Change an int parameter internally.
26+
*
27+
* If the type is wrong, the result will be `WRONG_TYPE`.
28+
*/
29+
rpc ChangeParamInt(ChangeParamIntRequest) returns(ChangeParamIntResponse) { option (mavsdk.options.async_type) = SYNC; }
2430
/*
2531
* Retrieve a float parameter.
2632
*
@@ -33,6 +39,12 @@ service ParamServerService {
3339
* If the type is wrong, the result will be `WRONG_TYPE`.
3440
*/
3541
rpc ProvideParamFloat(ProvideParamFloatRequest) returns(ProvideParamFloatResponse) { option (mavsdk.options.async_type) = SYNC; }
42+
/*
43+
* Change a float parameter internally.
44+
*
45+
* If the type is wrong, the result will be `WRONG_TYPE`.
46+
*/
47+
rpc ChangeParamFloat(ChangeParamFloatRequest) returns(ChangeParamFloatResponse) { option (mavsdk.options.async_type) = SYNC; }
3648
/*
3749
* Retrieve a custom parameter.
3850
*
@@ -45,6 +57,12 @@ service ParamServerService {
4557
* If the type is wrong, the result will be `WRONG_TYPE`.
4658
*/
4759
rpc ProvideParamCustom(ProvideParamCustomRequest) returns(ProvideParamCustomResponse) { option (mavsdk.options.async_type) = SYNC; }
60+
/*
61+
* Change a custom parameter internally.
62+
*
63+
* If the type is wrong, the result will be `WRONG_TYPE`.
64+
*/
65+
rpc ChangeParamCustom(ChangeParamCustomRequest) returns(ChangeParamCustomResponse) { option (mavsdk.options.async_type) = SYNC; }
4866
/*
4967
* Retrieve all parameters.
5068
*/
@@ -54,7 +72,6 @@ service ParamServerService {
5472
message RetrieveParamIntRequest {
5573
string name = 1; // Name of the parameter
5674
}
57-
5875
message RetrieveParamIntResponse {
5976
ParamServerResult param_server_result = 1;
6077
int32 value = 2; // Value of the requested parameter
@@ -68,6 +85,14 @@ message ProvideParamIntResponse {
6885
ParamServerResult param_server_result = 1;
6986
}
7087

88+
message ChangeParamIntRequest {
89+
string name = 1; // Name of the parameter to change
90+
int32 value = 2; // Value the parameter should be set to
91+
}
92+
message ChangeParamIntResponse {
93+
ParamServerResult param_server_result = 1;
94+
}
95+
7196
message RetrieveParamFloatRequest {
7297
string name = 1; // Name of the parameter
7398
}
@@ -84,10 +109,17 @@ message ProvideParamFloatResponse {
84109
ParamServerResult param_server_result = 1;
85110
}
86111

112+
message ChangeParamFloatRequest {
113+
string name = 1; // Name of the parameter to change
114+
float value = 2; // Value the parameter should be set to
115+
}
116+
message ChangeParamFloatResponse {
117+
ParamServerResult param_server_result = 1;
118+
}
119+
87120
message RetrieveParamCustomRequest {
88121
string name = 1; // Name of the parameter
89122
}
90-
91123
message RetrieveParamCustomResponse {
92124
ParamServerResult param_server_result = 1;
93125
string value = 2; // Value of the requested parameter
@@ -101,6 +133,14 @@ message ProvideParamCustomResponse {
101133
ParamServerResult param_server_result = 1;
102134
}
103135

136+
message ChangeParamCustomRequest {
137+
string name = 1; // Name of the parameter to change
138+
string value = 2; // Value the parameter should be set to
139+
}
140+
message ChangeParamCustomResponse {
141+
ParamServerResult param_server_result = 1;
142+
}
143+
104144

105145
message RetrieveAllParamsRequest {}
106146

0 commit comments

Comments
 (0)