• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mavlink / MAVSDK / 24114167644

08 Apr 2026 02:17AM UTC coverage: 50.468% (+0.003%) from 50.465%
24114167644

push

github

web-flow
core: hide symbols by default, export only public API (#2855)

* core: hide symbols by default, export only public API

Backport of #2824 to v3. Fixes segfault when MAVSDK is used alongside
ROS2 (or any library sharing bundled dependencies like OpenSSL/tinyxml2)
due to symbol conflicts from leaked third-party symbols.

- Add mavsdk_export.h with MAVSDK_PUBLIC, MAVSDK_TEST_EXPORT, and
  MAVSDK_TEMPL_INST macros
- Set CXX_VISIBILITY_PRESET=hidden and VISIBILITY_INLINES_HIDDEN=ON
- MAVSDK_SHARED compile definition gates dllexport/dllimport so that
  static builds on Windows are unaffected
- Annotate all public classes, free functions, operator overloads,
  and explicit template instantiations
- Update jinja2 templates to emit MAVSDK_PUBLIC on generated
  operator== and operator<< definitions
- Disable MSVC C4251 warning for DLL interface on STL members

Fixes #2852

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: remove stale asio includes from mission transfer client header

The backport patch incorrectly added asio includes that don't exist on
v3 (they were added on main after v3 branched).

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

15 of 379 new or added lines in 39 files covered. (3.96%)

4 existing lines in 3 files now uncovered.

19248 of 38139 relevant lines covered (50.47%)

672.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

10.1
/src/mavsdk/plugins/camera_server/camera_server.cpp
1
// WARNING: THIS FILE IS AUTOGENERATED! As such, it should not be edited.
2
// Edits need to be made to the proto files
3
// (see
4
// https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/camera_server/camera_server.proto)
5

6
#include <iomanip>
7

8
#include "camera_server_impl.h"
9
#include "plugins/camera_server/camera_server.h"
10

11
namespace mavsdk {
12

13
using Information = CameraServer::Information;
14
using VideoStreaming = CameraServer::VideoStreaming;
15
using Position = CameraServer::Position;
16
using Quaternion = CameraServer::Quaternion;
17
using CaptureInfo = CameraServer::CaptureInfo;
18

19
using StorageInformation = CameraServer::StorageInformation;
20
using CaptureStatus = CameraServer::CaptureStatus;
21
using TrackPoint = CameraServer::TrackPoint;
22
using TrackRectangle = CameraServer::TrackRectangle;
23

24
CameraServer::CameraServer(std::shared_ptr<ServerComponent> server_component) :
11✔
25
    ServerPluginBase(),
26
    _impl{std::make_unique<CameraServerImpl>(server_component)}
11✔
27
{}
11✔
28

29
CameraServer::~CameraServer() {}
11✔
30

31
CameraServer::Result CameraServer::set_information(Information information) const
11✔
32
{
33
    return _impl->set_information(information);
11✔
34
}
35

36
CameraServer::Result CameraServer::set_video_streaming(VideoStreaming video_streaming) const
1✔
37
{
38
    return _impl->set_video_streaming(video_streaming);
1✔
39
}
40

41
CameraServer::Result CameraServer::set_in_progress(bool in_progress) const
×
42
{
43
    return _impl->set_in_progress(in_progress);
×
44
}
45

46
CameraServer::TakePhotoHandle CameraServer::subscribe_take_photo(const TakePhotoCallback& callback)
2✔
47
{
48
    return _impl->subscribe_take_photo(callback);
2✔
49
}
50

51
void CameraServer::unsubscribe_take_photo(TakePhotoHandle handle)
×
52
{
53
    _impl->unsubscribe_take_photo(handle);
×
54
}
×
55

56
CameraServer::Result
57
CameraServer::respond_take_photo(CameraFeedback take_photo_feedback, CaptureInfo capture_info) const
4✔
58
{
59
    return _impl->respond_take_photo(take_photo_feedback, capture_info);
4✔
60
}
61

62
CameraServer::StartVideoHandle
63
CameraServer::subscribe_start_video(const StartVideoCallback& callback)
×
64
{
65
    return _impl->subscribe_start_video(callback);
×
66
}
67

68
void CameraServer::unsubscribe_start_video(StartVideoHandle handle)
×
69
{
70
    _impl->unsubscribe_start_video(handle);
×
71
}
×
72

73
CameraServer::Result CameraServer::respond_start_video(CameraFeedback start_video_feedback) const
×
74
{
75
    return _impl->respond_start_video(start_video_feedback);
×
76
}
77

78
CameraServer::StopVideoHandle CameraServer::subscribe_stop_video(const StopVideoCallback& callback)
×
79
{
80
    return _impl->subscribe_stop_video(callback);
×
81
}
82

83
void CameraServer::unsubscribe_stop_video(StopVideoHandle handle)
×
84
{
85
    _impl->unsubscribe_stop_video(handle);
×
86
}
×
87

88
CameraServer::Result CameraServer::respond_stop_video(CameraFeedback stop_video_feedback) const
×
89
{
90
    return _impl->respond_stop_video(stop_video_feedback);
×
91
}
92

93
CameraServer::StartVideoStreamingHandle
94
CameraServer::subscribe_start_video_streaming(const StartVideoStreamingCallback& callback)
×
95
{
96
    return _impl->subscribe_start_video_streaming(callback);
×
97
}
98

99
void CameraServer::unsubscribe_start_video_streaming(StartVideoStreamingHandle handle)
×
100
{
101
    _impl->unsubscribe_start_video_streaming(handle);
×
102
}
×
103

104
CameraServer::Result
105
CameraServer::respond_start_video_streaming(CameraFeedback start_video_streaming_feedback) const
×
106
{
107
    return _impl->respond_start_video_streaming(start_video_streaming_feedback);
×
108
}
109

110
CameraServer::StopVideoStreamingHandle
111
CameraServer::subscribe_stop_video_streaming(const StopVideoStreamingCallback& callback)
×
112
{
113
    return _impl->subscribe_stop_video_streaming(callback);
×
114
}
115

116
void CameraServer::unsubscribe_stop_video_streaming(StopVideoStreamingHandle handle)
×
117
{
118
    _impl->unsubscribe_stop_video_streaming(handle);
×
119
}
×
120

121
CameraServer::Result
122
CameraServer::respond_stop_video_streaming(CameraFeedback stop_video_streaming_feedback) const
×
123
{
124
    return _impl->respond_stop_video_streaming(stop_video_streaming_feedback);
×
125
}
126

127
CameraServer::SetModeHandle CameraServer::subscribe_set_mode(const SetModeCallback& callback)
2✔
128
{
129
    return _impl->subscribe_set_mode(callback);
2✔
130
}
131

132
void CameraServer::unsubscribe_set_mode(SetModeHandle handle)
1✔
133
{
134
    _impl->unsubscribe_set_mode(handle);
1✔
135
}
1✔
136

137
CameraServer::Result CameraServer::respond_set_mode(CameraFeedback set_mode_feedback) const
2✔
138
{
139
    return _impl->respond_set_mode(set_mode_feedback);
2✔
140
}
141

142
CameraServer::StorageInformationHandle
143
CameraServer::subscribe_storage_information(const StorageInformationCallback& callback)
1✔
144
{
145
    return _impl->subscribe_storage_information(callback);
1✔
146
}
147

148
void CameraServer::unsubscribe_storage_information(StorageInformationHandle handle)
×
149
{
150
    _impl->unsubscribe_storage_information(handle);
×
151
}
×
152

153
CameraServer::Result CameraServer::respond_storage_information(
2✔
154
    CameraFeedback storage_information_feedback, StorageInformation storage_information) const
155
{
156
    return _impl->respond_storage_information(storage_information_feedback, storage_information);
2✔
157
}
158

159
CameraServer::CaptureStatusHandle
160
CameraServer::subscribe_capture_status(const CaptureStatusCallback& callback)
×
161
{
162
    return _impl->subscribe_capture_status(callback);
×
163
}
164

165
void CameraServer::unsubscribe_capture_status(CaptureStatusHandle handle)
×
166
{
167
    _impl->unsubscribe_capture_status(handle);
×
168
}
×
169

170
CameraServer::Result CameraServer::respond_capture_status(
×
171
    CameraFeedback capture_status_feedback, CaptureStatus capture_status) const
172
{
173
    return _impl->respond_capture_status(capture_status_feedback, capture_status);
×
174
}
175

176
CameraServer::FormatStorageHandle
177
CameraServer::subscribe_format_storage(const FormatStorageCallback& callback)
1✔
178
{
179
    return _impl->subscribe_format_storage(callback);
1✔
180
}
181

182
void CameraServer::unsubscribe_format_storage(FormatStorageHandle handle)
1✔
183
{
184
    _impl->unsubscribe_format_storage(handle);
1✔
185
}
1✔
186

187
CameraServer::Result
188
CameraServer::respond_format_storage(CameraFeedback format_storage_feedback) const
1✔
189
{
190
    return _impl->respond_format_storage(format_storage_feedback);
1✔
191
}
192

193
CameraServer::ResetSettingsHandle
194
CameraServer::subscribe_reset_settings(const ResetSettingsCallback& callback)
1✔
195
{
196
    return _impl->subscribe_reset_settings(callback);
1✔
197
}
198

199
void CameraServer::unsubscribe_reset_settings(ResetSettingsHandle handle)
×
200
{
201
    _impl->unsubscribe_reset_settings(handle);
×
202
}
×
203

204
CameraServer::Result
205
CameraServer::respond_reset_settings(CameraFeedback reset_settings_feedback) const
1✔
206
{
207
    return _impl->respond_reset_settings(reset_settings_feedback);
1✔
208
}
209

210
CameraServer::ZoomInStartHandle
211
CameraServer::subscribe_zoom_in_start(const ZoomInStartCallback& callback)
×
212
{
213
    return _impl->subscribe_zoom_in_start(callback);
×
214
}
215

216
void CameraServer::unsubscribe_zoom_in_start(ZoomInStartHandle handle)
×
217
{
218
    _impl->unsubscribe_zoom_in_start(handle);
×
219
}
×
220

221
CameraServer::Result
222
CameraServer::respond_zoom_in_start(CameraFeedback zoom_in_start_feedback) const
×
223
{
224
    return _impl->respond_zoom_in_start(zoom_in_start_feedback);
×
225
}
226

227
CameraServer::ZoomOutStartHandle
228
CameraServer::subscribe_zoom_out_start(const ZoomOutStartCallback& callback)
×
229
{
230
    return _impl->subscribe_zoom_out_start(callback);
×
231
}
232

233
void CameraServer::unsubscribe_zoom_out_start(ZoomOutStartHandle handle)
×
234
{
235
    _impl->unsubscribe_zoom_out_start(handle);
×
236
}
×
237

238
CameraServer::Result
239
CameraServer::respond_zoom_out_start(CameraFeedback zoom_out_start_feedback) const
×
240
{
241
    return _impl->respond_zoom_out_start(zoom_out_start_feedback);
×
242
}
243

244
CameraServer::ZoomStopHandle CameraServer::subscribe_zoom_stop(const ZoomStopCallback& callback)
×
245
{
246
    return _impl->subscribe_zoom_stop(callback);
×
247
}
248

249
void CameraServer::unsubscribe_zoom_stop(ZoomStopHandle handle)
×
250
{
251
    _impl->unsubscribe_zoom_stop(handle);
×
252
}
×
253

254
CameraServer::Result CameraServer::respond_zoom_stop(CameraFeedback zoom_stop_feedback) const
×
255
{
256
    return _impl->respond_zoom_stop(zoom_stop_feedback);
×
257
}
258

259
CameraServer::ZoomRangeHandle CameraServer::subscribe_zoom_range(const ZoomRangeCallback& callback)
×
260
{
261
    return _impl->subscribe_zoom_range(callback);
×
262
}
263

264
void CameraServer::unsubscribe_zoom_range(ZoomRangeHandle handle)
×
265
{
266
    _impl->unsubscribe_zoom_range(handle);
×
267
}
×
268

269
CameraServer::Result CameraServer::respond_zoom_range(CameraFeedback zoom_range_feedback) const
×
270
{
271
    return _impl->respond_zoom_range(zoom_range_feedback);
×
272
}
273

274
void CameraServer::set_tracking_rectangle_status(TrackRectangle tracked_rectangle) const
×
275
{
276
    _impl->set_tracking_rectangle_status(tracked_rectangle);
×
277
}
×
278

279
void CameraServer::set_tracking_off_status() const
×
280
{
281
    _impl->set_tracking_off_status();
×
282
}
×
283

284
CameraServer::TrackingPointCommandHandle
285
CameraServer::subscribe_tracking_point_command(const TrackingPointCommandCallback& callback)
×
286
{
287
    return _impl->subscribe_tracking_point_command(callback);
×
288
}
289

290
void CameraServer::unsubscribe_tracking_point_command(TrackingPointCommandHandle handle)
×
291
{
292
    _impl->unsubscribe_tracking_point_command(handle);
×
293
}
×
294

295
CameraServer::TrackingRectangleCommandHandle
296
CameraServer::subscribe_tracking_rectangle_command(const TrackingRectangleCommandCallback& callback)
×
297
{
298
    return _impl->subscribe_tracking_rectangle_command(callback);
×
299
}
300

301
void CameraServer::unsubscribe_tracking_rectangle_command(TrackingRectangleCommandHandle handle)
×
302
{
303
    _impl->unsubscribe_tracking_rectangle_command(handle);
×
304
}
×
305

306
CameraServer::TrackingOffCommandHandle
307
CameraServer::subscribe_tracking_off_command(const TrackingOffCommandCallback& callback)
×
308
{
309
    return _impl->subscribe_tracking_off_command(callback);
×
310
}
311

312
void CameraServer::unsubscribe_tracking_off_command(TrackingOffCommandHandle handle)
×
313
{
314
    _impl->unsubscribe_tracking_off_command(handle);
×
315
}
×
316

317
CameraServer::Result
318
CameraServer::respond_tracking_point_command(CameraFeedback stop_video_feedback) const
×
319
{
320
    return _impl->respond_tracking_point_command(stop_video_feedback);
×
321
}
322

323
CameraServer::Result
324
CameraServer::respond_tracking_rectangle_command(CameraFeedback stop_video_feedback) const
×
325
{
326
    return _impl->respond_tracking_rectangle_command(stop_video_feedback);
×
327
}
328

329
CameraServer::Result
330
CameraServer::respond_tracking_off_command(CameraFeedback stop_video_feedback) const
×
331
{
332
    return _impl->respond_tracking_off_command(stop_video_feedback);
×
333
}
334

335
MAVSDK_PUBLIC bool
NEW
336
operator==(const CameraServer::Information& lhs, const CameraServer::Information& rhs)
×
337
{
338
    return (rhs.vendor_name == lhs.vendor_name) && (rhs.model_name == lhs.model_name) &&
×
339
           (rhs.firmware_version == lhs.firmware_version) &&
×
340
           ((std::isnan(rhs.focal_length_mm) && std::isnan(lhs.focal_length_mm)) ||
×
341
            rhs.focal_length_mm == lhs.focal_length_mm) &&
×
342
           ((std::isnan(rhs.horizontal_sensor_size_mm) &&
×
343
             std::isnan(lhs.horizontal_sensor_size_mm)) ||
×
344
            rhs.horizontal_sensor_size_mm == lhs.horizontal_sensor_size_mm) &&
×
345
           ((std::isnan(rhs.vertical_sensor_size_mm) && std::isnan(lhs.vertical_sensor_size_mm)) ||
×
346
            rhs.vertical_sensor_size_mm == lhs.vertical_sensor_size_mm) &&
×
347
           (rhs.horizontal_resolution_px == lhs.horizontal_resolution_px) &&
×
348
           (rhs.vertical_resolution_px == lhs.vertical_resolution_px) &&
×
349
           (rhs.lens_id == lhs.lens_id) &&
×
350
           (rhs.definition_file_version == lhs.definition_file_version) &&
×
351
           (rhs.definition_file_uri == lhs.definition_file_uri) &&
×
352
           (rhs.image_in_video_mode_supported == lhs.image_in_video_mode_supported) &&
×
353
           (rhs.video_in_image_mode_supported == lhs.video_in_image_mode_supported);
×
354
}
355

356
MAVSDK_PUBLIC std::ostream&
NEW
357
operator<<(std::ostream& str, CameraServer::Information const& information)
×
358
{
359
    str << std::setprecision(15);
×
360
    str << "information:" << '\n' << "{\n";
×
361
    str << "    vendor_name: " << information.vendor_name << '\n';
×
362
    str << "    model_name: " << information.model_name << '\n';
×
363
    str << "    firmware_version: " << information.firmware_version << '\n';
×
364
    str << "    focal_length_mm: " << information.focal_length_mm << '\n';
×
365
    str << "    horizontal_sensor_size_mm: " << information.horizontal_sensor_size_mm << '\n';
×
366
    str << "    vertical_sensor_size_mm: " << information.vertical_sensor_size_mm << '\n';
×
367
    str << "    horizontal_resolution_px: " << information.horizontal_resolution_px << '\n';
×
368
    str << "    vertical_resolution_px: " << information.vertical_resolution_px << '\n';
×
369
    str << "    lens_id: " << information.lens_id << '\n';
×
370
    str << "    definition_file_version: " << information.definition_file_version << '\n';
×
371
    str << "    definition_file_uri: " << information.definition_file_uri << '\n';
×
372
    str << "    image_in_video_mode_supported: " << information.image_in_video_mode_supported
×
373
        << '\n';
×
374
    str << "    video_in_image_mode_supported: " << information.video_in_image_mode_supported
×
375
        << '\n';
×
376
    str << '}';
×
377
    return str;
×
378
}
379

380
MAVSDK_PUBLIC bool
NEW
381
operator==(const CameraServer::VideoStreaming& lhs, const CameraServer::VideoStreaming& rhs)
×
382
{
383
    return (rhs.has_rtsp_server == lhs.has_rtsp_server) && (rhs.rtsp_uri == lhs.rtsp_uri);
×
384
}
385

386
MAVSDK_PUBLIC std::ostream&
NEW
387
operator<<(std::ostream& str, CameraServer::VideoStreaming const& video_streaming)
×
388
{
389
    str << std::setprecision(15);
×
390
    str << "video_streaming:" << '\n' << "{\n";
×
391
    str << "    has_rtsp_server: " << video_streaming.has_rtsp_server << '\n';
×
392
    str << "    rtsp_uri: " << video_streaming.rtsp_uri << '\n';
×
393
    str << '}';
×
394
    return str;
×
395
}
396

NEW
397
MAVSDK_PUBLIC bool operator==(const CameraServer::Position& lhs, const CameraServer::Position& rhs)
×
398
{
399
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
400
            rhs.latitude_deg == lhs.latitude_deg) &&
×
401
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
402
            rhs.longitude_deg == lhs.longitude_deg) &&
×
403
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
404
            rhs.absolute_altitude_m == lhs.absolute_altitude_m) &&
×
405
           ((std::isnan(rhs.relative_altitude_m) && std::isnan(lhs.relative_altitude_m)) ||
×
406
            rhs.relative_altitude_m == lhs.relative_altitude_m);
×
407
}
408

NEW
409
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, CameraServer::Position const& position)
×
410
{
411
    str << std::setprecision(15);
×
412
    str << "position:" << '\n' << "{\n";
×
413
    str << "    latitude_deg: " << position.latitude_deg << '\n';
×
414
    str << "    longitude_deg: " << position.longitude_deg << '\n';
×
415
    str << "    absolute_altitude_m: " << position.absolute_altitude_m << '\n';
×
416
    str << "    relative_altitude_m: " << position.relative_altitude_m << '\n';
×
417
    str << '}';
×
418
    return str;
×
419
}
420

421
MAVSDK_PUBLIC bool
NEW
422
operator==(const CameraServer::Quaternion& lhs, const CameraServer::Quaternion& rhs)
×
423
{
424
    return ((std::isnan(rhs.w) && std::isnan(lhs.w)) || rhs.w == lhs.w) &&
×
425
           ((std::isnan(rhs.x) && std::isnan(lhs.x)) || rhs.x == lhs.x) &&
×
426
           ((std::isnan(rhs.y) && std::isnan(lhs.y)) || rhs.y == lhs.y) &&
×
427
           ((std::isnan(rhs.z) && std::isnan(lhs.z)) || rhs.z == lhs.z);
×
428
}
429

430
MAVSDK_PUBLIC std::ostream&
NEW
431
operator<<(std::ostream& str, CameraServer::Quaternion const& quaternion)
×
432
{
433
    str << std::setprecision(15);
×
434
    str << "quaternion:" << '\n' << "{\n";
×
435
    str << "    w: " << quaternion.w << '\n';
×
436
    str << "    x: " << quaternion.x << '\n';
×
437
    str << "    y: " << quaternion.y << '\n';
×
438
    str << "    z: " << quaternion.z << '\n';
×
439
    str << '}';
×
440
    return str;
×
441
}
442

443
MAVSDK_PUBLIC bool
NEW
444
operator==(const CameraServer::CaptureInfo& lhs, const CameraServer::CaptureInfo& rhs)
×
445
{
446
    return (rhs.position == lhs.position) && (rhs.attitude_quaternion == lhs.attitude_quaternion) &&
×
447
           (rhs.time_utc_us == lhs.time_utc_us) && (rhs.is_success == lhs.is_success) &&
×
448
           (rhs.index == lhs.index) && (rhs.file_url == lhs.file_url);
×
449
}
450

451
MAVSDK_PUBLIC std::ostream&
NEW
452
operator<<(std::ostream& str, CameraServer::CaptureInfo const& capture_info)
×
453
{
454
    str << std::setprecision(15);
×
455
    str << "capture_info:" << '\n' << "{\n";
×
456
    str << "    position: " << capture_info.position << '\n';
×
457
    str << "    attitude_quaternion: " << capture_info.attitude_quaternion << '\n';
×
458
    str << "    time_utc_us: " << capture_info.time_utc_us << '\n';
×
459
    str << "    is_success: " << capture_info.is_success << '\n';
×
460
    str << "    index: " << capture_info.index << '\n';
×
461
    str << "    file_url: " << capture_info.file_url << '\n';
×
462
    str << '}';
×
463
    return str;
×
464
}
465

NEW
466
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, CameraServer::Result const& result)
×
467
{
468
    switch (result) {
×
469
        case CameraServer::Result::Unknown:
×
470
            return str << "Unknown";
×
471
        case CameraServer::Result::Success:
×
472
            return str << "Success";
×
473
        case CameraServer::Result::InProgress:
×
474
            return str << "In Progress";
×
475
        case CameraServer::Result::Busy:
×
476
            return str << "Busy";
×
477
        case CameraServer::Result::Denied:
×
478
            return str << "Denied";
×
479
        case CameraServer::Result::Error:
×
480
            return str << "Error";
×
481
        case CameraServer::Result::Timeout:
×
482
            return str << "Timeout";
×
483
        case CameraServer::Result::WrongArgument:
×
484
            return str << "Wrong Argument";
×
485
        case CameraServer::Result::NoSystem:
×
486
            return str << "No System";
×
487
        default:
×
488
            return str << "Unknown";
×
489
    }
490
}
491

492
MAVSDK_PUBLIC std::ostream&
493
operator<<(std::ostream& str, CameraServer::StorageInformation::StorageStatus const& storage_status)
×
494
{
495
    switch (storage_status) {
×
496
        case CameraServer::StorageInformation::StorageStatus::NotAvailable:
×
497
            return str << "Not Available";
×
498
        case CameraServer::StorageInformation::StorageStatus::Unformatted:
×
499
            return str << "Unformatted";
×
500
        case CameraServer::StorageInformation::StorageStatus::Formatted:
×
501
            return str << "Formatted";
×
502
        case CameraServer::StorageInformation::StorageStatus::NotSupported:
×
503
            return str << "Not Supported";
×
504
        default:
×
505
            return str << "Unknown";
×
506
    }
507
}
508

509
MAVSDK_PUBLIC std::ostream&
510
operator<<(std::ostream& str, CameraServer::StorageInformation::StorageType const& storage_type)
×
511
{
512
    switch (storage_type) {
×
513
        case CameraServer::StorageInformation::StorageType::Unknown:
×
514
            return str << "Unknown";
×
515
        case CameraServer::StorageInformation::StorageType::UsbStick:
×
516
            return str << "Usb Stick";
×
517
        case CameraServer::StorageInformation::StorageType::Sd:
×
518
            return str << "Sd";
×
519
        case CameraServer::StorageInformation::StorageType::Microsd:
×
520
            return str << "Microsd";
×
521
        case CameraServer::StorageInformation::StorageType::Hd:
×
522
            return str << "Hd";
×
523
        case CameraServer::StorageInformation::StorageType::Other:
×
524
            return str << "Other";
×
525
        default:
×
526
            return str << "Unknown";
×
527
    }
528
}
529
MAVSDK_PUBLIC bool
NEW
530
operator==(const CameraServer::StorageInformation& lhs, const CameraServer::StorageInformation& rhs)
×
531
{
532
    return ((std::isnan(rhs.used_storage_mib) && std::isnan(lhs.used_storage_mib)) ||
×
533
            rhs.used_storage_mib == lhs.used_storage_mib) &&
×
534
           ((std::isnan(rhs.available_storage_mib) && std::isnan(lhs.available_storage_mib)) ||
×
535
            rhs.available_storage_mib == lhs.available_storage_mib) &&
×
536
           ((std::isnan(rhs.total_storage_mib) && std::isnan(lhs.total_storage_mib)) ||
×
537
            rhs.total_storage_mib == lhs.total_storage_mib) &&
×
538
           (rhs.storage_status == lhs.storage_status) && (rhs.storage_id == lhs.storage_id) &&
×
539
           (rhs.storage_type == lhs.storage_type) &&
×
540
           ((std::isnan(rhs.read_speed_mib_s) && std::isnan(lhs.read_speed_mib_s)) ||
×
541
            rhs.read_speed_mib_s == lhs.read_speed_mib_s) &&
×
542
           ((std::isnan(rhs.write_speed_mib_s) && std::isnan(lhs.write_speed_mib_s)) ||
×
543
            rhs.write_speed_mib_s == lhs.write_speed_mib_s);
×
544
}
545

546
MAVSDK_PUBLIC std::ostream&
547
operator<<(std::ostream& str, CameraServer::StorageInformation const& storage_information)
×
548
{
549
    str << std::setprecision(15);
×
550
    str << "storage_information:" << '\n' << "{\n";
×
551
    str << "    used_storage_mib: " << storage_information.used_storage_mib << '\n';
×
552
    str << "    available_storage_mib: " << storage_information.available_storage_mib << '\n';
×
553
    str << "    total_storage_mib: " << storage_information.total_storage_mib << '\n';
×
554
    str << "    storage_status: " << storage_information.storage_status << '\n';
×
555
    str << "    storage_id: " << storage_information.storage_id << '\n';
×
556
    str << "    storage_type: " << storage_information.storage_type << '\n';
×
557
    str << "    read_speed_mib_s: " << storage_information.read_speed_mib_s << '\n';
×
558
    str << "    write_speed_mib_s: " << storage_information.write_speed_mib_s << '\n';
×
559
    str << '}';
×
560
    return str;
×
561
}
562

563
MAVSDK_PUBLIC std::ostream&
564
operator<<(std::ostream& str, CameraServer::CaptureStatus::ImageStatus const& image_status)
×
565
{
566
    switch (image_status) {
×
567
        case CameraServer::CaptureStatus::ImageStatus::Idle:
×
568
            return str << "Idle";
×
569
        case CameraServer::CaptureStatus::ImageStatus::CaptureInProgress:
×
570
            return str << "Capture In Progress";
×
571
        case CameraServer::CaptureStatus::ImageStatus::IntervalIdle:
×
572
            return str << "Interval Idle";
×
573
        case CameraServer::CaptureStatus::ImageStatus::IntervalInProgress:
×
574
            return str << "Interval In Progress";
×
575
        default:
×
576
            return str << "Unknown";
×
577
    }
578
}
579

580
MAVSDK_PUBLIC std::ostream&
581
operator<<(std::ostream& str, CameraServer::CaptureStatus::VideoStatus const& video_status)
×
582
{
583
    switch (video_status) {
×
584
        case CameraServer::CaptureStatus::VideoStatus::Idle:
×
585
            return str << "Idle";
×
586
        case CameraServer::CaptureStatus::VideoStatus::CaptureInProgress:
×
587
            return str << "Capture In Progress";
×
588
        default:
×
589
            return str << "Unknown";
×
590
    }
591
}
592
MAVSDK_PUBLIC bool
NEW
593
operator==(const CameraServer::CaptureStatus& lhs, const CameraServer::CaptureStatus& rhs)
×
594
{
595
    return ((std::isnan(rhs.image_interval_s) && std::isnan(lhs.image_interval_s)) ||
×
596
            rhs.image_interval_s == lhs.image_interval_s) &&
×
597
           ((std::isnan(rhs.recording_time_s) && std::isnan(lhs.recording_time_s)) ||
×
598
            rhs.recording_time_s == lhs.recording_time_s) &&
×
599
           ((std::isnan(rhs.available_capacity_mib) && std::isnan(lhs.available_capacity_mib)) ||
×
600
            rhs.available_capacity_mib == lhs.available_capacity_mib) &&
×
601
           (rhs.image_status == lhs.image_status) && (rhs.video_status == lhs.video_status) &&
×
602
           (rhs.image_count == lhs.image_count);
×
603
}
604

605
MAVSDK_PUBLIC std::ostream&
NEW
606
operator<<(std::ostream& str, CameraServer::CaptureStatus const& capture_status)
×
607
{
608
    str << std::setprecision(15);
×
609
    str << "capture_status:" << '\n' << "{\n";
×
610
    str << "    image_interval_s: " << capture_status.image_interval_s << '\n';
×
611
    str << "    recording_time_s: " << capture_status.recording_time_s << '\n';
×
612
    str << "    available_capacity_mib: " << capture_status.available_capacity_mib << '\n';
×
613
    str << "    image_status: " << capture_status.image_status << '\n';
×
614
    str << "    video_status: " << capture_status.video_status << '\n';
×
615
    str << "    image_count: " << capture_status.image_count << '\n';
×
616
    str << '}';
×
617
    return str;
×
618
}
619

620
MAVSDK_PUBLIC bool
NEW
621
operator==(const CameraServer::TrackPoint& lhs, const CameraServer::TrackPoint& rhs)
×
622
{
623
    return ((std::isnan(rhs.point_x) && std::isnan(lhs.point_x)) || rhs.point_x == lhs.point_x) &&
×
624
           ((std::isnan(rhs.point_y) && std::isnan(lhs.point_y)) || rhs.point_y == lhs.point_y) &&
×
625
           ((std::isnan(rhs.radius) && std::isnan(lhs.radius)) || rhs.radius == lhs.radius);
×
626
}
627

628
MAVSDK_PUBLIC std::ostream&
NEW
629
operator<<(std::ostream& str, CameraServer::TrackPoint const& track_point)
×
630
{
631
    str << std::setprecision(15);
×
632
    str << "track_point:" << '\n' << "{\n";
×
633
    str << "    point_x: " << track_point.point_x << '\n';
×
634
    str << "    point_y: " << track_point.point_y << '\n';
×
635
    str << "    radius: " << track_point.radius << '\n';
×
636
    str << '}';
×
637
    return str;
×
638
}
639

640
MAVSDK_PUBLIC bool
NEW
641
operator==(const CameraServer::TrackRectangle& lhs, const CameraServer::TrackRectangle& rhs)
×
642
{
643
    return ((std::isnan(rhs.top_left_corner_x) && std::isnan(lhs.top_left_corner_x)) ||
×
644
            rhs.top_left_corner_x == lhs.top_left_corner_x) &&
×
645
           ((std::isnan(rhs.top_left_corner_y) && std::isnan(lhs.top_left_corner_y)) ||
×
646
            rhs.top_left_corner_y == lhs.top_left_corner_y) &&
×
647
           ((std::isnan(rhs.bottom_right_corner_x) && std::isnan(lhs.bottom_right_corner_x)) ||
×
648
            rhs.bottom_right_corner_x == lhs.bottom_right_corner_x) &&
×
649
           ((std::isnan(rhs.bottom_right_corner_y) && std::isnan(lhs.bottom_right_corner_y)) ||
×
650
            rhs.bottom_right_corner_y == lhs.bottom_right_corner_y);
×
651
}
652

653
MAVSDK_PUBLIC std::ostream&
NEW
654
operator<<(std::ostream& str, CameraServer::TrackRectangle const& track_rectangle)
×
655
{
656
    str << std::setprecision(15);
×
657
    str << "track_rectangle:" << '\n' << "{\n";
×
658
    str << "    top_left_corner_x: " << track_rectangle.top_left_corner_x << '\n';
×
659
    str << "    top_left_corner_y: " << track_rectangle.top_left_corner_y << '\n';
×
660
    str << "    bottom_right_corner_x: " << track_rectangle.bottom_right_corner_x << '\n';
×
661
    str << "    bottom_right_corner_y: " << track_rectangle.bottom_right_corner_y << '\n';
×
662
    str << '}';
×
663
    return str;
×
664
}
665

666
MAVSDK_PUBLIC std::ostream&
NEW
667
operator<<(std::ostream& str, CameraServer::CameraFeedback const& camera_feedback)
×
668
{
669
    switch (camera_feedback) {
×
670
        case CameraServer::CameraFeedback::Unknown:
×
671
            return str << "Unknown";
×
672
        case CameraServer::CameraFeedback::Ok:
×
673
            return str << "Ok";
×
674
        case CameraServer::CameraFeedback::Busy:
×
675
            return str << "Busy";
×
676
        case CameraServer::CameraFeedback::Failed:
×
677
            return str << "Failed";
×
678
        default:
×
679
            return str << "Unknown";
×
680
    }
681
}
682

683
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, CameraServer::Mode const& mode)
2✔
684
{
685
    switch (mode) {
2✔
686
        case CameraServer::Mode::Unknown:
×
687
            return str << "Unknown";
×
688
        case CameraServer::Mode::Photo:
1✔
689
            return str << "Photo";
1✔
690
        case CameraServer::Mode::Video:
1✔
691
            return str << "Video";
1✔
692
        default:
×
693
            return str << "Unknown";
×
694
    }
695
}
696

697
} // namespace mavsdk
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc