F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
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 Auto-generated
4 // \brief hpp file for PolyDb component base class
5 //
6 // \copyright
7 // Copyright 2009-2015, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12 
13 #ifndef POLYDB_COMP_HPP_
14 #define POLYDB_COMP_HPP_
15 
16 #include <FpConfig.hpp>
20 #include <Os/Mutex.hpp>
21 #include <Fw/Types/PolyType.hpp>
22 #include <Fw/Time/Time.hpp>
24 
25 namespace Svc {
26 
32  {
33 
34  // ----------------------------------------------------------------------
35  // Friend classes
36  // ----------------------------------------------------------------------
37 
41 
42  public:
43 
44  // ----------------------------------------------------------------------
45  // Getters for typed input ports
46  // ----------------------------------------------------------------------
47 
54  );
55 
62  );
63 
65 
66  // ----------------------------------------------------------------------
67  // Component construction, initialization, and destruction
68  // ----------------------------------------------------------------------
69 
70 #if FW_OBJECT_NAMES == 1
74  const char* compName
75  );
76 #else
77  PolyDbComponentBase(void);
80 #endif
81 
84  void init(
85  NATIVE_INT_TYPE instance = 0
86  );
87 
90  virtual ~PolyDbComponentBase(void);
91 
93 
94  // ----------------------------------------------------------------------
96  // ----------------------------------------------------------------------
99  // ----------------------------------------------------------------------
100 
103  virtual void lock(void);
104 
107  virtual void unLock(void);
108 
110 
111  // ----------------------------------------------------------------------
112  // Handlers to implement for typed input ports
113  // ----------------------------------------------------------------------
114 
116  //
117  virtual void getValue_handler(
119  U32 entry,
123  ) = 0;
124 
126  //
127  virtual void setValue_handler(
129  U32 entry,
131  Fw::Time &time,
132  Fw::PolyType &val
133  ) = 0;
134 
136 
137  // ----------------------------------------------------------------------
138  // Port handler base-class functions for typed input ports.
139  // ----------------------------------------------------------------------
140  // Call these functions directly to bypass the corresponding ports.
141  // ----------------------------------------------------------------------
142 
145  void getValue_handlerBase(
147  U32 entry,
149  Fw::Time &time,
150  Fw::PolyType &val
151  );
152 
157  U32 entry,
159  Fw::Time &time,
160  Fw::PolyType &val
161  );
162 
164 
165  // ----------------------------------------------------------------------
166  // Getters for numbers of input ports
167  // ----------------------------------------------------------------------
168 
173  NATIVE_INT_TYPE getNum_getValue_InputPorts(void);
174 
180 
181 
182  // ----------------------------------------------------------------------
183  // Enumerations for number of ports
184  // ----------------------------------------------------------------------
185 
186  enum {
189  };
190 
192 
193  // ----------------------------------------------------------------------
194  // Event logging functions
195  // ----------------------------------------------------------------------
196 
197 
198  PRIVATE:
199 
200  // ----------------------------------------------------------------------
201  // Typed input ports
202  // ----------------------------------------------------------------------
203 
206  Svc::InputPolyPort m_getValue_InputPort[NUM_GETVALUE_INPUT_PORTS];
207 
211 
213 
214  // ----------------------------------------------------------------------
215  // Calls for messages received on typed input ports
216  // ----------------------------------------------------------------------
217 
220  static void m_p_getValue_in(
221  Fw::PassiveComponentBase* callComp,
223  U32 entry,
227  );
228 
231  static void m_p_setValue_in(
232  Fw::PassiveComponentBase* callComp,
234  U32 entry,
236  Fw::Time &time,
237  Fw::PolyType &val
238  );
239 
241 
242  // ----------------------------------------------------------------------
243  // Mutexes
244  // ----------------------------------------------------------------------
245 
248  Os::Mutex m_guardedPortMutex;
249 
250 
251 
252  };
253 
254 } // end namespace Svc
255 #endif
Svc::PolyDbComponentBase::PolyDbComponentBaseFriend
friend class PolyDbComponentBaseFriend
Definition: PolyDbComponentAc.hpp:40
Svc::PolyDbComponentBase::getNum_setValue_InputPorts
NATIVE_INT_TYPE getNum_setValue_InputPorts(void)
Definition: PolyDbComponentAc.cpp:149
PRIVATE
#define PRIVATE
overridable private for unit testing
Definition: BasicTypes.hpp:118
Fw::Time
Definition: Time.hpp:10
Svc::PolyDbComponentBase::entry
PROTECTED U32 entry
Definition: PolyDbComponentAc.hpp:119
Svc::PolyDbComponentBase::setValue_handler
virtual void setValue_handler(NATIVE_INT_TYPE portNum, U32 entry, MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)=0
Handler for input port setValue.
PROTECTED
#define PROTECTED
overridable protected for unit testing
Definition: BasicTypes.hpp:114
InputSerializePort.hpp
Svc::PolyDbComponentBase::NUM_SETVALUE_INPUT_PORTS
@ NUM_SETVALUE_INPUT_PORTS
Definition: PolyDbComponentAc.hpp:188
Svc::PolyDbComponentBase::unLock
virtual void unLock(void)
Definition: PolyDbComponentAc.cpp:167
Fw::PassiveComponentBase
Definition: PassiveComponentBase.hpp:10
Fw::ObjBase::init
void init(void)
Object initializer.
Definition: ObjBase.cpp:26
Svc::PolyDbComponentBase::status
PROTECTED U32 MeasurementStatus & status
Definition: PolyDbComponentAc.hpp:120
Svc::PolyDbComponentBase::m_p_setValue_in
static void m_p_setValue_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, U32 entry, MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
Definition: PolyDbComponentAc.cpp:190
ActiveComponentBase.hpp
Svc::PolyDbComponentBase::time
PROTECTED U32 MeasurementStatus Fw::Time & time
Definition: PolyDbComponentAc.hpp:121
Os::Mutex
Definition: Mutex.hpp:8
Svc::MeasurementStatus
MeasurementStatus
Definition: PolyPortAc.hpp:26
Svc::PolyDbComponentBase::~PolyDbComponentBase
virtual ~PolyDbComponentBase(void)
Definition: PolyDbComponentAc.cpp:128
PolyPortAc.hpp
Svc::PolyDbComponentBase
Auto-generated base for PolyDb component.
Definition: PolyDbComponentAc.hpp:32
Svc::PolyDbComponentBase::m_setValue_InputPort
Svc::InputPolyPort m_setValue_InputPort[NUM_SETVALUE_INPUT_PORTS]
Definition: PolyDbComponentAc.hpp:210
FpConfig.hpp
ISF configuration file.
Svc::PolyDbComponentBase::val
PROTECTED U32 MeasurementStatus Fw::Time Fw::PolyType & val
Definition: PolyDbComponentAc.hpp:123
Fw::PolyType
Definition: PolyType.hpp:12
PolyType.hpp
Svc::InputPolyPort
Definition: PolyPortAc.hpp:36
Svc
Definition: ActiveLoggerComponentAc.cpp:22
Svc::PolyDbComponentBase::get_setValue_InputPort
Svc::InputPolyPort * get_setValue_InputPort(NATIVE_INT_TYPE portNum)
Definition: PolyDbComponentAc.cpp:36
Mutex.hpp
Time.hpp
Svc::PolyDbComponentBase::get_getValue_InputPort
Svc::InputPolyPort * get_getValue_InputPort(NATIVE_INT_TYPE portNum)
Definition: PolyDbComponentAc.cpp:29
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
Svc::PolyDbComponentBase::NUM_GETVALUE_INPUT_PORTS
@ NUM_GETVALUE_INPUT_PORTS
Definition: PolyDbComponentAc.hpp:187
Svc::PolyDbComponentBase::portNum
PRIVATE NATIVE_INT_TYPE portNum
Definition: PolyDbComponentAc.hpp:222
OutputSerializePort.hpp
Svc::PolyDbComponentBase::setValue_handlerBase
void setValue_handlerBase(NATIVE_INT_TYPE portNum, U32 entry, MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
Definition: PolyDbComponentAc.cpp:228