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

OpenLightingProject / ola / 11783254300

11 Nov 2024 05:23PM UTC coverage: 45.767% (+0.09%) from 45.677%
11783254300

push

github

web-flow
Merge pull request #1978 from DMXControl/add_nodle_r4s

Add DMXControl Projects e.V. Nodle R4S

7798 of 17938 branches covered (43.47%)

0 of 1 new or added line in 1 file covered. (0.0%)

721 existing lines in 11 files now uncovered.

22344 of 48821 relevant lines covered (45.77%)

64.39 hits per line

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

85.71
/common/rdm/DescriptorConsistencyChecker.cpp
1
/*
2
 * This library is free software; you can redistribute it and/or
3
 * modify it under the terms of the GNU Lesser General Public
4
 * License as published by the Free Software Foundation; either
5
 * version 2.1 of the License, or (at your option) any later version.
6
 *
7
 * This library is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10
 * Lesser General Public License for more details.
11
 *
12
 * You should have received a copy of the GNU Lesser General Public
13
 * License along with this library; if not, write to the Free Software
14
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15
 *
16
 * DescriptorConsistencyChecker.cpp
17
 * Verify that we can determine the layout of a Descriptor.
18
 * Copyright (C) 2011 Simon Newton
19
 */
20

21
#include "common/rdm/DescriptorConsistencyChecker.h"
22

23
namespace ola {
24
namespace rdm {
25

26

27
bool DescriptorConsistencyChecker::CheckConsistency(
2,849✔
28
    const ola::messaging::Descriptor *descriptor) {
29
  m_variable_sized_field_count = 0;
2,849✔
30
  descriptor->Accept(this);
2,849✔
31
  return m_variable_sized_field_count <= 1;
2,849✔
32
}
33

34
void DescriptorConsistencyChecker::Visit(
314✔
35
    const ola::messaging::BoolFieldDescriptor*) {
36
}
314✔
37

38

39
void DescriptorConsistencyChecker::Visit(
9✔
40
    const ola::messaging::IPV4FieldDescriptor*) {
41
}
9✔
42

43

44
void DescriptorConsistencyChecker::Visit(
2✔
45
    const ola::messaging::IPV6FieldDescriptor*) {
46
}
2✔
47

48

49
void DescriptorConsistencyChecker::Visit(
1✔
50
    const ola::messaging::MACFieldDescriptor*) {
51
}
1✔
52

53

54
void DescriptorConsistencyChecker::Visit(
4✔
55
    const ola::messaging::UIDFieldDescriptor*) {
56
}
4✔
57

58

59
void DescriptorConsistencyChecker::Visit(
164✔
60
  const ola::messaging::StringFieldDescriptor *descriptor) {
61
    if (!descriptor->FixedSize()) {
164✔
62
      m_variable_sized_field_count++;
158✔
63
    }
64
}
164✔
65

66

67
void DescriptorConsistencyChecker::Visit(
1,205✔
68
    const ola::messaging::UInt8FieldDescriptor*) {
69
}
1,205✔
70

71

72
void DescriptorConsistencyChecker::Visit(
679✔
73
    const ola::messaging::UInt16FieldDescriptor*) {
74
}
679✔
75

76

77
void DescriptorConsistencyChecker::Visit(
135✔
78
    const ola::messaging::UInt32FieldDescriptor*) {
79
}
135✔
80

81

82
void DescriptorConsistencyChecker::Visit(
×
83
    const ola::messaging::UInt64FieldDescriptor*) {
84
}
×
85

86

UNCOV
87
void DescriptorConsistencyChecker::Visit(
×
88
    const ola::messaging::Int8FieldDescriptor*) {
UNCOV
89
}
×
90

91

92
void DescriptorConsistencyChecker::Visit(
56✔
93
    const ola::messaging::Int16FieldDescriptor*) {
94
}
56✔
95

96

97
void DescriptorConsistencyChecker::Visit(
4✔
98
    const ola::messaging::Int32FieldDescriptor*) {
99
}
4✔
100

101

UNCOV
102
void DescriptorConsistencyChecker::Visit(
×
103
    const ola::messaging::Int64FieldDescriptor*) {
UNCOV
104
}
×
105

106

107
void DescriptorConsistencyChecker::Visit(
99✔
108
    const ola::messaging::FieldDescriptorGroup *descriptor) {
109
  if (!descriptor->FixedSize())
99✔
110
    m_variable_sized_field_count++;
92✔
111
  // if the block size isn't fixed this descriptor isn't consistent.
112
  if (!descriptor->FixedBlockSize())
99✔
113
    m_variable_sized_field_count++;
2✔
114
}
99✔
115

116

117
void DescriptorConsistencyChecker::PostVisit(
99✔
118
    const ola::messaging::FieldDescriptorGroup*) {
119
}
99✔
120
}  // namespace rdm
121
}  // namespace ola
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