@@ -40,6 +40,11 @@ def __init__(self, channel):
40
40
request_serializer = info_dot_info__pb2 .GetSpeedFactorRequest .SerializeToString ,
41
41
response_deserializer = info_dot_info__pb2 .GetSpeedFactorResponse .FromString ,
42
42
)
43
+ self .SubscribeFlightInformation = channel .unary_stream (
44
+ '/mavsdk.rpc.info.InfoService/SubscribeFlightInformation' ,
45
+ request_serializer = info_dot_info__pb2 .SubscribeFlightInformationRequest .SerializeToString ,
46
+ response_deserializer = info_dot_info__pb2 .FlightInformationResponse .FromString ,
47
+ )
43
48
44
49
45
50
class InfoServiceServicer (object ):
@@ -81,6 +86,13 @@ def GetSpeedFactor(self, request, context):
81
86
context .set_details ('Method not implemented!' )
82
87
raise NotImplementedError ('Method not implemented!' )
83
88
89
+ def SubscribeFlightInformation (self , request , context ):
90
+ """Subscribe to 'flight information' updates.
91
+ """
92
+ context .set_code (grpc .StatusCode .UNIMPLEMENTED )
93
+ context .set_details ('Method not implemented!' )
94
+ raise NotImplementedError ('Method not implemented!' )
95
+
84
96
85
97
def add_InfoServiceServicer_to_server (servicer , server ):
86
98
rpc_method_handlers = {
@@ -109,6 +121,11 @@ def add_InfoServiceServicer_to_server(servicer, server):
109
121
request_deserializer = info_dot_info__pb2 .GetSpeedFactorRequest .FromString ,
110
122
response_serializer = info_dot_info__pb2 .GetSpeedFactorResponse .SerializeToString ,
111
123
),
124
+ 'SubscribeFlightInformation' : grpc .unary_stream_rpc_method_handler (
125
+ servicer .SubscribeFlightInformation ,
126
+ request_deserializer = info_dot_info__pb2 .SubscribeFlightInformationRequest .FromString ,
127
+ response_serializer = info_dot_info__pb2 .FlightInformationResponse .SerializeToString ,
128
+ ),
112
129
}
113
130
generic_handler = grpc .method_handlers_generic_handler (
114
131
'mavsdk.rpc.info.InfoService' , rpc_method_handlers )
@@ -204,3 +221,20 @@ def GetSpeedFactor(request,
204
221
info_dot_info__pb2 .GetSpeedFactorResponse .FromString ,
205
222
options , channel_credentials ,
206
223
insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
224
+
225
+ @staticmethod
226
+ def SubscribeFlightInformation (request ,
227
+ target ,
228
+ options = (),
229
+ channel_credentials = None ,
230
+ call_credentials = None ,
231
+ insecure = False ,
232
+ compression = None ,
233
+ wait_for_ready = None ,
234
+ timeout = None ,
235
+ metadata = None ):
236
+ return grpc .experimental .unary_stream (request , target , '/mavsdk.rpc.info.InfoService/SubscribeFlightInformation' ,
237
+ info_dot_info__pb2 .SubscribeFlightInformationRequest .SerializeToString ,
238
+ info_dot_info__pb2 .FlightInformationResponse .FromString ,
239
+ options , channel_credentials ,
240
+ insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
0 commit comments