F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ChronoTimeComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ChronoTimeComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for ChronoTime component base class
5 // ======================================================================
6 
7 #ifndef Svc_ChronoTimeComponentAc_HPP
8 #define Svc_ChronoTimeComponentAc_HPP
9 
11 #include "Fw/FPrimeBasicTypes.hpp"
12 #if !FW_DIRECT_PORT_CALLS
14 #endif
15 #if !FW_DIRECT_PORT_CALLS
17 #endif
18 #include "Fw/Time/TimePortAc.hpp"
19 
20 namespace Svc {
21 
28  {
29 
30  // ----------------------------------------------------------------------
31  // Friend classes
32  // ----------------------------------------------------------------------
33 
35  friend class ChronoTimeTesterBase;
37  friend class ChronoTimeTester;
38 
39  protected:
40 
41  // ----------------------------------------------------------------------
42  // Constants
43  // ----------------------------------------------------------------------
44 
46  enum {
48  };
49 
50  public:
51 
52  // ----------------------------------------------------------------------
53  // Component initialization
54  // ----------------------------------------------------------------------
55 
57  void init(
58  FwEnumStoreType instance = 0
59  );
60 
61 #if !FW_DIRECT_PORT_CALLS
62 
63  public:
64 
65  // ----------------------------------------------------------------------
66  // Getters for typed input ports
67  // ----------------------------------------------------------------------
68 
73  FwIndexType portNum
74  );
75 
76 #endif
77 
78  protected:
79 
80  // ----------------------------------------------------------------------
81  // Component construction and destruction
82  // ----------------------------------------------------------------------
83 
86  const char* compName = ""
87  );
88 
90  virtual ~ChronoTimeComponentBase();
91 
92  protected:
93 
94  // ----------------------------------------------------------------------
95  // Getters for numbers of typed input ports
96  // ----------------------------------------------------------------------
97 
103  }
104 
105  protected:
106 
107  // ----------------------------------------------------------------------
108  // Handlers to implement for typed input ports
109  // ----------------------------------------------------------------------
110 
112  virtual void timeGetPort_handler(
113  FwIndexType portNum,
114  Fw::Time& time
115  ) = 0;
116 
117 #if FW_DIRECT_PORT_CALLS
118  public:
119 #else
120  protected:
121 #endif
122 
123  // ----------------------------------------------------------------------
124  // Port handler base-class functions for typed input ports
125  //
126  // Call these functions directly to bypass the corresponding ports
127  // ----------------------------------------------------------------------
128 
131  FwIndexType portNum,
132  Fw::Time& time
133  );
134 
135  private:
136 
137  // ----------------------------------------------------------------------
138  // Calls for messages received on typed input ports
139  // ----------------------------------------------------------------------
140 
142  static void m_p_timeGetPort_in(
143  Fw::PassiveComponentBase* callComp,
144  FwIndexType portNum,
145  Fw::Time& time
146  );
147 
148 #if !FW_DIRECT_PORT_CALLS
149 
150  private:
151 
152  // ----------------------------------------------------------------------
153  // Typed input ports
154  // ----------------------------------------------------------------------
155 
157  Fw::InputTimePort m_timeGetPort_InputPort[NUM_TIMEGETPORT_INPUT_PORTS];
158 
159 #endif
160 
161  };
162 
163 }
164 
165 #endif
friend class ChronoTimeTesterBase
Friend class tester to support autocoded test harness.
Auto-generated base for ChronoTime component.
I32 FwEnumStoreType
ChronoTimeComponentBase(const char *compName="")
Construct ChronoTimeComponentBase object.
virtual ~ChronoTimeComponentBase()
Destroy ChronoTimeComponentBase object.
void init()
Object initializer.
Definition: ObjBase.cpp:24
static constexpr FwIndexType getNum_timeGetPort_InputPorts()
void timeGetPort_handlerBase(FwIndexType portNum, Fw::Time &time)
Handler base-class function for input port timeGetPort.
virtual void timeGetPort_handler(FwIndexType portNum, Fw::Time &time)=0
Handler for input port timeGetPort.
PlatformIndexType FwIndexType
RateGroupDivider component implementation.
friend class ChronoTimeTester
Friend class tester implementation to support white-box testing.
Fw::InputTimePort * get_timeGetPort_InputPort(FwIndexType portNum)