F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
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 "Fw/Com/ComPortAc.hpp"
12 #include "Fw/FPrimeBasicTypes.hpp"
15 
16 namespace Svc {
17 
24  {
25 
26  // ----------------------------------------------------------------------
27  // Friend classes
28  // ----------------------------------------------------------------------
29 
33  friend class ComSplitterTesterBase;
34 
35  PROTECTED:
36 
37  // ----------------------------------------------------------------------
38  // Constants
39  // ----------------------------------------------------------------------
40 
42  enum {
44  };
45 
47  enum {
49  };
50 
51  public:
52 
53  // ----------------------------------------------------------------------
54  // Component initialization
55  // ----------------------------------------------------------------------
56 
58  void init(
59  FwEnumStoreType instance = 0
60  );
61 
62  public:
63 
64  // ----------------------------------------------------------------------
65  // Getters for typed input ports
66  // ----------------------------------------------------------------------
67 
72  FwIndexType portNum
73  );
74 
75  public:
76 
77  // ----------------------------------------------------------------------
78  // Connect typed input ports to typed output ports
79  // ----------------------------------------------------------------------
80 
83  FwIndexType portNum,
84  Fw::InputComPort* port
85  );
86 
87 #if FW_PORT_SERIALIZATION
88 
89  public:
90 
91  // ----------------------------------------------------------------------
92  // Connect serial input ports to typed output ports
93  // ----------------------------------------------------------------------
94 
97  FwIndexType portNum,
98  Fw::InputSerializePort* port
99  );
100 
101 #endif
102 
103  PROTECTED:
104 
105  // ----------------------------------------------------------------------
106  // Component construction and destruction
107  // ----------------------------------------------------------------------
108 
111  const char* compName = ""
112  );
113 
115  virtual ~ComSplitterComponentBase();
116 
117  PROTECTED:
118 
119  // ----------------------------------------------------------------------
120  // Getters for numbers of typed input ports
121  // ----------------------------------------------------------------------
122 
127 
128  PROTECTED:
129 
130  // ----------------------------------------------------------------------
131  // Getters for numbers of typed output ports
132  // ----------------------------------------------------------------------
133 
138 
139  PROTECTED:
140 
141  // ----------------------------------------------------------------------
142  // Connection status queries for typed output ports
143  // ----------------------------------------------------------------------
144 
149  FwIndexType portNum
150  );
151 
152  PROTECTED:
153 
154  // ----------------------------------------------------------------------
155  // Handlers to implement for typed input ports
156  // ----------------------------------------------------------------------
157 
159  virtual void comIn_handler(
160  FwIndexType portNum,
161  Fw::ComBuffer& data,
162  U32 context
163  ) = 0;
164 
165  PROTECTED:
166 
167  // ----------------------------------------------------------------------
168  // Port handler base-class functions for typed input ports
169  //
170  // Call these functions directly to bypass the corresponding ports
171  // ----------------------------------------------------------------------
172 
174  void comIn_handlerBase(
175  FwIndexType portNum,
176  Fw::ComBuffer& data,
177  U32 context
178  );
179 
180  PROTECTED:
181 
182  // ----------------------------------------------------------------------
183  // Invocation functions for typed output ports
184  // ----------------------------------------------------------------------
185 
187  void comOut_out(
188  FwIndexType portNum,
189  Fw::ComBuffer& data,
190  U32 context
191  );
192 
193  PRIVATE:
194 
195  // ----------------------------------------------------------------------
196  // Calls for messages received on typed input ports
197  // ----------------------------------------------------------------------
198 
200  static void m_p_comIn_in(
201  Fw::PassiveComponentBase* callComp,
202  FwIndexType portNum,
203  Fw::ComBuffer& data,
204  U32 context
205  );
206 
207  PRIVATE:
208 
209  // ----------------------------------------------------------------------
210  // Typed input ports
211  // ----------------------------------------------------------------------
212 
214  Fw::InputComPort m_comIn_InputPort[NUM_COMIN_INPUT_PORTS];
215 
216  PRIVATE:
217 
218  // ----------------------------------------------------------------------
219  // Typed output ports
220  // ----------------------------------------------------------------------
221 
223  Fw::OutputComPort m_comOut_OutputPort[NUM_COMOUT_OUTPUT_PORTS];
224 
225  };
226 
227 }
228 
229 #endif
bool isConnected_comOut_OutputPort(FwIndexType portNum)
Fw::InputComPort * get_comIn_InputPort(FwIndexType portNum)
I32 FwEnumStoreType
virtual ~ComSplitterComponentBase()
Destroy ComSplitterComponentBase object.
void init()
Object initializer.
Definition: ObjBase.cpp:26
void comIn_handlerBase(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port comIn.
friend class ComSplitterTesterBase
Friend class tester to support autocoded test harness.
Auto-generated base for ComSplitter component.
PlatformIndexType FwIndexType
void comOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port comOut.
RateGroupDivider component implementation.
void set_comOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to comOut[portNum].
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.
ComSplitterComponentBase(const char *compName="")
Construct ComSplitterComponentBase object.