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

mavlink / MAVSDK / 24110638161

08 Apr 2026 12:10AM UTC coverage: 50.459%. First build
24110638161

Pull #2855

github

web-flow
Merge a88a02493 into 9d13e3cca
Pull Request #2855: core: hide symbols by default, export only public API

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

19243 of 38136 relevant lines covered (50.46%)

668.58 hits per line

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

17.48
/src/mavsdk/plugins/param_server/param_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 https://github.com/mavlink/MAVSDK-Proto/blob/master/protos/param_server/param_server.proto)
4

5
#include <iomanip>
6

7
#include "param_server_impl.h"
8
#include "plugins/param_server/param_server.h"
9

10
namespace mavsdk {
11

12
using IntParam = ParamServer::IntParam;
13
using FloatParam = ParamServer::FloatParam;
14
using CustomParam = ParamServer::CustomParam;
15
using AllParams = ParamServer::AllParams;
16

17
ParamServer::ParamServer(std::shared_ptr<ServerComponent> server_component) :
10✔
18
    ServerPluginBase(),
19
    _impl{std::make_unique<ParamServerImpl>(server_component)}
10✔
20
{}
10✔
21

22
ParamServer::~ParamServer() {}
10✔
23

24
ParamServer::Result ParamServer::set_protocol(bool extended_protocol) const
×
25
{
26
    return _impl->set_protocol(extended_protocol);
×
27
}
28

29
std::pair<ParamServer::Result, int32_t> ParamServer::retrieve_param_int(std::string name) const
2✔
30
{
31
    return _impl->retrieve_param_int(name);
2✔
32
}
33

34
ParamServer::Result ParamServer::provide_param_int(std::string name, int32_t value) const
53✔
35
{
36
    return _impl->provide_param_int(name, value);
53✔
37
}
38

39
std::pair<ParamServer::Result, float> ParamServer::retrieve_param_float(std::string name) const
2✔
40
{
41
    return _impl->retrieve_param_float(name);
2✔
42
}
43

44
ParamServer::Result ParamServer::provide_param_float(std::string name, float value) const
11✔
45
{
46
    return _impl->provide_param_float(name, value);
11✔
47
}
48

49
std::pair<ParamServer::Result, std::string>
50
ParamServer::retrieve_param_custom(std::string name) const
2✔
51
{
52
    return _impl->retrieve_param_custom(name);
2✔
53
}
54

55
ParamServer::Result ParamServer::provide_param_custom(std::string name, std::string value) const
8✔
56
{
57
    return _impl->provide_param_custom(name, value);
8✔
58
}
59

60
ParamServer::AllParams ParamServer::retrieve_all_params() const
2✔
61
{
62
    return _impl->retrieve_all_params();
2✔
63
}
64

65
ParamServer::ChangedParamIntHandle
66
ParamServer::subscribe_changed_param_int(const ChangedParamIntCallback& callback)
×
67
{
68
    return _impl->subscribe_changed_param_int(callback);
×
69
}
70

71
void ParamServer::unsubscribe_changed_param_int(ChangedParamIntHandle handle)
×
72
{
73
    _impl->unsubscribe_changed_param_int(handle);
×
74
}
×
75

76
ParamServer::ChangedParamFloatHandle
77
ParamServer::subscribe_changed_param_float(const ChangedParamFloatCallback& callback)
×
78
{
79
    return _impl->subscribe_changed_param_float(callback);
×
80
}
81

82
void ParamServer::unsubscribe_changed_param_float(ChangedParamFloatHandle handle)
×
83
{
84
    _impl->unsubscribe_changed_param_float(handle);
×
85
}
×
86

87
ParamServer::ChangedParamCustomHandle
88
ParamServer::subscribe_changed_param_custom(const ChangedParamCustomCallback& callback)
×
89
{
90
    return _impl->subscribe_changed_param_custom(callback);
×
91
}
92

93
void ParamServer::unsubscribe_changed_param_custom(ChangedParamCustomHandle handle)
×
94
{
95
    _impl->unsubscribe_changed_param_custom(handle);
×
96
}
×
97

NEW
98
MAVSDK_PUBLIC bool operator==(const ParamServer::IntParam& lhs, const ParamServer::IntParam& rhs)
×
99
{
100
    return (rhs.name == lhs.name) && (rhs.value == lhs.value);
×
101
}
102

NEW
103
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, ParamServer::IntParam const& int_param)
×
104
{
105
    str << std::setprecision(15);
×
106
    str << "int_param:" << '\n' << "{\n";
×
107
    str << "    name: " << int_param.name << '\n';
×
108
    str << "    value: " << int_param.value << '\n';
×
109
    str << '}';
×
110
    return str;
×
111
}
112

113
MAVSDK_PUBLIC bool
NEW
114
operator==(const ParamServer::FloatParam& lhs, const ParamServer::FloatParam& rhs)
×
115
{
116
    return (rhs.name == lhs.name) &&
×
117
           ((std::isnan(rhs.value) && std::isnan(lhs.value)) || rhs.value == lhs.value);
×
118
}
119

120
MAVSDK_PUBLIC std::ostream&
NEW
121
operator<<(std::ostream& str, ParamServer::FloatParam const& float_param)
×
122
{
123
    str << std::setprecision(15);
×
124
    str << "float_param:" << '\n' << "{\n";
×
125
    str << "    name: " << float_param.name << '\n';
×
126
    str << "    value: " << float_param.value << '\n';
×
127
    str << '}';
×
128
    return str;
×
129
}
130

131
MAVSDK_PUBLIC bool
NEW
132
operator==(const ParamServer::CustomParam& lhs, const ParamServer::CustomParam& rhs)
×
133
{
134
    return (rhs.name == lhs.name) && (rhs.value == lhs.value);
×
135
}
136

137
MAVSDK_PUBLIC std::ostream&
NEW
138
operator<<(std::ostream& str, ParamServer::CustomParam const& custom_param)
×
139
{
140
    str << std::setprecision(15);
×
141
    str << "custom_param:" << '\n' << "{\n";
×
142
    str << "    name: " << custom_param.name << '\n';
×
143
    str << "    value: " << custom_param.value << '\n';
×
144
    str << '}';
×
145
    return str;
×
146
}
147

NEW
148
MAVSDK_PUBLIC bool operator==(const ParamServer::AllParams& lhs, const ParamServer::AllParams& rhs)
×
149
{
150
    return (rhs.int_params == lhs.int_params) && (rhs.float_params == lhs.float_params) &&
×
151
           (rhs.custom_params == lhs.custom_params);
×
152
}
153

NEW
154
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, ParamServer::AllParams const& all_params)
×
155
{
156
    str << std::setprecision(15);
×
157
    str << "all_params:" << '\n' << "{\n";
×
158
    str << "    int_params: [";
×
159
    for (auto it = all_params.int_params.begin(); it != all_params.int_params.end(); ++it) {
×
160
        str << *it;
×
161
        str << (it + 1 != all_params.int_params.end() ? ", " : "]\n");
×
162
    }
163
    str << "    float_params: [";
×
164
    for (auto it = all_params.float_params.begin(); it != all_params.float_params.end(); ++it) {
×
165
        str << *it;
×
166
        str << (it + 1 != all_params.float_params.end() ? ", " : "]\n");
×
167
    }
168
    str << "    custom_params: [";
×
169
    for (auto it = all_params.custom_params.begin(); it != all_params.custom_params.end(); ++it) {
×
170
        str << *it;
×
171
        str << (it + 1 != all_params.custom_params.end() ? ", " : "]\n");
×
172
    }
173
    str << '}';
×
174
    return str;
×
175
}
176

NEW
177
MAVSDK_PUBLIC std::ostream& operator<<(std::ostream& str, ParamServer::Result const& result)
×
178
{
179
    switch (result) {
×
180
        case ParamServer::Result::Unknown:
×
181
            return str << "Unknown";
×
182
        case ParamServer::Result::Success:
×
183
            return str << "Success";
×
184
        case ParamServer::Result::NotFound:
×
185
            return str << "Not Found";
×
186
        case ParamServer::Result::WrongType:
×
187
            return str << "Wrong Type";
×
188
        case ParamServer::Result::ParamNameTooLong:
×
189
            return str << "Param Name Too Long";
×
190
        case ParamServer::Result::NoSystem:
×
191
            return str << "No System";
×
192
        case ParamServer::Result::ParamValueTooLong:
×
193
            return str << "Param Value Too Long";
×
194
        case ParamServer::Result::ParamProvidedTooLate:
×
195
            return str << "Param Provided Too Late";
×
196
        default:
×
197
            return str << "Unknown";
×
198
    }
199
}
200

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