F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
SignalPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title SignalPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Signal port
5 // ======================================================================
6 
7 #ifndef Fw_SignalPortAc_HPP
8 #define Fw_SignalPortAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #if !FW_DIRECT_PORT_CALLS
16 #endif
17 
18 namespace Fw {
19 
24  {
25 
26  public:
27 
28  // ----------------------------------------------------------------------
29  // Public constants for SignalPortBuffer
30  // ----------------------------------------------------------------------
31 
34  static constexpr FwSizeType CAPACITY =
35  0;
36 
37  public:
38 
39  // ----------------------------------------------------------------------
40  // Public member functions for SignalPortBuffer
41  // ----------------------------------------------------------------------
42 
46  return CAPACITY;
47  }
48 
51  U8* getBuffAddr() override {
52  return nullptr;
53  }
54 
57  const U8* getBuffAddr() const override {
58  return nullptr;
59  }
60 
61  };
62 
63 #if !FW_DIRECT_PORT_CALLS
64 
68  public Fw::InputPortBase
69  {
70 
71  public:
72 
73  // ----------------------------------------------------------------------
74  // Public types for InputSignalPort
75  // ----------------------------------------------------------------------
76 
78  typedef void (*CompFuncPtr)(
79  Fw::PassiveComponentBase* callComp,
80  FwIndexType portNum
81  );
82 
83  public:
84 
85  // ----------------------------------------------------------------------
86  // Public constructors for InputSignalPort
87  // ----------------------------------------------------------------------
88 
91 
92  public:
93 
94  // ----------------------------------------------------------------------
95  // Public member functions for InputSignalPort
96  // ----------------------------------------------------------------------
97 
99  void init();
100 
102  void addCallComp(
103  Fw::PassiveComponentBase* callComp,
104  CompFuncPtr funcPtr
105  );
106 
108  void invoke();
109 
110  private:
111 
112  // ----------------------------------------------------------------------
113  // Private member functions for InputSignalPort
114  // ----------------------------------------------------------------------
115 
116 #if FW_PORT_SERIALIZATION == 1
117 
120  Fw::SerializeStatus invokeSerial(
121  Fw::LinearBufferBase& _buffer
122  );
123 
124 #endif
125 
126  private:
127 
128  // ----------------------------------------------------------------------
129  // Private member variables for InputSignalPort
130  // ----------------------------------------------------------------------
131 
133  CompFuncPtr m_func;
134 
135  };
136 
140  public Fw::OutputPortBase
141  {
142 
143  public:
144 
145  // ----------------------------------------------------------------------
146  // Public constructors for OutputSignalPort
147  // ----------------------------------------------------------------------
148 
151 
152  public:
153 
154  // ----------------------------------------------------------------------
155  // Public member functions for OutputSignalPort
156  // ----------------------------------------------------------------------
157 
159  void init();
160 
162  void addCallPort(
163  InputSignalPort* callPort
164  );
165 
167  void invoke() const;
168 
169  private:
170 
171  // ----------------------------------------------------------------------
172  // Private member variables for OutputSignalPort
173  // ----------------------------------------------------------------------
174 
176  InputSignalPort* m_port;
177 
178  };
179 
180 #endif
181 
182 }
183 
184 #endif
Fw::Serializable::SizeType getCapacity() const override
PlatformSizeType FwSizeType
const U8 * getBuffAddr() const override
SerializeStatus
forward declaration for string
OutputSignalPort()
Constructor.
void invoke()
Invoke a port interface.
U8 * getBuffAddr() override
void init()
Initialization function.
FwSizeType SizeType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum)
The port callback function type.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
void init()
Initialization function.
void invoke() const
Invoke a port connection.
void addCallPort(InputSignalPort *callPort)
Register an input port.
PlatformIndexType FwIndexType
InputSignalPort()
Constructor.
Implementation of malloc based allocator.
static constexpr FwSizeType CAPACITY