F´ Flight Software - C/C++ Documentation devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 NATIVE_INT_TYPE instance = 0
58 );
59
60 public:
61
62 // ----------------------------------------------------------------------
63 // Getters for typed input ports
64 // ----------------------------------------------------------------------
65
70 NATIVE_INT_TYPE portNum
71 );
72
73 public:
74
75 // ----------------------------------------------------------------------
76 // Connect typed input ports to typed output ports
77 // ----------------------------------------------------------------------
78
81 NATIVE_INT_TYPE 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 NATIVE_INT_TYPE 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 NATIVE_INT_TYPE portNum
148 );
149
150 PROTECTED:
151
152 // ----------------------------------------------------------------------
153 // Handlers to implement for typed input ports
154 // ----------------------------------------------------------------------
155
157 virtual void comIn_handler(
158 NATIVE_INT_TYPE 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 NATIVE_INT_TYPE 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 NATIVE_INT_TYPE 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 NATIVE_INT_TYPE 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
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
C++-compatible configuration header for fprime configuration.
void init()
Object initializer.
Definition ObjBase.cpp:27
Auto-generated base for ComSplitter component.
bool isConnected_comOut_OutputPort(NATIVE_INT_TYPE portNum)
NATIVE_INT_TYPE getNum_comOut_OutputPorts() const
void comIn_handlerBase(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port comIn.
virtual void comIn_handler(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port comIn.
void set_comOut_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputComPort *port)
Connect port to comOut[portNum].
Fw::InputComPort * get_comIn_InputPort(NATIVE_INT_TYPE portNum)
void comOut_out(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)
Invoke output port comOut.
virtual ~ComSplitterComponentBase()
Destroy ComSplitterComponentBase object.
ComSplitterComponentBase(const char *compName="")
Construct ComSplitterComponentBase object.
friend class ComSplitterComponentBaseFriend
Friend class for white-box testing.
NATIVE_INT_TYPE getNum_comIn_InputPorts() const