| 163 | } |
| 164 | |
| 165 | reliability_type_e eventgroupinfo::get_provider_reliability() const { |
| 166 | auto reliability = reliability_type_e::RT_UNKNOWN; |
| 167 | std::scoped_lock lock{events_mutex_}; |
| 168 | for (const auto& event : events_) { |
| 169 | if (!event->is_provided()) { |
| 170 | continue; |
| 171 | } |
| 172 | switch (event->get_reliability()) { |
| 173 | case reliability_type_e::RT_BOTH: |
| 174 | reliability = reliability_type_e::RT_BOTH; |
| 175 | break; |
| 176 | case reliability_type_e::RT_UNRELIABLE: |
| 177 | reliability = (reliability == reliability_type_e::RT_RELIABLE || reliability == reliability_type_e::RT_BOTH) |
| 178 | ? reliability_type_e::RT_BOTH |
| 179 | : reliability_type_e::RT_UNRELIABLE; |
| 180 | break; |
| 181 | case reliability_type_e::RT_RELIABLE: |
| 182 | reliability = (reliability == reliability_type_e::RT_UNRELIABLE || reliability == reliability_type_e::RT_BOTH) |
| 183 | ? reliability_type_e::RT_BOTH |
| 184 | : reliability_type_e::RT_RELIABLE; |
| 185 | break; |
| 186 | case reliability_type_e::RT_UNKNOWN: |
| 187 | break; |
| 188 | } |
| 189 | } |
| 190 | return reliability; |
| 191 | } |
| 192 | |
| 193 | uint32_t eventgroupinfo::get_unreliable_target_count() const { |
| 194 | uint32_t its_count(0); |
no test coverage detected