F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TmFramerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title TmFramerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for TmFramer component base class
5 // ======================================================================
6 
7 #ifndef Svc_CCSDS_TmFramerComponentAc_HPP
8 #define Svc_CCSDS_TmFramerComponentAc_HPP
9 
11 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Log/LogPortAc.hpp"
13 #if FW_ENABLE_TEXT_LOGGING == 1
14 #include "Fw/Log/LogTextPortAc.hpp"
15 #endif
19 #include "Fw/Prm/PrmGetPortAc.hpp"
20 #include "Fw/Prm/PrmSetPortAc.hpp"
21 #include "Fw/Time/TimePortAc.hpp"
22 #include "Fw/Tlm/TlmPortAc.hpp"
24 
25 namespace Svc {
26 
27  namespace CCSDS {
28 
35  {
36 
37  // ----------------------------------------------------------------------
38  // Friend classes
39  // ----------------------------------------------------------------------
40 
42  friend class TmFramerTesterBase;
44  friend class TmFramerTester;
45 
46  PROTECTED:
47 
48  // ----------------------------------------------------------------------
49  // Constants
50  // ----------------------------------------------------------------------
51 
53  enum {
57  };
58 
60  enum {
67  };
68 
70  enum {
74  };
75 
76  public:
77 
78  // ----------------------------------------------------------------------
79  // Component initialization
80  // ----------------------------------------------------------------------
81 
83  void init(
84  FwEnumStoreType instance = 0
85  );
86 
87  public:
88 
89  // ----------------------------------------------------------------------
90  // Getters for typed input ports
91  // ----------------------------------------------------------------------
92 
97  FwIndexType portNum
98  );
99 
104  FwIndexType portNum
105  );
106 
111  FwIndexType portNum
112  );
113 
114  public:
115 
116  // ----------------------------------------------------------------------
117  // Connect input ports to special output ports
118  // ----------------------------------------------------------------------
119 
122  FwIndexType portNum,
123  Fw::InputLogPort* port
124  );
125 
126 #if FW_ENABLE_TEXT_LOGGING == 1
127 
129  void set_logTextOut_OutputPort(
130  FwIndexType portNum,
131  Fw::InputLogTextPort* port
132  );
133 
134 #endif
135 
138  FwIndexType portNum,
139  Fw::InputPrmGetPort* port
140  );
141 
144  FwIndexType portNum,
145  Fw::InputPrmSetPort* port
146  );
147 
150  FwIndexType portNum,
151  Fw::InputTimePort* port
152  );
153 
156  FwIndexType portNum,
157  Fw::InputTlmPort* port
158  );
159 
160  public:
161 
162  // ----------------------------------------------------------------------
163  // Connect typed input ports to typed output ports
164  // ----------------------------------------------------------------------
165 
168  FwIndexType portNum,
170  );
171 
174  FwIndexType portNum,
176  );
177 
180  FwIndexType portNum,
182  );
183 
184 #if FW_PORT_SERIALIZATION
185 
186  public:
187 
188  // ----------------------------------------------------------------------
189  // Connect serial input ports to special output ports
190  // ----------------------------------------------------------------------
191 
194  FwIndexType portNum,
195  Fw::InputSerializePort* port
196  );
197 
198 #if FW_ENABLE_TEXT_LOGGING == 1
199 
201  void set_logTextOut_OutputPort(
202  FwIndexType portNum,
203  Fw::InputSerializePort* port
204  );
205 
206 #endif
207 
210  FwIndexType portNum,
211  Fw::InputSerializePort* port
212  );
213 
216  FwIndexType portNum,
217  Fw::InputSerializePort* port
218  );
219 
222  FwIndexType portNum,
223  Fw::InputSerializePort* port
224  );
225 
226 #endif
227 
228 #if FW_PORT_SERIALIZATION
229 
230  public:
231 
232  // ----------------------------------------------------------------------
233  // Connect serial input ports to typed output ports
234  // ----------------------------------------------------------------------
235 
238  FwIndexType portNum,
239  Fw::InputSerializePort* port
240  );
241 
244  FwIndexType portNum,
245  Fw::InputSerializePort* port
246  );
247 
250  FwIndexType portNum,
251  Fw::InputSerializePort* port
252  );
253 
254 #endif
255 
256  PROTECTED:
257 
258  // ----------------------------------------------------------------------
259  // Component construction and destruction
260  // ----------------------------------------------------------------------
261 
264  const char* compName = ""
265  );
266 
268  virtual ~TmFramerComponentBase();
269 
270  PROTECTED:
271 
272  // ----------------------------------------------------------------------
273  // Getters for numbers of typed input ports
274  // ----------------------------------------------------------------------
275 
280 
285 
290 
291  PROTECTED:
292 
293  // ----------------------------------------------------------------------
294  // Getters for numbers of special output ports
295  // ----------------------------------------------------------------------
296 
301 
302 #if FW_ENABLE_TEXT_LOGGING == 1
303 
307  FwIndexType getNum_logTextOut_OutputPorts() const;
308 
309 #endif
310 
315 
320 
325 
330 
331  PROTECTED:
332 
333  // ----------------------------------------------------------------------
334  // Getters for numbers of typed output ports
335  // ----------------------------------------------------------------------
336 
341 
346 
351 
352  PROTECTED:
353 
354  // ----------------------------------------------------------------------
355  // Connection status queries for special output ports
356  // ----------------------------------------------------------------------
357 
362  FwIndexType portNum
363  );
364 
365 #if FW_ENABLE_TEXT_LOGGING == 1
366 
370  bool isConnected_logTextOut_OutputPort(
371  FwIndexType portNum
372  );
373 
374 #endif
375 
380  FwIndexType portNum
381  );
382 
387  FwIndexType portNum
388  );
389 
394  FwIndexType portNum
395  );
396 
401  FwIndexType portNum
402  );
403 
404  PROTECTED:
405 
406  // ----------------------------------------------------------------------
407  // Connection status queries for typed output ports
408  // ----------------------------------------------------------------------
409 
414  FwIndexType portNum
415  );
416 
421  FwIndexType portNum
422  );
423 
428  FwIndexType portNum
429  );
430 
431  PROTECTED:
432 
433  // ----------------------------------------------------------------------
434  // Handlers to implement for typed input ports
435  // ----------------------------------------------------------------------
436 
438  virtual void comStatusIn_handler(
439  FwIndexType portNum,
440  Fw::Success& condition
441  ) = 0;
442 
444  virtual void dataIn_handler(
445  FwIndexType portNum,
446  Fw::Buffer& data,
447  const ComCfg::FrameContext& context
448  ) = 0;
449 
451  virtual void dataReturnIn_handler(
452  FwIndexType portNum,
453  Fw::Buffer& data,
454  const ComCfg::FrameContext& context
455  ) = 0;
456 
457  PROTECTED:
458 
459  // ----------------------------------------------------------------------
460  // Port handler base-class functions for typed input ports
461  //
462  // Call these functions directly to bypass the corresponding ports
463  // ----------------------------------------------------------------------
464 
467  FwIndexType portNum,
468  Fw::Success& condition
469  );
470 
472  void dataIn_handlerBase(
473  FwIndexType portNum,
474  Fw::Buffer& data,
475  const ComCfg::FrameContext& context
476  );
477 
480  FwIndexType portNum,
481  Fw::Buffer& data,
482  const ComCfg::FrameContext& context
483  );
484 
485  PROTECTED:
486 
487  // ----------------------------------------------------------------------
488  // Invocation functions for typed output ports
489  // ----------------------------------------------------------------------
490 
492  void comStatusOut_out(
493  FwIndexType portNum,
494  Fw::Success& condition
495  );
496 
498  void dataOut_out(
499  FwIndexType portNum,
500  Fw::Buffer& data,
501  const ComCfg::FrameContext& context
502  );
503 
505  void dataReturnOut_out(
506  FwIndexType portNum,
507  Fw::Buffer& data,
508  const ComCfg::FrameContext& context
509  );
510 
511  PROTECTED:
512 
513  // ----------------------------------------------------------------------
514  // Time
515  // ----------------------------------------------------------------------
516 
520  Fw::Time getTime() const;
521 
522  PRIVATE:
523 
524  // ----------------------------------------------------------------------
525  // Calls for messages received on typed input ports
526  // ----------------------------------------------------------------------
527 
529  static void m_p_comStatusIn_in(
530  Fw::PassiveComponentBase* callComp,
531  FwIndexType portNum,
532  Fw::Success& condition
533  );
534 
536  static void m_p_dataIn_in(
537  Fw::PassiveComponentBase* callComp,
538  FwIndexType portNum,
539  Fw::Buffer& data,
540  const ComCfg::FrameContext& context
541  );
542 
544  static void m_p_dataReturnIn_in(
545  Fw::PassiveComponentBase* callComp,
546  FwIndexType portNum,
547  Fw::Buffer& data,
548  const ComCfg::FrameContext& context
549  );
550 
551  PRIVATE:
552 
553  // ----------------------------------------------------------------------
554  // Typed input ports
555  // ----------------------------------------------------------------------
556 
559 
562 
565 
566  PRIVATE:
567 
568  // ----------------------------------------------------------------------
569  // Special output ports
570  // ----------------------------------------------------------------------
571 
573  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
574 
575 #if FW_ENABLE_TEXT_LOGGING == 1
576 
578  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
579 
580 #endif
581 
583  Fw::OutputPrmGetPort m_prmGetOut_OutputPort[NUM_PRMGETOUT_OUTPUT_PORTS];
584 
586  Fw::OutputPrmSetPort m_prmSetOut_OutputPort[NUM_PRMSETOUT_OUTPUT_PORTS];
587 
589  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
590 
592  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
593 
594  PRIVATE:
595 
596  // ----------------------------------------------------------------------
597  // Typed output ports
598  // ----------------------------------------------------------------------
599 
602 
605 
608 
609  };
610 
611  }
612 
613 }
614 
615 #endif
Definition: Time.hpp:9
friend class TmFramerTesterBase
Friend class tester to support autocoded test harness.
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum)
I32 FwEnumStoreType
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataOut.
void set_prmGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGetOut[portNum].
bool isConnected_comStatusOut_OutputPort(FwIndexType portNum)
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum)
bool isConnected_logOut_OutputPort(FwIndexType portNum)
friend class TmFramerTester
Friend class tester implementation to support white-box testing.
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
void init()
Object initializer.
Definition: ObjBase.cpp:26
virtual void comStatusIn_handler(FwIndexType portNum, Fw::Success &condition)=0
Handler for input port comStatusIn.
TmFramerComponentBase(const char *compName="")
Construct TmFramerComponentBase object.
Fw::InputSuccessConditionPort * get_comStatusIn_InputPort(FwIndexType portNum)
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
FwIndexType getNum_comStatusOut_OutputPorts() const
FwIndexType getNum_comStatusIn_InputPorts() const
FwIndexType getNum_timeCaller_OutputPorts() const
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
FwIndexType getNum_dataReturnIn_InputPorts() const
virtual ~TmFramerComponentBase()
Destroy TmFramerComponentBase object.
void comStatusOut_out(FwIndexType portNum, Fw::Success &condition)
Invoke output port comStatusOut.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
FwIndexType getNum_prmSetOut_OutputPorts() const
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void set_prmSetOut_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSetOut[portNum].
PlatformIndexType FwIndexType
Type used to pass context info between components during framing/deframing.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
RateGroupDivider component implementation.
FwIndexType getNum_dataReturnOut_OutputPorts() const
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
FwIndexType getNum_prmGetOut_OutputPorts() const
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
bool isConnected_prmGetOut_OutputPort(FwIndexType portNum)
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
void comStatusIn_handlerBase(FwIndexType portNum, Fw::Success &condition)
Handler base-class function for input port comStatusIn.
void set_comStatusOut_OutputPort(FwIndexType portNum, Fw::InputSuccessConditionPort *port)
Connect port to comStatusOut[portNum].
Auto-generated base for TmFramer component.
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataReturnOut.
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
bool isConnected_dataOut_OutputPort(FwIndexType portNum)
Success/Failure.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)