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

wirenboard / wb-mqtt-serial / 689

26 Aug 2025 01:28PM UTC coverage: 73.031% (-0.08%) from 73.114%
689

push

github

web-flow
Add protocol parameter to device/Probe RPC (#988)

  * Add protocol to Modbus TCP port information in ports/Load RPC
  * Add protocol parameter to device/Probe RPC
  * Set TCP_NODELAY for TCP ports
  * Handle TCP port closing by remote

6605 of 9406 branches covered (70.22%)

28 of 59 new or added lines in 11 files covered. (47.46%)

68 existing lines in 3 files now uncovered.

12554 of 17190 relevant lines covered (73.03%)

372.2 hits per line

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

65.22
/src/rpc/rpc_config.cpp
1
#include "rpc_config.h"
2
#include <algorithm>
3

4
void TRPCConfig::AddSerialPort(const TSerialPortSettings& settings)
17✔
5
{
6
    Json::Value item;
34✔
7
    item["path"] = settings.Device;
17✔
8
    item["baud_rate"] = settings.BaudRate;
17✔
9
    item["data_bits"] = settings.DataBits;
17✔
10
    item["parity"] = std::string(1, settings.Parity);
17✔
11
    item["stop_bits"] = settings.StopBits;
17✔
12
    PortConfigs.append(std::move(item));
17✔
13
}
17✔
14

15
void TRPCConfig::AddTCPPort(const TTcpPortSettings& settings)
4✔
16
{
17
    Json::Value item;
8✔
18
    item["address"] = settings.Address;
4✔
19
    item["port"] = settings.Port;
4✔
20
    PortConfigs.append(std::move(item));
4✔
21
}
4✔
22

NEW
23
void TRPCConfig::AddModbusTCPPort(const TTcpPortSettings& settings)
×
24
{
NEW
25
    Json::Value item;
×
NEW
26
    item["address"] = settings.Address;
×
NEW
27
    item["port"] = settings.Port;
×
NEW
28
    item["mode"] = "modbus-tcp";
×
NEW
29
    PortConfigs.append(std::move(item));
×
30
}
31

UNCOV
32
Json::Value TRPCConfig::GetPortConfigs() const
×
33
{
34
    return PortConfigs;
×
35
}
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