GCC Code Coverage Report


Directory: Svc/ComSplitter/
File: ComSplitter.cpp
Date: 2026-09-03 21:16:52
Exec Total Coverage
Lines: 12 12 100.0%
Functions: 3 3 100.0%
Branches: 6 6 100.0%

Line Branch Exec Source
1 // ----------------------------------------------------------------------
2 //
3 // ComSplitter.cpp
4 //
5 // ----------------------------------------------------------------------
6
7 #include <Fw/FPrimeBasicTypes.hpp>
8 #include <Svc/ComSplitter/ComSplitter.hpp>
9
10 namespace Svc {
11
12 // ----------------------------------------------------------------------
13 // Construction, initialization, and destruction
14 // ----------------------------------------------------------------------
15
16 1 ComSplitter ::ComSplitter(const char* compName) : ComSplitterComponentBase(compName) {}
17
18 2 ComSplitter ::~ComSplitter() {}
19
20 // ----------------------------------------------------------------------
21 // Handler implementations
22 // ----------------------------------------------------------------------
23
24 3 void ComSplitter ::comIn_handler(FwIndexType portNum, Fw::ComBuffer& data, U32 context) {
25 3 FW_ASSERT(portNum == 0);
26
27 3 FwIndexType numPorts = getNum_comOut_OutputPorts();
28 3 FW_ASSERT(numPorts > 0);
29
30
2/2
✓ Branch 0 taken 15 times.
✓ Branch 1 taken 3 times.
18 for (FwIndexType i = 0; i < numPorts; i++) {
31
2/2
✓ Branch 5 taken 9 times.
✓ Branch 6 taken 6 times.
15 if (isConnected_comOut_OutputPort(i)) {
32 // Need to make a copy because we are passing by reference!:
33
1/1
✓ Branch 3 taken 9 times.
9 Fw::ComBuffer dataToSend = data;
34
1/1
✓ Branch 5 taken 9 times.
9 comOut_out(i, dataToSend, 0);
35 9 }
36 }
37 3 }
38
39 } // namespace Svc
40