Skip to content

Commit

Permalink
param_server: add subscription for changed params
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Oes <[email protected]>
  • Loading branch information
julianoes committed Dec 24, 2023
1 parent a7c8dde commit 8184c04
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions protos/param_server/param_server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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.
*/
Expand Down

0 comments on commit 8184c04

Please sign in to comment.