INSTINCT Code Coverage Report


Directory: src/
File: Nodes/Utility/Terminator.cpp
Date: 2025-02-07 16:54:41
Exec Total Coverage
Lines: 14 16 87.5%
Functions: 5 6 83.3%
Branches: 8 16 50.0%

Line Branch Exec Source
1 // This file is part of INSTINCT, the INS Toolkit for Integrated
2 // Navigation Concepts and Training by the Institute of Navigation of
3 // the University of Stuttgart, Germany.
4 //
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this
7 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9 #include "Terminator.hpp"
10
11 #include "internal/NodeManager.hpp"
12 namespace nm = NAV::NodeManager;
13 #include "internal/FlowManager.hpp"
14
15 // ---------------------------------------------------------- Member functions -------------------------------------------------------------
16
17
2/4
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 161 times.
✗ Branch 5 not taken.
161 NAV::Terminator::Terminator() : Node(typeStatic())
18 {
19 LOG_TRACE("{}: called", name);
20 161 _hasConfig = false;
21 161 kind = Kind::Simple;
22
23
4/8
✓ Branch 1 taken 161 times.
✗ Branch 2 not taken.
✓ Branch 5 taken 161 times.
✗ Branch 6 not taken.
✓ Branch 8 taken 161 times.
✓ Branch 9 taken 161 times.
✗ Branch 12 not taken.
✗ Branch 13 not taken.
483 nm::CreateInputPin(this, "", Pin::Type::Flow, { NodeData::type() }, &Terminator::receiveObs);
24 322 }
25
26 416 NAV::Terminator::~Terminator()
27 {
28 LOG_TRACE("{}: called", nameId());
29 416 }
30
31 273 std::string NAV::Terminator::typeStatic()
32 {
33
1/2
✓ Branch 1 taken 273 times.
✗ Branch 2 not taken.
546 return "Terminator";
34 }
35
36 std::string NAV::Terminator::type() const
37 {
38 return typeStatic();
39 }
40
41 112 std::string NAV::Terminator::category()
42 {
43
1/2
✓ Branch 1 taken 112 times.
✗ Branch 2 not taken.
224 return "Utility";
44 }
45
46 6332 void NAV::Terminator::receiveObs(NAV::InputPin::NodeDataQueue& queue, size_t /* pinIdx */) // NOLINT(readability-convert-member-functions-to-static)
47 {
48 6332 queue.pop_front();
49 6333 }
50