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

wirenboard / wb-mqtt-serial / 967

05 Oct 2026 09:41AM UTC coverage: 85.672% (+2.4%) from 83.268%
967

push

github

web-flow
Add config/Save RPC (#1273)

The RPC validates a configuration, writes it to the configuration file and
restarts the polling in-process. Port clients are stopped first, requests
arriving meanwhile get config-busy and queued ones get request-cancelled.

12445 of 14263 branches covered (87.25%)

1432 of 1623 new or added lines in 41 files covered. (88.23%)

8 existing lines in 4 files now uncovered.

21065 of 24588 relevant lines covered (85.67%)

1528.89 hits per line

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

73.68
/src/device_parameters_cache.cpp
1
#include "device_parameters_cache.h"
2

3
std::string TDeviceParametersCache::GetId(const TPort& port, const std::string& slaveId) const
56 ✔
4
{
5
    return port.GetDescription(false) + ":" + slaveId;
56 ✔
6
}
7

8
void TDeviceParametersCache::Add(const std::string& id, const Json::Value& value)
1 ✔
9
{
10
    std::unique_lock lock(Mutex);
1 ✔
11
    DeviceParameters[id] = value;
1 ✔
12
}
1 ✔
13

14
void TDeviceParametersCache::Remove(const std::string& id)
30 ✔
15
{
16
    std::unique_lock lock(Mutex);
30 ✔
17
    DeviceParameters.erase(id);
30 ✔
18
}
30 ✔
19

20
bool TDeviceParametersCache::Contains(const std::string& id) const
1 ✔
21
{
22
    std::unique_lock lock(Mutex);
1 ✔
23
    return DeviceParameters.find(id) != DeviceParameters.end();
2 ✔
24
}
1 ✔
25

NEW
26
const Json::Value& TDeviceParametersCache::Get(const std::string& id, const Json::Value& defaultValue) const
×
27
{
NEW
28
    std::unique_lock lock(Mutex);
×
NEW
29
    auto it = DeviceParameters.find(id);
×
NEW
30
    return it != DeviceParameters.end() ? it->second : defaultValue;
×
NEW
31
};
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc