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
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
10#include "FpConfig.hpp"
12#include "Fw/Com/ComPortAc.hpp"
16
17namespace Svc {
18
25 {
26
27 // ----------------------------------------------------------------------
28 // Friend classes
29 // ----------------------------------------------------------------------
30
33
34 PROTECTED:
35
36 // ----------------------------------------------------------------------
37 // Constants
38 // ----------------------------------------------------------------------
39
41 enum {
44 };
45
47 enum {
51 };
52
53 public:
54
55 // ----------------------------------------------------------------------
56 // Component initialization
57 // ----------------------------------------------------------------------
58
60 void init(
61 NATIVE_INT_TYPE instance = 0
62 );
63
64 public:
65
66 // ----------------------------------------------------------------------
67 // Getters for typed input ports
68 // ----------------------------------------------------------------------
69
74 NATIVE_INT_TYPE portNum
75 );
76
81 NATIVE_INT_TYPE portNum
82 );
83
84 public:
85
86 // ----------------------------------------------------------------------
87 // Connect typed input ports to typed output ports
88 // ----------------------------------------------------------------------
89
92 NATIVE_INT_TYPE portNum,
93 Fw::InputComPort* port
94 );
95
98 NATIVE_INT_TYPE portNum,
99 Fw::InputComPort* port
100 );
101
104 NATIVE_INT_TYPE portNum,
106 );
107
108#if FW_PORT_SERIALIZATION
109
110 public:
111
112 // ----------------------------------------------------------------------
113 // Connect serial input ports to typed output ports
114 // ----------------------------------------------------------------------
115
118 NATIVE_INT_TYPE portNum,
119 Fw::InputSerializePort* port
120 );
121
124 NATIVE_INT_TYPE portNum,
125 Fw::InputSerializePort* port
126 );
127
130 NATIVE_INT_TYPE portNum,
131 Fw::InputSerializePort* port
132 );
133
134#endif
135
136 PROTECTED:
137
138 // ----------------------------------------------------------------------
139 // Component construction and destruction
140 // ----------------------------------------------------------------------
141
144 const char* compName = ""
145 );
146
149
150 PROTECTED:
151
152 // ----------------------------------------------------------------------
153 // Getters for numbers of typed input ports
154 // ----------------------------------------------------------------------
155
160
165
166 PROTECTED:
167
168 // ----------------------------------------------------------------------
169 // Getters for numbers of typed output ports
170 // ----------------------------------------------------------------------
171
176
181
186
187 PROTECTED:
188
189 // ----------------------------------------------------------------------
190 // Connection status queries for typed output ports
191 // ----------------------------------------------------------------------
192
197 NATIVE_INT_TYPE portNum
198 );
199
204 NATIVE_INT_TYPE portNum
205 );
206
211 NATIVE_INT_TYPE portNum
212 );
213
214 PROTECTED:
215
216 // ----------------------------------------------------------------------
217 // Handlers to implement for typed input ports
218 // ----------------------------------------------------------------------
219
221 virtual void CmdBuff_handler(
222 NATIVE_INT_TYPE portNum,
223 Fw::ComBuffer& data,
224 U32 context
225 ) = 0;
226
229 NATIVE_INT_TYPE portNum,
230 FwOpcodeType opCode,
231 U32 cmdSeq,
232 const Fw::CmdResponse& response
233 ) = 0;
234
235 PROTECTED:
236
237 // ----------------------------------------------------------------------
238 // Port handler base-class functions for typed input ports
239 //
240 // Call these functions directly to bypass the corresponding ports
241 // ----------------------------------------------------------------------
242
245 NATIVE_INT_TYPE portNum,
246 Fw::ComBuffer& data,
247 U32 context
248 );
249
252 NATIVE_INT_TYPE portNum,
253 FwOpcodeType opCode,
254 U32 cmdSeq,
255 const Fw::CmdResponse& response
256 );
257
258 PROTECTED:
259
260 // ----------------------------------------------------------------------
261 // Invocation functions for typed output ports
262 // ----------------------------------------------------------------------
263
265 void LocalCmd_out(
266 NATIVE_INT_TYPE portNum,
267 Fw::ComBuffer& data,
268 U32 context
269 );
270
272 void RemoteCmd_out(
273 NATIVE_INT_TYPE portNum,
274 Fw::ComBuffer& data,
275 U32 context
276 );
277
280 NATIVE_INT_TYPE portNum,
281 FwOpcodeType opCode,
282 U32 cmdSeq,
283 const Fw::CmdResponse& response
284 );
285
286 PRIVATE:
287
288 // ----------------------------------------------------------------------
289 // Calls for messages received on typed input ports
290 // ----------------------------------------------------------------------
291
293 static void m_p_CmdBuff_in(
294 Fw::PassiveComponentBase* callComp,
295 NATIVE_INT_TYPE portNum,
296 Fw::ComBuffer& data,
297 U32 context
298 );
299
301 static void m_p_seqCmdStatus_in(
302 Fw::PassiveComponentBase* callComp,
303 NATIVE_INT_TYPE portNum,
304 FwOpcodeType opCode,
305 U32 cmdSeq,
306 const Fw::CmdResponse& response
307 );
308
309 PRIVATE:
310
311 // ----------------------------------------------------------------------
312 // Typed input ports
313 // ----------------------------------------------------------------------
314
316 Fw::InputComPort m_CmdBuff_InputPort[NUM_CMDBUFF_INPUT_PORTS];
317
320
321 PRIVATE:
322
323 // ----------------------------------------------------------------------
324 // Typed output ports
325 // ----------------------------------------------------------------------
326
328 Fw::OutputComPort m_LocalCmd_OutputPort[NUM_LOCALCMD_OUTPUT_PORTS];
329
331 Fw::OutputComPort m_RemoteCmd_OutputPort[NUM_REMOTECMD_OUTPUT_PORTS];
332
334 Fw::OutputCmdResponsePort m_forwardSeqCmdStatus_OutputPort[NUM_FORWARDSEQCMDSTATUS_OUTPUT_PORTS];
335
336 };
337
338}
339
340#endif
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
U32 FwOpcodeType
Definition FpConfig.h:56
C++-compatible configuration header for fprime configuration.
Enum representing a command response.
void init()
Object initializer.
Definition ObjBase.cpp:27
Auto-generated base for CmdSplitter component.
NATIVE_INT_TYPE getNum_CmdBuff_InputPorts() const
Fw::InputComPort * get_CmdBuff_InputPort(NATIVE_INT_TYPE portNum)
void seqCmdStatus_handlerBase(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port seqCmdStatus.
void forwardSeqCmdStatus_out(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port forwardSeqCmdStatus.
void set_forwardSeqCmdStatus_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputCmdResponsePort *port)
Connect port to forwardSeqCmdStatus[portNum].
void set_LocalCmd_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputComPort *port)
Connect port to LocalCmd[portNum].
bool isConnected_forwardSeqCmdStatus_OutputPort(NATIVE_INT_TYPE portNum)
void set_RemoteCmd_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputComPort *port)
Connect port to RemoteCmd[portNum].
NATIVE_INT_TYPE getNum_RemoteCmd_OutputPorts() const
Fw::InputCmdResponsePort * get_seqCmdStatus_InputPort(NATIVE_INT_TYPE portNum)
NATIVE_INT_TYPE getNum_seqCmdStatus_InputPorts() const
bool isConnected_LocalCmd_OutputPort(NATIVE_INT_TYPE portNum)
NATIVE_INT_TYPE getNum_LocalCmd_OutputPorts() const
void CmdBuff_handlerBase(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port CmdBuff.
virtual void seqCmdStatus_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port seqCmdStatus.
CmdSplitterComponentBase(const char *compName="")
Construct CmdSplitterComponentBase object.
NATIVE_INT_TYPE getNum_forwardSeqCmdStatus_OutputPorts() const
friend class CmdSplitterComponentBaseFriend
Friend class for white-box testing.
virtual ~CmdSplitterComponentBase()
Destroy CmdSplitterComponentBase object.
virtual void CmdBuff_handler(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port CmdBuff.
bool isConnected_RemoteCmd_OutputPort(NATIVE_INT_TYPE portNum)
void RemoteCmd_out(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)
Invoke output port RemoteCmd.
void LocalCmd_out(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)
Invoke output port LocalCmd.