GCC Code Coverage Report


Directory: ./
File: Svc/ComSplitter/ComSplitter.cpp
Date: 2026-09-03 22:12:29
Exec Total Coverage
Lines: 0 12 0.0%
Functions: 0 3 0.0%
Branches: 0 6 0.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 ComSplitter ::ComSplitter(const char* compName) : ComSplitterComponentBase(compName) {}
17
18 ComSplitter ::~ComSplitter() {}
19
20 // ----------------------------------------------------------------------
21 // Handler implementations
22 // ----------------------------------------------------------------------
23
24 void ComSplitter ::comIn_handler(FwIndexType portNum, Fw::ComBuffer& data, U32 context) {
25 FW_ASSERT(portNum == 0);
26
27 FwIndexType numPorts = getNum_comOut_OutputPorts();
28 FW_ASSERT(numPorts > 0);
29
30 for (FwIndexType i = 0; i < numPorts; i++) {
31 if (isConnected_comOut_OutputPort(i)) {
32 // Need to make a copy because we are passing by reference!:
33 Fw::ComBuffer dataToSend = data;
34 comOut_out(i, dataToSend, 0);
35 }
36 }
37 }
38
39 } // namespace Svc
40