F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
CmdSplitterComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title CmdSplitterComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for CmdSplitter component base class
5 // ======================================================================
6 
7 #ifndef Svc_CmdSplitterComponentAc_HPP
8 #define Svc_CmdSplitterComponentAc_HPP
9 
11 #include "Fw/Com/ComPortAc.hpp"
13 #include "Fw/FPrimeBasicTypes.hpp"
16 
17 namespace Svc {
18 
25  {
26 
27  // ----------------------------------------------------------------------
28  // Friend classes
29  // ----------------------------------------------------------------------
30 
32  friend class CmdSplitterTesterBase;
34  friend class CmdSplitterTester;
35 
36  PROTECTED:
37 
38  // ----------------------------------------------------------------------
39  // Constants
40  // ----------------------------------------------------------------------
41 
43  enum {
46  };
47 
49  enum {
53  };
54 
55  public:
56 
57  // ----------------------------------------------------------------------
58  // Component initialization
59  // ----------------------------------------------------------------------
60 
62  void init(
63  FwEnumStoreType instance = 0
64  );
65 
66  public:
67 
68  // ----------------------------------------------------------------------
69  // Getters for typed input ports
70  // ----------------------------------------------------------------------
71 
76  FwIndexType portNum
77  );
78 
83  FwIndexType portNum
84  );
85 
86  public:
87 
88  // ----------------------------------------------------------------------
89  // Connect typed input ports to typed output ports
90  // ----------------------------------------------------------------------
91 
94  FwIndexType portNum,
95  Fw::InputComPort* port
96  );
97 
100  FwIndexType portNum,
101  Fw::InputComPort* port
102  );
103 
106  FwIndexType portNum,
108  );
109 
110 #if FW_PORT_SERIALIZATION
111 
112  public:
113 
114  // ----------------------------------------------------------------------
115  // Connect serial input ports to typed output ports
116  // ----------------------------------------------------------------------
117 
120  FwIndexType portNum,
121  Fw::InputSerializePort* port
122  );
123 
126  FwIndexType portNum,
127  Fw::InputSerializePort* port
128  );
129 
132  FwIndexType portNum,
133  Fw::InputSerializePort* port
134  );
135 
136 #endif
137 
138  PROTECTED:
139 
140  // ----------------------------------------------------------------------
141  // Component construction and destruction
142  // ----------------------------------------------------------------------
143 
146  const char* compName = ""
147  );
148 
150  virtual ~CmdSplitterComponentBase();
151 
152  PROTECTED:
153 
154  // ----------------------------------------------------------------------
155  // Getters for numbers of typed input ports
156  // ----------------------------------------------------------------------
157 
162 
167 
168  PROTECTED:
169 
170  // ----------------------------------------------------------------------
171  // Getters for numbers of typed output ports
172  // ----------------------------------------------------------------------
173 
178 
183 
188 
189  PROTECTED:
190 
191  // ----------------------------------------------------------------------
192  // Connection status queries for typed output ports
193  // ----------------------------------------------------------------------
194 
199  FwIndexType portNum
200  );
201 
206  FwIndexType portNum
207  );
208 
213  FwIndexType portNum
214  );
215 
216  PROTECTED:
217 
218  // ----------------------------------------------------------------------
219  // Handlers to implement for typed input ports
220  // ----------------------------------------------------------------------
221 
223  virtual void CmdBuff_handler(
224  FwIndexType portNum,
225  Fw::ComBuffer& data,
226  U32 context
227  ) = 0;
228 
230  virtual void seqCmdStatus_handler(
231  FwIndexType portNum,
232  FwOpcodeType opCode,
233  U32 cmdSeq,
234  const Fw::CmdResponse& response
235  ) = 0;
236 
237  PROTECTED:
238 
239  // ----------------------------------------------------------------------
240  // Port handler base-class functions for typed input ports
241  //
242  // Call these functions directly to bypass the corresponding ports
243  // ----------------------------------------------------------------------
244 
246  void CmdBuff_handlerBase(
247  FwIndexType portNum,
248  Fw::ComBuffer& data,
249  U32 context
250  );
251 
254  FwIndexType portNum,
255  FwOpcodeType opCode,
256  U32 cmdSeq,
257  const Fw::CmdResponse& response
258  );
259 
260  PROTECTED:
261 
262  // ----------------------------------------------------------------------
263  // Invocation functions for typed output ports
264  // ----------------------------------------------------------------------
265 
267  void LocalCmd_out(
268  FwIndexType portNum,
269  Fw::ComBuffer& data,
270  U32 context
271  );
272 
274  void RemoteCmd_out(
275  FwIndexType portNum,
276  Fw::ComBuffer& data,
277  U32 context
278  );
279 
282  FwIndexType portNum,
283  FwOpcodeType opCode,
284  U32 cmdSeq,
285  const Fw::CmdResponse& response
286  );
287 
288  PRIVATE:
289 
290  // ----------------------------------------------------------------------
291  // Calls for messages received on typed input ports
292  // ----------------------------------------------------------------------
293 
295  static void m_p_CmdBuff_in(
296  Fw::PassiveComponentBase* callComp,
297  FwIndexType portNum,
298  Fw::ComBuffer& data,
299  U32 context
300  );
301 
303  static void m_p_seqCmdStatus_in(
304  Fw::PassiveComponentBase* callComp,
305  FwIndexType portNum,
306  FwOpcodeType opCode,
307  U32 cmdSeq,
308  const Fw::CmdResponse& response
309  );
310 
311  PRIVATE:
312 
313  // ----------------------------------------------------------------------
314  // Typed input ports
315  // ----------------------------------------------------------------------
316 
318  Fw::InputComPort m_CmdBuff_InputPort[NUM_CMDBUFF_INPUT_PORTS];
319 
321  Fw::InputCmdResponsePort m_seqCmdStatus_InputPort[NUM_SEQCMDSTATUS_INPUT_PORTS];
322 
323  PRIVATE:
324 
325  // ----------------------------------------------------------------------
326  // Typed output ports
327  // ----------------------------------------------------------------------
328 
330  Fw::OutputComPort m_LocalCmd_OutputPort[NUM_LOCALCMD_OUTPUT_PORTS];
331 
333  Fw::OutputComPort m_RemoteCmd_OutputPort[NUM_REMOTECMD_OUTPUT_PORTS];
334 
336  Fw::OutputCmdResponsePort m_forwardSeqCmdStatus_OutputPort[NUM_FORWARDSEQCMDSTATUS_OUTPUT_PORTS];
337 
338  };
339 
340 }
341 
342 #endif
I32 FwEnumStoreType
void LocalCmd_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port LocalCmd.
bool isConnected_forwardSeqCmdStatus_OutputPort(FwIndexType portNum)
Fw::InputCmdResponsePort * get_seqCmdStatus_InputPort(FwIndexType portNum)
CmdSplitterComponentBase(const char *compName="")
Construct CmdSplitterComponentBase object.
Enum representing a command response.
bool isConnected_LocalCmd_OutputPort(FwIndexType portNum)
virtual ~CmdSplitterComponentBase()
Destroy CmdSplitterComponentBase object.
virtual void CmdBuff_handler(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port CmdBuff.
void forwardSeqCmdStatus_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port forwardSeqCmdStatus.
FwIndexType getNum_RemoteCmd_OutputPorts() const
void init()
Object initializer.
Definition: ObjBase.cpp:26
void set_LocalCmd_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to LocalCmd[portNum].
FwIndexType getNum_LocalCmd_OutputPorts() const
FwIndexType getNum_seqCmdStatus_InputPorts() const
void set_RemoteCmd_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to RemoteCmd[portNum].
U32 FwOpcodeType
The type of a command opcode.
Auto-generated base for CmdSplitter component.
friend class CmdSplitterTesterBase
Friend class tester to support autocoded test harness.
bool isConnected_RemoteCmd_OutputPort(FwIndexType portNum)
void CmdBuff_handlerBase(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port CmdBuff.
Fw::InputComPort * get_CmdBuff_InputPort(FwIndexType portNum)
FwIndexType getNum_forwardSeqCmdStatus_OutputPorts() const
void set_forwardSeqCmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to forwardSeqCmdStatus[portNum].
PlatformIndexType FwIndexType
void RemoteCmd_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port RemoteCmd.
RateGroupDivider component implementation.
friend class CmdSplitterTester
Friend class tester implementation to support white-box testing.
virtual void seqCmdStatus_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port seqCmdStatus.
void seqCmdStatus_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port seqCmdStatus.