F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
ComSplitter.cpp
Go to the documentation of this file.
1
// ----------------------------------------------------------------------
2
//
3
// ComSplitter.cpp
4
//
5
// ----------------------------------------------------------------------
6
7
#include <
Svc/ComSplitter/ComSplitter.hpp
>
8
#include <
FpConfig.hpp
>
9
10
namespace
Svc
{
11
12
// ----------------------------------------------------------------------
13
// Construction, initialization, and destruction
14
// ----------------------------------------------------------------------
15
16
ComSplitter ::
17
ComSplitter(
const
char
* compName) :
18
ComSplitterComponentBase
(compName)
19
{
20
21
}
22
23
ComSplitter ::
24
~ComSplitter()
25
{
26
27
}
28
29
// ----------------------------------------------------------------------
30
// Handler implementations
31
// ----------------------------------------------------------------------
32
33
void
ComSplitter ::
34
comIn_handler(
35
NATIVE_INT_TYPE
portNum,
36
Fw::ComBuffer
&data,
37
U32 context
38
)
39
{
40
FW_ASSERT
(portNum == 0);
41
42
NATIVE_INT_TYPE
numPorts = getNum_comOut_OutputPorts();
43
FW_ASSERT
(numPorts > 0);
44
45
for
(
NATIVE_INT_TYPE
i = 0; i < numPorts; i++) {
46
if
( isConnected_comOut_OutputPort(i) ) {
47
// Need to make a copy because we are passing by reference!:
48
Fw::ComBuffer
dataToSend = data;
49
comOut_out(i, dataToSend, 0);
50
}
51
}
52
}
53
54
}
FW_ASSERT
#define FW_ASSERT(...)
Definition
Assert.hpp:14
NATIVE_INT_TYPE
PlatformIntType NATIVE_INT_TYPE
Definition
BasicTypes.h:55
ComSplitter.hpp
FpConfig.hpp
C++-compatible configuration header for fprime configuration.
Fw::ComBuffer
Definition
ComBuffer.hpp:20
Svc::ComSplitterComponentBase
Auto-generated base for ComSplitter component.
Definition
ComSplitterComponentAc.hpp:24
Svc
Definition
ActiveRateGroupCfg.hpp:18
Svc
ComSplitter
ComSplitter.cpp
Generated by
1.9.8