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 
57  ReadyPortBuffer() : Fw::LinearBufferBase(nullptr, 0) {
58 
59  }
60 
61  };
62 
63 #if !FW_DIRECT_PORT_CALLS
64 
81  public Fw::InputPortBase
82  {
83 
84  public:
85 
86  // ----------------------------------------------------------------------
87  // Public types for InputReadyPort
88  // ----------------------------------------------------------------------
89 
91  typedef void (*CompFuncPtr)(
92  Fw::PassiveComponentBase* callComp,
93  FwIndexType portNum
94  );
95 
96  public:
97 
98  // ----------------------------------------------------------------------
99  // Public constructors for InputReadyPort
100  // ----------------------------------------------------------------------
101 
103  InputReadyPort();
104 
105  public:
106 
107  // ----------------------------------------------------------------------
108  // Public member functions for InputReadyPort
109  // ----------------------------------------------------------------------
110 
112  void init();
113 
115  void addCallComp(
116  Fw::PassiveComponentBase* callComp,
117  CompFuncPtr funcPtr
118  );
119 
121  void invoke();
122 
123  private:
124 
125  // ----------------------------------------------------------------------
126  // Private member functions for InputReadyPort
127  // ----------------------------------------------------------------------
128 
129 #if FW_PORT_SERIALIZATION == 1
130 
133  Fw::SerializeStatus invokeSerial(
134  Fw::LinearBufferBase& _buffer
135  );
136 
137 #endif
138 
139  private:
140 
141  // ----------------------------------------------------------------------
142  // Private member variables for InputReadyPort
143  // ----------------------------------------------------------------------
144 
146  CompFuncPtr m_func;
147 
148  };
149 
166  public Fw::OutputPortBase
167  {
168 
169  public:
170 
171  // ----------------------------------------------------------------------
172  // Public constructors for OutputReadyPort
173  // ----------------------------------------------------------------------
174 
176  OutputReadyPort();
177 
178  public:
179 
180  // ----------------------------------------------------------------------
181  // Public member functions for OutputReadyPort
182  // ----------------------------------------------------------------------
183 
185  void init();
186 
188  void addCallPort(
189  InputReadyPort* callPort
190  );
191 
193  void invoke() const;
194 
195  private:
196 
197  // ----------------------------------------------------------------------
198  // Private member variables for OutputReadyPort
199  // ----------------------------------------------------------------------
200 
202  InputReadyPort* m_port;
203 
204  };
205 
206 #endif
207 
208 }
209 
210 #endif
void init()
Initialization function.
PlatformSizeType FwSizeType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: ReadyPortAc.cpp:37
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.
Definition: ReadyPortAc.hpp:91
void invoke()
Invoke a port interface.
Definition: ReadyPortAc.cpp:51
InputReadyPort()
Constructor.
Definition: ReadyPortAc.cpp:19
ReadyPortBuffer()
Constructor.
Definition: ReadyPortAc.hpp:57
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.