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

wirenboard / wb-mqtt-iec104 / 38

31 Jul 2026 10:43AM UTC coverage: 52.549% (-0.2%) from 52.705%
38

push

github

web-flow
Use exported vars instead of MAKEFLAGS for coverage options (#30)

236 of 389 branches covered (60.67%)

402 of 765 relevant lines covered (52.55%)

3.58 hits per line

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

0.0
/src/lib60870_common.cpp
1
/*
2
 *  Copyright 2016 MZ Automation GmbH
3
 *
4
 *  This file is part of lib60870-C
5
 *
6
 *  lib60870-C is free software: you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation, either version 3 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  lib60870-C is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with lib60870-C.  If not, see <http://www.gnu.org/licenses/>.
18
 *
19
 *  See COPYING file for the complete license text.
20
 */
21

22
#include "iec60870_common.h"
23
#include "log.h"
24

25
#include <stdarg.h>
26
#include <stdio.h>
27
#include <string.h>
28

29
extern "C" {
30
void lib60870_debug_print(const char* format, ...)
×
31
{
32
    if (Debug.IsEnabled()) {
×
33
        char buf[128] = {};
×
34
        va_list ap;
35
        va_start(ap, format);
×
36
        vsnprintf(buf, sizeof(buf), format, ap);
×
37
        va_end(ap);
×
38
        auto l = strlen(buf);
×
39
        if (l > 0) {
×
40
            buf[l - 1] = 0;
×
41
        }
42
        Debug.Log() << "[IEC] " << buf;
×
43
    }
44
}
×
45

46
void Lib60870_enableDebugOutput(bool)
×
47
{}
×
48

49
Lib60870VersionInfo Lib60870_getLibraryVersionInfo()
×
50
{
51
    Lib60870VersionInfo versionInfo;
52

53
    versionInfo.major = LIB60870_VERSION_MAJOR;
×
54
    versionInfo.minor = LIB60870_VERSION_MINOR;
×
55
    versionInfo.patch = LIB60870_VERSION_PATCH;
×
56

57
    return versionInfo;
×
58
}
59
}
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