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

mavlink / MAVSDK / 7317183253

24 Dec 2023 10:25PM UTC coverage: 36.26% (-0.6%) from 36.89%
7317183253

push

github

web-flow
Merge pull request #2088 from tbago/add_more_camera_function

More camera server functionality

28 of 718 new or added lines in 12 files covered. (3.9%)

20 existing lines in 6 files now uncovered.

10035 of 27675 relevant lines covered (36.26%)

127.93 hits per line

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

1.97
/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

22
CameraServer::CameraServer(std::shared_ptr<ServerComponent> server_component) :
1✔
23
    ServerPluginBase(),
24
    _impl{std::make_unique<CameraServerImpl>(server_component)}
1✔
25
{}
1✔
26

27
CameraServer::~CameraServer() {}
1✔
28

29
CameraServer::Result CameraServer::set_information(Information information) const
×
30
{
31
    return _impl->set_information(information);
×
32
}
33

NEW
34
CameraServer::Result CameraServer::set_video_streaming(VideoStreaming video_streaming) const
×
35
{
NEW
36
    return _impl->set_video_streaming(video_streaming);
×
37
}
38

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

44
CameraServer::TakePhotoHandle CameraServer::subscribe_take_photo(const TakePhotoCallback& callback)
1✔
45
{
46
    return _impl->subscribe_take_photo(callback);
1✔
47
}
48

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

54
CameraServer::Result
NEW
55
CameraServer::respond_take_photo(CameraFeedback take_photo_feedback, CaptureInfo capture_info) const
×
56
{
57
    return _impl->respond_take_photo(take_photo_feedback, capture_info);
×
58
}
59

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

NEW
66
void CameraServer::unsubscribe_start_video(StartVideoHandle handle)
×
67
{
NEW
68
    _impl->unsubscribe_start_video(handle);
×
NEW
69
}
×
70

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

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

NEW
81
void CameraServer::unsubscribe_stop_video(StopVideoHandle handle)
×
82
{
NEW
83
    _impl->unsubscribe_stop_video(handle);
×
NEW
84
}
×
85

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

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

NEW
97
void CameraServer::unsubscribe_start_video_streaming(StartVideoStreamingHandle handle)
×
98
{
NEW
99
    _impl->unsubscribe_start_video_streaming(handle);
×
NEW
100
}
×
101

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

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

NEW
114
void CameraServer::unsubscribe_stop_video_streaming(StopVideoStreamingHandle handle)
×
115
{
NEW
116
    _impl->unsubscribe_stop_video_streaming(handle);
×
NEW
117
}
×
118

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

NEW
125
CameraServer::SetModeHandle CameraServer::subscribe_set_mode(const SetModeCallback& callback)
×
126
{
NEW
127
    return _impl->subscribe_set_mode(callback);
×
128
}
129

NEW
130
void CameraServer::unsubscribe_set_mode(SetModeHandle handle)
×
131
{
NEW
132
    _impl->unsubscribe_set_mode(handle);
×
NEW
133
}
×
134

NEW
135
CameraServer::Result CameraServer::respond_set_mode(CameraFeedback set_mode_feedback) const
×
136
{
NEW
137
    return _impl->respond_set_mode(set_mode_feedback);
×
138
}
139

140
CameraServer::StorageInformationHandle
NEW
141
CameraServer::subscribe_storage_information(const StorageInformationCallback& callback)
×
142
{
NEW
143
    return _impl->subscribe_storage_information(callback);
×
144
}
145

NEW
146
void CameraServer::unsubscribe_storage_information(StorageInformationHandle handle)
×
147
{
NEW
148
    _impl->unsubscribe_storage_information(handle);
×
NEW
149
}
×
150

NEW
151
CameraServer::Result CameraServer::respond_storage_information(
×
152
    CameraFeedback storage_information_feedback, StorageInformation storage_information) const
153
{
NEW
154
    return _impl->respond_storage_information(storage_information_feedback, storage_information);
×
155
}
156

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

NEW
163
void CameraServer::unsubscribe_capture_status(CaptureStatusHandle handle)
×
164
{
NEW
165
    _impl->unsubscribe_capture_status(handle);
×
NEW
166
}
×
167

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

174
CameraServer::FormatStorageHandle
NEW
175
CameraServer::subscribe_format_storage(const FormatStorageCallback& callback)
×
176
{
NEW
177
    return _impl->subscribe_format_storage(callback);
×
178
}
179

NEW
180
void CameraServer::unsubscribe_format_storage(FormatStorageHandle handle)
×
181
{
NEW
182
    _impl->unsubscribe_format_storage(handle);
×
NEW
183
}
×
184

185
CameraServer::Result
NEW
186
CameraServer::respond_format_storage(CameraFeedback format_storage_feedback) const
×
187
{
NEW
188
    return _impl->respond_format_storage(format_storage_feedback);
×
189
}
190

191
CameraServer::ResetSettingsHandle
NEW
192
CameraServer::subscribe_reset_settings(const ResetSettingsCallback& callback)
×
193
{
NEW
194
    return _impl->subscribe_reset_settings(callback);
×
195
}
196

NEW
197
void CameraServer::unsubscribe_reset_settings(ResetSettingsHandle handle)
×
198
{
NEW
199
    _impl->unsubscribe_reset_settings(handle);
×
NEW
200
}
×
201

202
CameraServer::Result
NEW
203
CameraServer::respond_reset_settings(CameraFeedback reset_settings_feedback) const
×
204
{
NEW
205
    return _impl->respond_reset_settings(reset_settings_feedback);
×
206
}
207

UNCOV
208
bool operator==(const CameraServer::Information& lhs, const CameraServer::Information& rhs)
×
209
{
210
    return (rhs.vendor_name == lhs.vendor_name) && (rhs.model_name == lhs.model_name) &&
×
211
           (rhs.firmware_version == lhs.firmware_version) &&
×
212
           ((std::isnan(rhs.focal_length_mm) && std::isnan(lhs.focal_length_mm)) ||
×
213
            rhs.focal_length_mm == lhs.focal_length_mm) &&
×
214
           ((std::isnan(rhs.horizontal_sensor_size_mm) &&
×
215
             std::isnan(lhs.horizontal_sensor_size_mm)) ||
×
216
            rhs.horizontal_sensor_size_mm == lhs.horizontal_sensor_size_mm) &&
×
217
           ((std::isnan(rhs.vertical_sensor_size_mm) && std::isnan(lhs.vertical_sensor_size_mm)) ||
×
218
            rhs.vertical_sensor_size_mm == lhs.vertical_sensor_size_mm) &&
×
219
           (rhs.horizontal_resolution_px == lhs.horizontal_resolution_px) &&
×
220
           (rhs.vertical_resolution_px == lhs.vertical_resolution_px) &&
×
221
           (rhs.lens_id == lhs.lens_id) &&
×
222
           (rhs.definition_file_version == lhs.definition_file_version) &&
×
223
           (rhs.definition_file_uri == lhs.definition_file_uri);
×
224
}
225

226
std::ostream& operator<<(std::ostream& str, CameraServer::Information const& information)
×
227
{
228
    str << std::setprecision(15);
×
229
    str << "information:" << '\n' << "{\n";
×
230
    str << "    vendor_name: " << information.vendor_name << '\n';
×
231
    str << "    model_name: " << information.model_name << '\n';
×
232
    str << "    firmware_version: " << information.firmware_version << '\n';
×
233
    str << "    focal_length_mm: " << information.focal_length_mm << '\n';
×
234
    str << "    horizontal_sensor_size_mm: " << information.horizontal_sensor_size_mm << '\n';
×
235
    str << "    vertical_sensor_size_mm: " << information.vertical_sensor_size_mm << '\n';
×
236
    str << "    horizontal_resolution_px: " << information.horizontal_resolution_px << '\n';
×
237
    str << "    vertical_resolution_px: " << information.vertical_resolution_px << '\n';
×
238
    str << "    lens_id: " << information.lens_id << '\n';
×
239
    str << "    definition_file_version: " << information.definition_file_version << '\n';
×
240
    str << "    definition_file_uri: " << information.definition_file_uri << '\n';
×
241
    str << '}';
×
242
    return str;
×
243
}
244

NEW
245
bool operator==(const CameraServer::VideoStreaming& lhs, const CameraServer::VideoStreaming& rhs)
×
246
{
NEW
247
    return (rhs.has_rtsp_server == lhs.has_rtsp_server) && (rhs.rtsp_uri == lhs.rtsp_uri);
×
248
}
249

NEW
250
std::ostream& operator<<(std::ostream& str, CameraServer::VideoStreaming const& video_streaming)
×
251
{
NEW
252
    str << std::setprecision(15);
×
NEW
253
    str << "video_streaming:" << '\n' << "{\n";
×
NEW
254
    str << "    has_rtsp_server: " << video_streaming.has_rtsp_server << '\n';
×
NEW
255
    str << "    rtsp_uri: " << video_streaming.rtsp_uri << '\n';
×
NEW
256
    str << '}';
×
NEW
257
    return str;
×
258
}
259

UNCOV
260
bool operator==(const CameraServer::Position& lhs, const CameraServer::Position& rhs)
×
261
{
262
    return ((std::isnan(rhs.latitude_deg) && std::isnan(lhs.latitude_deg)) ||
×
263
            rhs.latitude_deg == lhs.latitude_deg) &&
×
264
           ((std::isnan(rhs.longitude_deg) && std::isnan(lhs.longitude_deg)) ||
×
265
            rhs.longitude_deg == lhs.longitude_deg) &&
×
266
           ((std::isnan(rhs.absolute_altitude_m) && std::isnan(lhs.absolute_altitude_m)) ||
×
267
            rhs.absolute_altitude_m == lhs.absolute_altitude_m) &&
×
268
           ((std::isnan(rhs.relative_altitude_m) && std::isnan(lhs.relative_altitude_m)) ||
×
269
            rhs.relative_altitude_m == lhs.relative_altitude_m);
×
270
}
271

272
std::ostream& operator<<(std::ostream& str, CameraServer::Position const& position)
×
273
{
274
    str << std::setprecision(15);
×
275
    str << "position:" << '\n' << "{\n";
×
276
    str << "    latitude_deg: " << position.latitude_deg << '\n';
×
277
    str << "    longitude_deg: " << position.longitude_deg << '\n';
×
278
    str << "    absolute_altitude_m: " << position.absolute_altitude_m << '\n';
×
279
    str << "    relative_altitude_m: " << position.relative_altitude_m << '\n';
×
280
    str << '}';
×
281
    return str;
×
282
}
283

284
bool operator==(const CameraServer::Quaternion& lhs, const CameraServer::Quaternion& rhs)
×
285
{
286
    return ((std::isnan(rhs.w) && std::isnan(lhs.w)) || rhs.w == lhs.w) &&
×
287
           ((std::isnan(rhs.x) && std::isnan(lhs.x)) || rhs.x == lhs.x) &&
×
288
           ((std::isnan(rhs.y) && std::isnan(lhs.y)) || rhs.y == lhs.y) &&
×
289
           ((std::isnan(rhs.z) && std::isnan(lhs.z)) || rhs.z == lhs.z);
×
290
}
291

292
std::ostream& operator<<(std::ostream& str, CameraServer::Quaternion const& quaternion)
×
293
{
294
    str << std::setprecision(15);
×
295
    str << "quaternion:" << '\n' << "{\n";
×
296
    str << "    w: " << quaternion.w << '\n';
×
297
    str << "    x: " << quaternion.x << '\n';
×
298
    str << "    y: " << quaternion.y << '\n';
×
299
    str << "    z: " << quaternion.z << '\n';
×
300
    str << '}';
×
301
    return str;
×
302
}
303

304
bool operator==(const CameraServer::CaptureInfo& lhs, const CameraServer::CaptureInfo& rhs)
×
305
{
306
    return (rhs.position == lhs.position) && (rhs.attitude_quaternion == lhs.attitude_quaternion) &&
×
307
           (rhs.time_utc_us == lhs.time_utc_us) && (rhs.is_success == lhs.is_success) &&
×
308
           (rhs.index == lhs.index) && (rhs.file_url == lhs.file_url);
×
309
}
310

311
std::ostream& operator<<(std::ostream& str, CameraServer::CaptureInfo const& capture_info)
×
312
{
313
    str << std::setprecision(15);
×
314
    str << "capture_info:" << '\n' << "{\n";
×
315
    str << "    position: " << capture_info.position << '\n';
×
316
    str << "    attitude_quaternion: " << capture_info.attitude_quaternion << '\n';
×
317
    str << "    time_utc_us: " << capture_info.time_utc_us << '\n';
×
318
    str << "    is_success: " << capture_info.is_success << '\n';
×
319
    str << "    index: " << capture_info.index << '\n';
×
320
    str << "    file_url: " << capture_info.file_url << '\n';
×
321
    str << '}';
×
322
    return str;
×
323
}
324

325
std::ostream& operator<<(std::ostream& str, CameraServer::Result const& result)
×
326
{
327
    switch (result) {
×
328
        case CameraServer::Result::Unknown:
×
329
            return str << "Unknown";
×
330
        case CameraServer::Result::Success:
×
331
            return str << "Success";
×
332
        case CameraServer::Result::InProgress:
×
333
            return str << "In Progress";
×
334
        case CameraServer::Result::Busy:
×
335
            return str << "Busy";
×
336
        case CameraServer::Result::Denied:
×
337
            return str << "Denied";
×
338
        case CameraServer::Result::Error:
×
339
            return str << "Error";
×
340
        case CameraServer::Result::Timeout:
×
341
            return str << "Timeout";
×
342
        case CameraServer::Result::WrongArgument:
×
343
            return str << "Wrong Argument";
×
344
        case CameraServer::Result::NoSystem:
×
345
            return str << "No System";
×
346
        default:
×
347
            return str << "Unknown";
×
348
    }
349
}
350

351
std::ostream&
NEW
352
operator<<(std::ostream& str, CameraServer::StorageInformation::StorageStatus const& storage_status)
×
353
{
NEW
354
    switch (storage_status) {
×
NEW
355
        case CameraServer::StorageInformation::StorageStatus::NotAvailable:
×
NEW
356
            return str << "Not Available";
×
NEW
357
        case CameraServer::StorageInformation::StorageStatus::Unformatted:
×
NEW
358
            return str << "Unformatted";
×
NEW
359
        case CameraServer::StorageInformation::StorageStatus::Formatted:
×
NEW
360
            return str << "Formatted";
×
NEW
361
        case CameraServer::StorageInformation::StorageStatus::NotSupported:
×
NEW
362
            return str << "Not Supported";
×
NEW
363
        default:
×
NEW
364
            return str << "Unknown";
×
365
    }
366
}
367

368
std::ostream&
NEW
369
operator<<(std::ostream& str, CameraServer::StorageInformation::StorageType const& storage_type)
×
370
{
NEW
371
    switch (storage_type) {
×
NEW
372
        case CameraServer::StorageInformation::StorageType::Unknown:
×
373
            return str << "Unknown";
×
NEW
374
        case CameraServer::StorageInformation::StorageType::UsbStick:
×
NEW
375
            return str << "Usb Stick";
×
NEW
376
        case CameraServer::StorageInformation::StorageType::Sd:
×
NEW
377
            return str << "Sd";
×
NEW
378
        case CameraServer::StorageInformation::StorageType::Microsd:
×
NEW
379
            return str << "Microsd";
×
NEW
380
        case CameraServer::StorageInformation::StorageType::Hd:
×
NEW
381
            return str << "Hd";
×
NEW
382
        case CameraServer::StorageInformation::StorageType::Other:
×
NEW
383
            return str << "Other";
×
NEW
384
        default:
×
NEW
385
            return str << "Unknown";
×
386
    }
387
}
NEW
388
bool operator==(
×
389
    const CameraServer::StorageInformation& lhs, const CameraServer::StorageInformation& rhs)
390
{
NEW
391
    return ((std::isnan(rhs.used_storage_mib) && std::isnan(lhs.used_storage_mib)) ||
×
NEW
392
            rhs.used_storage_mib == lhs.used_storage_mib) &&
×
NEW
393
           ((std::isnan(rhs.available_storage_mib) && std::isnan(lhs.available_storage_mib)) ||
×
NEW
394
            rhs.available_storage_mib == lhs.available_storage_mib) &&
×
NEW
395
           ((std::isnan(rhs.total_storage_mib) && std::isnan(lhs.total_storage_mib)) ||
×
NEW
396
            rhs.total_storage_mib == lhs.total_storage_mib) &&
×
NEW
397
           (rhs.storage_status == lhs.storage_status) && (rhs.storage_id == lhs.storage_id) &&
×
NEW
398
           (rhs.storage_type == lhs.storage_type) &&
×
NEW
399
           ((std::isnan(rhs.read_speed_mib_s) && std::isnan(lhs.read_speed_mib_s)) ||
×
NEW
400
            rhs.read_speed_mib_s == lhs.read_speed_mib_s) &&
×
NEW
401
           ((std::isnan(rhs.write_speed_mib_s) && std::isnan(lhs.write_speed_mib_s)) ||
×
NEW
402
            rhs.write_speed_mib_s == lhs.write_speed_mib_s);
×
403
}
404

405
std::ostream&
NEW
406
operator<<(std::ostream& str, CameraServer::StorageInformation const& storage_information)
×
407
{
NEW
408
    str << std::setprecision(15);
×
NEW
409
    str << "storage_information:" << '\n' << "{\n";
×
NEW
410
    str << "    used_storage_mib: " << storage_information.used_storage_mib << '\n';
×
NEW
411
    str << "    available_storage_mib: " << storage_information.available_storage_mib << '\n';
×
NEW
412
    str << "    total_storage_mib: " << storage_information.total_storage_mib << '\n';
×
NEW
413
    str << "    storage_status: " << storage_information.storage_status << '\n';
×
NEW
414
    str << "    storage_id: " << storage_information.storage_id << '\n';
×
NEW
415
    str << "    storage_type: " << storage_information.storage_type << '\n';
×
NEW
416
    str << "    read_speed_mib_s: " << storage_information.read_speed_mib_s << '\n';
×
NEW
417
    str << "    write_speed_mib_s: " << storage_information.write_speed_mib_s << '\n';
×
NEW
418
    str << '}';
×
NEW
419
    return str;
×
420
}
421

422
std::ostream&
NEW
423
operator<<(std::ostream& str, CameraServer::CaptureStatus::ImageStatus const& image_status)
×
424
{
NEW
425
    switch (image_status) {
×
NEW
426
        case CameraServer::CaptureStatus::ImageStatus::Idle:
×
NEW
427
            return str << "Idle";
×
NEW
428
        case CameraServer::CaptureStatus::ImageStatus::CaptureInProgress:
×
NEW
429
            return str << "Capture In Progress";
×
NEW
430
        case CameraServer::CaptureStatus::ImageStatus::IntervalIdle:
×
NEW
431
            return str << "Interval Idle";
×
NEW
432
        case CameraServer::CaptureStatus::ImageStatus::IntervalInProgress:
×
NEW
433
            return str << "Interval In Progress";
×
NEW
434
        default:
×
NEW
435
            return str << "Unknown";
×
436
    }
437
}
438

439
std::ostream&
NEW
440
operator<<(std::ostream& str, CameraServer::CaptureStatus::VideoStatus const& video_status)
×
441
{
NEW
442
    switch (video_status) {
×
NEW
443
        case CameraServer::CaptureStatus::VideoStatus::Idle:
×
NEW
444
            return str << "Idle";
×
NEW
445
        case CameraServer::CaptureStatus::VideoStatus::CaptureInProgress:
×
NEW
446
            return str << "Capture In Progress";
×
NEW
447
        default:
×
NEW
448
            return str << "Unknown";
×
449
    }
450
}
NEW
451
bool operator==(const CameraServer::CaptureStatus& lhs, const CameraServer::CaptureStatus& rhs)
×
452
{
NEW
453
    return ((std::isnan(rhs.image_interval_s) && std::isnan(lhs.image_interval_s)) ||
×
NEW
454
            rhs.image_interval_s == lhs.image_interval_s) &&
×
NEW
455
           ((std::isnan(rhs.recording_time_s) && std::isnan(lhs.recording_time_s)) ||
×
NEW
456
            rhs.recording_time_s == lhs.recording_time_s) &&
×
NEW
457
           ((std::isnan(rhs.available_capacity_mib) && std::isnan(lhs.available_capacity_mib)) ||
×
NEW
458
            rhs.available_capacity_mib == lhs.available_capacity_mib) &&
×
NEW
459
           (rhs.image_status == lhs.image_status) && (rhs.video_status == lhs.video_status) &&
×
NEW
460
           (rhs.image_count == lhs.image_count);
×
461
}
462

NEW
463
std::ostream& operator<<(std::ostream& str, CameraServer::CaptureStatus const& capture_status)
×
464
{
NEW
465
    str << std::setprecision(15);
×
NEW
466
    str << "capture_status:" << '\n' << "{\n";
×
NEW
467
    str << "    image_interval_s: " << capture_status.image_interval_s << '\n';
×
NEW
468
    str << "    recording_time_s: " << capture_status.recording_time_s << '\n';
×
NEW
469
    str << "    available_capacity_mib: " << capture_status.available_capacity_mib << '\n';
×
NEW
470
    str << "    image_status: " << capture_status.image_status << '\n';
×
NEW
471
    str << "    video_status: " << capture_status.video_status << '\n';
×
NEW
472
    str << "    image_count: " << capture_status.image_count << '\n';
×
NEW
473
    str << '}';
×
NEW
474
    return str;
×
475
}
476

NEW
477
std::ostream& operator<<(std::ostream& str, CameraServer::CameraFeedback const& camera_feedback)
×
478
{
NEW
479
    switch (camera_feedback) {
×
NEW
480
        case CameraServer::CameraFeedback::Unknown:
×
NEW
481
            return str << "Unknown";
×
NEW
482
        case CameraServer::CameraFeedback::Ok:
×
483
            return str << "Ok";
×
NEW
484
        case CameraServer::CameraFeedback::Busy:
×
485
            return str << "Busy";
×
NEW
486
        case CameraServer::CameraFeedback::Failed:
×
487
            return str << "Failed";
×
488
        default:
×
489
            return str << "Unknown";
×
490
    }
491
}
492

NEW
493
std::ostream& operator<<(std::ostream& str, CameraServer::Mode const& mode)
×
494
{
NEW
495
    switch (mode) {
×
NEW
496
        case CameraServer::Mode::Unknown:
×
NEW
497
            return str << "Unknown";
×
NEW
498
        case CameraServer::Mode::Photo:
×
NEW
499
            return str << "Photo";
×
NEW
500
        case CameraServer::Mode::Video:
×
NEW
501
            return str << "Video";
×
NEW
502
        default:
×
NEW
503
            return str << "Unknown";
×
504
    }
505
}
506

507
} // 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