GCC Code Coverage Report


Directory: Svc/PolyDb/
File: PolyDb.cpp
Date: 2026-09-03 21:18:17
Exec Total Coverage
Lines: 17 17 100.0%
Functions: 4 4 100.0%
Branches: 15 28 53.6%

Line Branch Exec Source
1 /*
2 * PolyDbImpl.cpp
3 *
4 * Created on: May 13, 2014
5 * Author: Timothy Canham
6 */
7
8 #include <Fw/FPrimeBasicTypes.hpp>
9 #include <Fw/Types/Assert.hpp>
10 #include <Svc/PolyDb/PolyDb.hpp>
11
12 namespace Svc {
13
3/9
✓ Branch 10 taken 9 times.
✓ Branch 13 taken 9 times.
✓ Branch 14 taken 1 times.
✗ Branch 16 not taken.
✗ Branch 17 not taken.
✗ Branch 19 not taken.
✗ Branch 20 not taken.
✗ Branch 26 not taken.
✗ Branch 27 not taken.
10 PolyDb::PolyDb(const char* const name) : PolyDbComponentBase(name) {
14 // initialize all entries to stale
15
2/2
✓ Branch 0 taken 9 times.
✓ Branch 1 taken 1 times.
10 for (FwIndexType entry = 0; entry < Svc::PolyDbCfg::PolyDbEntry::NUM_CONSTANTS; entry++) {
16
1/1
✓ Branch 6 taken 9 times.
9 this->m_db[entry].status = MeasurementStatus::STALE;
17 }
18 1 }
19
20 27 void PolyDb ::getValue_handler(FwIndexType portNum,
21 const Svc::PolyDbCfg::PolyDbEntry& entry,
22 Svc::MeasurementStatus& status,
23 Fw::Time& time,
24 Fw::PolyType& val) {
25 27 FW_ASSERT(entry.isValid(), entry.e);
26
1/2
✗ Branch 3 not taken.
✓ Branch 4 taken 27 times.
27 status = this->m_db[entry.e].status;
27
1/2
✗ Branch 3 not taken.
✓ Branch 4 taken 27 times.
27 time = this->m_db[entry.e].time;
28
1/2
✗ Branch 3 not taken.
✓ Branch 4 taken 27 times.
27 val = this->m_db[entry.e].val;
29 27 }
30
31 27 void PolyDb ::setValue_handler(FwIndexType portNum,
32 const Svc::PolyDbCfg::PolyDbEntry& entry,
33 Svc::MeasurementStatus& status,
34 Fw::Time& time,
35 Fw::PolyType& val) {
36 27 FW_ASSERT(entry.isValid(), entry.e);
37
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 27 times.
27 this->m_db[entry.e].status = status;
38
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 27 times.
27 this->m_db[entry.e].time = time;
39
1/2
✗ Branch 4 not taken.
✓ Branch 5 taken 27 times.
27 this->m_db[entry.e].val = val;
40 27 }
41
42
3/4
✓ Branch 4 taken 1 times.
✗ Branch 5 not taken.
✓ Branch 11 taken 9 times.
✓ Branch 12 taken 1 times.
20 PolyDb::~PolyDb() {}
43
44 } // namespace Svc
45