F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
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
10#include "FpConfig.hpp"
14#include "Os/Mutex.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
46 public:
47
48 // ----------------------------------------------------------------------
49 // Component initialization
50 // ----------------------------------------------------------------------
51
53 void init(
54 FwEnumStoreType instance = 0
55 );
56
57 public:
58
59 // ----------------------------------------------------------------------
60 // Getters for typed input ports
61 // ----------------------------------------------------------------------
62
67 FwIndexType portNum
68 );
69
74 FwIndexType portNum
75 );
76
77 PROTECTED:
78
79 // ----------------------------------------------------------------------
80 // Component construction and destruction
81 // ----------------------------------------------------------------------
82
85 const char* compName = ""
86 );
87
89 virtual ~PolyDbComponentBase();
90
91 PROTECTED:
92
93 // ----------------------------------------------------------------------
94 // Getters for numbers of typed input ports
95 // ----------------------------------------------------------------------
96
101
106
107 PROTECTED:
108
109 // ----------------------------------------------------------------------
110 // Handlers to implement for typed input ports
111 // ----------------------------------------------------------------------
112
114 virtual void getValue_handler(
115 FwIndexType portNum,
116 const Svc::PolyDbCfg::PolyDbEntry& entry,
117 Svc::MeasurementStatus& status,
118 Fw::Time& time,
119 Fw::PolyType& val
120 ) = 0;
121
123 virtual void setValue_handler(
124 FwIndexType portNum,
125 const Svc::PolyDbCfg::PolyDbEntry& entry,
126 Svc::MeasurementStatus& status,
127 Fw::Time& time,
128 Fw::PolyType& val
129 ) = 0;
130
131 PROTECTED:
132
133 // ----------------------------------------------------------------------
134 // Port handler base-class functions for typed input ports
135 //
136 // Call these functions directly to bypass the corresponding ports
137 // ----------------------------------------------------------------------
138
141 FwIndexType portNum,
142 const Svc::PolyDbCfg::PolyDbEntry& entry,
143 Svc::MeasurementStatus& status,
144 Fw::Time& time,
145 Fw::PolyType& val
146 );
147
150 FwIndexType portNum,
151 const Svc::PolyDbCfg::PolyDbEntry& entry,
152 Svc::MeasurementStatus& status,
153 Fw::Time& time,
154 Fw::PolyType& val
155 );
156
157 PROTECTED:
158
159 // ----------------------------------------------------------------------
160 // Mutex operations for guarded ports
161 //
162 // You can override these operations to provide more sophisticated
163 // synchronization
164 // ----------------------------------------------------------------------
165
167 virtual void lock();
168
170 virtual void unLock();
171
172 PRIVATE:
173
174 // ----------------------------------------------------------------------
175 // Calls for messages received on typed input ports
176 // ----------------------------------------------------------------------
177
179 static void m_p_getValue_in(
180 Fw::PassiveComponentBase* callComp,
181 FwIndexType portNum,
182 const Svc::PolyDbCfg::PolyDbEntry& entry,
183 Svc::MeasurementStatus& status,
184 Fw::Time& time,
185 Fw::PolyType& val
186 );
187
189 static void m_p_setValue_in(
190 Fw::PassiveComponentBase* callComp,
191 FwIndexType portNum,
192 const Svc::PolyDbCfg::PolyDbEntry& entry,
193 Svc::MeasurementStatus& status,
194 Fw::Time& time,
195 Fw::PolyType& val
196 );
197
198 PRIVATE:
199
200 // ----------------------------------------------------------------------
201 // Typed input ports
202 // ----------------------------------------------------------------------
203
205 Svc::InputPolyPort m_getValue_InputPort[NUM_GETVALUE_INPUT_PORTS];
206
208 Svc::InputPolyPort m_setValue_InputPort[NUM_SETVALUE_INPUT_PORTS];
209
210 PRIVATE:
211
212 // ----------------------------------------------------------------------
213 // Mutexes
214 // ----------------------------------------------------------------------
215
217 Os::Mutex m_guardedPortMutex;
218
219 };
220
221}
222
223#endif
I32 FwEnumStoreType
Definition FpConfig.h:64
PlatformIndexType FwIndexType
Definition FpConfig.h:25
C++-compatible configuration header for fprime configuration.
void init()
Object initializer.
Definition ObjBase.cpp:27
An enumeration for measurement status.
Auto-generated base for PolyDb component.
Svc::InputPolyPort * get_setValue_InputPort(FwIndexType portNum)
virtual void unLock()
Unlock the guarded mutex.
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.
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.
virtual void lock()
Lock the guarded mutex.
friend class PolyDbComponentBaseFriend
Friend class for white-box testing.
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.
FwIndexType getNum_setValue_InputPorts() const
Svc::InputPolyPort * get_getValue_InputPort(FwIndexType portNum)
virtual ~PolyDbComponentBase()
Destroy PolyDbComponentBase object.
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.
FwIndexType getNum_getValue_InputPorts() const