F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ReadyPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ReadyPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Ready port
5 // ======================================================================
6 
7 #ifndef Fw_ReadyPortAc_HPP
8 #define Fw_ReadyPortAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #if !FW_DIRECT_PORT_CALLS
16 #endif
17 
18 namespace Fw {
19 
37  {
38 
39  public:
40 
41  // ----------------------------------------------------------------------
42  // Public constants for ReadyPortBuffer
43  // ----------------------------------------------------------------------
44 
47  static constexpr FwSizeType CAPACITY =
48  0;
49 
50  public:
51 
52  // ----------------------------------------------------------------------
53  // Public member functions for ReadyPortBuffer
54  // ----------------------------------------------------------------------
55 
59  return CAPACITY;
60  }
61 
64  U8* getBuffAddr() override {
65  return nullptr;
66  }
67 
70  const U8* getBuffAddr() const override {
71  return nullptr;
72  }
73 
74  };
75 
76 #if !FW_DIRECT_PORT_CALLS
77 
94  public Fw::InputPortBase
95  {
96 
97  public:
98 
99  // ----------------------------------------------------------------------
100  // Public types for InputReadyPort
101  // ----------------------------------------------------------------------
102 
104  typedef void (*CompFuncPtr)(
105  Fw::PassiveComponentBase* callComp,
106  FwIndexType portNum
107  );
108 
109  public:
110 
111  // ----------------------------------------------------------------------
112  // Public constructors for InputReadyPort
113  // ----------------------------------------------------------------------
114 
116  InputReadyPort();
117 
118  public:
119 
120  // ----------------------------------------------------------------------
121  // Public member functions for InputReadyPort
122  // ----------------------------------------------------------------------
123 
125  void init();
126 
128  void addCallComp(
129  Fw::PassiveComponentBase* callComp,
130  CompFuncPtr funcPtr
131  );
132 
134  void invoke();
135 
136  private:
137 
138  // ----------------------------------------------------------------------
139  // Private member functions for InputReadyPort
140  // ----------------------------------------------------------------------
141 
142 #if FW_PORT_SERIALIZATION == 1
143 
146  Fw::SerializeStatus invokeSerial(
147  Fw::LinearBufferBase& _buffer
148  );
149 
150 #endif
151 
152  private:
153 
154  // ----------------------------------------------------------------------
155  // Private member variables for InputReadyPort
156  // ----------------------------------------------------------------------
157 
159  CompFuncPtr m_func;
160 
161  };
162 
179  public Fw::OutputPortBase
180  {
181 
182  public:
183 
184  // ----------------------------------------------------------------------
185  // Public constructors for OutputReadyPort
186  // ----------------------------------------------------------------------
187 
189  OutputReadyPort();
190 
191  public:
192 
193  // ----------------------------------------------------------------------
194  // Public member functions for OutputReadyPort
195  // ----------------------------------------------------------------------
196 
198  void init();
199 
201  void addCallPort(
202  InputReadyPort* callPort
203  );
204 
206  void invoke() const;
207 
208  private:
209 
210  // ----------------------------------------------------------------------
211  // Private member variables for OutputReadyPort
212  // ----------------------------------------------------------------------
213 
215  InputReadyPort* m_port;
216 
217  };
218 
219 #endif
220 
221 }
222 
223 #endif
void init()
Initialization function.
PlatformSizeType FwSizeType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: ReadyPortAc.cpp:37
U8 * getBuffAddr() override
Definition: ReadyPortAc.hpp:64
void init()
Initialization function.
Definition: ReadyPortAc.cpp:31
static constexpr FwSizeType CAPACITY
Definition: ReadyPortAc.hpp:47
SerializeStatus
forward declaration for string
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum)
The port callback function type.
void invoke()
Invoke a port interface.
Definition: ReadyPortAc.cpp:51
FwSizeType SizeType
const U8 * getBuffAddr() const override
Definition: ReadyPortAc.hpp:70
InputReadyPort()
Constructor.
Definition: ReadyPortAc.cpp:19
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
PlatformIndexType FwIndexType
OutputReadyPort()
Constructor.
Definition: ReadyPortAc.cpp:93
void addCallPort(InputReadyPort *callPort)
Register an input port.
Implementation of malloc based allocator.
void invoke() const
Invoke a port connection.
Fw::Serializable::SizeType getCapacity() const override
Definition: ReadyPortAc.hpp:58