F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PolyDbComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PolyDbComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for PolyDb component base class
5 // ======================================================================
6 
7 #ifndef Svc_PolyDbComponentAc_HPP
8 #define Svc_PolyDbComponentAc_HPP
9 
11 #include "Fw/FPrimeBasicTypes.hpp"
14 #include "Os/Mutex.hpp"
16 
17 namespace Svc {
18 
25  {
26 
27  // ----------------------------------------------------------------------
28  // Friend classes
29  // ----------------------------------------------------------------------
30 
34  friend class PolyDbTesterBase;
35 
36  PROTECTED:
37 
38  // ----------------------------------------------------------------------
39  // Constants
40  // ----------------------------------------------------------------------
41 
43  enum {
46  };
47 
48  public:
49 
50  // ----------------------------------------------------------------------
51  // Component initialization
52  // ----------------------------------------------------------------------
53 
55  void init(
56  FwEnumStoreType instance = 0
57  );
58 
59  public:
60 
61  // ----------------------------------------------------------------------
62  // Getters for typed input ports
63  // ----------------------------------------------------------------------
64 
69  FwIndexType portNum
70  );
71 
76  FwIndexType portNum
77  );
78 
79  PROTECTED:
80 
81  // ----------------------------------------------------------------------
82  // Component construction and destruction
83  // ----------------------------------------------------------------------
84 
87  const char* compName = ""
88  );
89 
91  virtual ~PolyDbComponentBase();
92 
93  PROTECTED:
94 
95  // ----------------------------------------------------------------------
96  // Getters for numbers of typed input ports
97  // ----------------------------------------------------------------------
98 
103 
108 
109  PROTECTED:
110 
111  // ----------------------------------------------------------------------
112  // Handlers to implement for typed input ports
113  // ----------------------------------------------------------------------
114 
116  virtual void getValue_handler(
117  FwIndexType portNum,
118  const Svc::PolyDbCfg::PolyDbEntry& entry,
119  Svc::MeasurementStatus& status,
120  Fw::Time& time,
121  Fw::PolyType& val
122  ) = 0;
123 
125  virtual void setValue_handler(
126  FwIndexType portNum,
127  const Svc::PolyDbCfg::PolyDbEntry& entry,
128  Svc::MeasurementStatus& status,
129  Fw::Time& time,
130  Fw::PolyType& val
131  ) = 0;
132 
133  PROTECTED:
134 
135  // ----------------------------------------------------------------------
136  // Port handler base-class functions for typed input ports
137  //
138  // Call these functions directly to bypass the corresponding ports
139  // ----------------------------------------------------------------------
140 
143  FwIndexType portNum,
144  const Svc::PolyDbCfg::PolyDbEntry& entry,
145  Svc::MeasurementStatus& status,
146  Fw::Time& time,
147  Fw::PolyType& val
148  );
149 
152  FwIndexType portNum,
153  const Svc::PolyDbCfg::PolyDbEntry& entry,
154  Svc::MeasurementStatus& status,
155  Fw::Time& time,
156  Fw::PolyType& val
157  );
158 
159  PROTECTED:
160 
161  // ----------------------------------------------------------------------
162  // Mutex operations for guarded ports
163  //
164  // You can override these operations to provide more sophisticated
165  // synchronization
166  // ----------------------------------------------------------------------
167 
169  virtual void lock();
170 
172  virtual void unLock();
173 
174  PRIVATE:
175 
176  // ----------------------------------------------------------------------
177  // Calls for messages received on typed input ports
178  // ----------------------------------------------------------------------
179 
181  static void m_p_getValue_in(
182  Fw::PassiveComponentBase* callComp,
183  FwIndexType portNum,
184  const Svc::PolyDbCfg::PolyDbEntry& entry,
185  Svc::MeasurementStatus& status,
186  Fw::Time& time,
187  Fw::PolyType& val
188  );
189 
191  static void m_p_setValue_in(
192  Fw::PassiveComponentBase* callComp,
193  FwIndexType portNum,
194  const Svc::PolyDbCfg::PolyDbEntry& entry,
195  Svc::MeasurementStatus& status,
196  Fw::Time& time,
197  Fw::PolyType& val
198  );
199 
200  PRIVATE:
201 
202  // ----------------------------------------------------------------------
203  // Typed input ports
204  // ----------------------------------------------------------------------
205 
207  Svc::InputPolyPort m_getValue_InputPort[NUM_GETVALUE_INPUT_PORTS];
208 
210  Svc::InputPolyPort m_setValue_InputPort[NUM_SETVALUE_INPUT_PORTS];
211 
212  PRIVATE:
213 
214  // ----------------------------------------------------------------------
215  // Mutexes
216  // ----------------------------------------------------------------------
217 
219  Os::Mutex m_guardedPortMutex;
220 
221  };
222 
223 }
224 
225 #endif
Definition: Time.hpp:9
friend class PolyDbTesterBase
Friend class tester to support autocoded test harness.
I32 FwEnumStoreType
void setValue_handlerBase(FwIndexType portNum, const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
Handler base-class function for input port setValue.
FwIndexType getNum_setValue_InputPorts() const
virtual ~PolyDbComponentBase()
Destroy PolyDbComponentBase object.
Svc::InputPolyPort * get_setValue_InputPort(FwIndexType portNum)
void init()
Object initializer.
Definition: ObjBase.cpp:26
friend class PolyDbComponentBaseFriend
Friend class for white-box testing.
FwIndexType getNum_getValue_InputPorts() const
PolyDbComponentBase(const char *compName="")
Construct PolyDbComponentBase object.
virtual void getValue_handler(FwIndexType portNum, const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)=0
Handler for input port getValue.
virtual void unLock()
Unlock the guarded mutex.
An enumeration for measurement status.
Auto-generated base for PolyDb component.
virtual void lock()
Lock the guarded mutex.
PlatformIndexType FwIndexType
Svc::InputPolyPort * get_getValue_InputPort(FwIndexType portNum)
void getValue_handlerBase(FwIndexType portNum, const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
Handler base-class function for input port getValue.
virtual void setValue_handler(FwIndexType portNum, const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)=0
Handler for input port setValue.
RateGroupDivider component implementation.