F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
ComSplitterComponentAc.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title ComSplitterComponentAc.hpp
3// \author Generated by fpp-to-cpp
4// \brief hpp file for ComSplitter component base class
5// ======================================================================
6
7#ifndef Svc_ComSplitterComponentAc_HPP
8#define Svc_ComSplitterComponentAc_HPP
9
10#include "FpConfig.hpp"
11#include "Fw/Com/ComPortAc.hpp"
15
16namespace Svc {
17
24 {
25
26 // ----------------------------------------------------------------------
27 // Friend classes
28 // ----------------------------------------------------------------------
29
32
33 PROTECTED:
34
35 // ----------------------------------------------------------------------
36 // Constants
37 // ----------------------------------------------------------------------
38
40 enum {
42 };
43
45 enum {
47 };
48
49 public:
50
51 // ----------------------------------------------------------------------
52 // Component initialization
53 // ----------------------------------------------------------------------
54
56 void init(
57 FwEnumStoreType instance = 0
58 );
59
60 public:
61
62 // ----------------------------------------------------------------------
63 // Getters for typed input ports
64 // ----------------------------------------------------------------------
65
70 FwIndexType portNum
71 );
72
73 public:
74
75 // ----------------------------------------------------------------------
76 // Connect typed input ports to typed output ports
77 // ----------------------------------------------------------------------
78
81 FwIndexType portNum,
82 Fw::InputComPort* port
83 );
84
85#if FW_PORT_SERIALIZATION
86
87 public:
88
89 // ----------------------------------------------------------------------
90 // Connect serial input ports to typed output ports
91 // ----------------------------------------------------------------------
92
95 FwIndexType portNum,
96 Fw::InputSerializePort* port
97 );
98
99#endif
100
101 PROTECTED:
102
103 // ----------------------------------------------------------------------
104 // Component construction and destruction
105 // ----------------------------------------------------------------------
106
109 const char* compName = ""
110 );
111
114
115 PROTECTED:
116
117 // ----------------------------------------------------------------------
118 // Getters for numbers of typed input ports
119 // ----------------------------------------------------------------------
120
125
126 PROTECTED:
127
128 // ----------------------------------------------------------------------
129 // Getters for numbers of typed output ports
130 // ----------------------------------------------------------------------
131
136
137 PROTECTED:
138
139 // ----------------------------------------------------------------------
140 // Connection status queries for typed output ports
141 // ----------------------------------------------------------------------
142
147 FwIndexType portNum
148 );
149
150 PROTECTED:
151
152 // ----------------------------------------------------------------------
153 // Handlers to implement for typed input ports
154 // ----------------------------------------------------------------------
155
157 virtual void comIn_handler(
158 FwIndexType portNum,
159 Fw::ComBuffer& data,
160 U32 context
161 ) = 0;
162
163 PROTECTED:
164
165 // ----------------------------------------------------------------------
166 // Port handler base-class functions for typed input ports
167 //
168 // Call these functions directly to bypass the corresponding ports
169 // ----------------------------------------------------------------------
170
173 FwIndexType portNum,
174 Fw::ComBuffer& data,
175 U32 context
176 );
177
178 PROTECTED:
179
180 // ----------------------------------------------------------------------
181 // Invocation functions for typed output ports
182 // ----------------------------------------------------------------------
183
185 void comOut_out(
186 FwIndexType portNum,
187 Fw::ComBuffer& data,
188 U32 context
189 );
190
191 PRIVATE:
192
193 // ----------------------------------------------------------------------
194 // Calls for messages received on typed input ports
195 // ----------------------------------------------------------------------
196
198 static void m_p_comIn_in(
199 Fw::PassiveComponentBase* callComp,
200 FwIndexType portNum,
201 Fw::ComBuffer& data,
202 U32 context
203 );
204
205 PRIVATE:
206
207 // ----------------------------------------------------------------------
208 // Typed input ports
209 // ----------------------------------------------------------------------
210
212 Fw::InputComPort m_comIn_InputPort[NUM_COMIN_INPUT_PORTS];
213
214 PRIVATE:
215
216 // ----------------------------------------------------------------------
217 // Typed output ports
218 // ----------------------------------------------------------------------
219
221 Fw::OutputComPort m_comOut_OutputPort[NUM_COMOUT_OUTPUT_PORTS];
222
223 };
224
225}
226
227#endif
I32 FwEnumStoreType
Definition FpConfig.h:64
PlatformIndexType FwIndexType
Definition FpConfig.h:25
C++-compatible configuration header for fprime configuration.
void init()
Object initializer.
Definition ObjBase.cpp:27
Auto-generated base for ComSplitter component.
Fw::InputComPort * get_comIn_InputPort(FwIndexType portNum)
bool isConnected_comOut_OutputPort(FwIndexType portNum)
void set_comOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to comOut[portNum].
virtual ~ComSplitterComponentBase()
Destroy ComSplitterComponentBase object.
virtual void comIn_handler(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port comIn.
friend class ComSplitterComponentBaseFriend
Friend class for white-box testing.
void comOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port comOut.
void comIn_handlerBase(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port comIn.