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 <cstdio>
11 #include <cstring>
12 
13 #include "FpConfig.hpp"
18 #include "Fw/Types/StringType.hpp"
19 
20 namespace Fw {
21 
38  public Fw::InputPortBase
39  {
40 
41  public:
42 
43  // ----------------------------------------------------------------------
44  // Constants
45  // ----------------------------------------------------------------------
46 
47  enum {
50  };
51 
52  public:
53 
54  // ----------------------------------------------------------------------
55  // Types
56  // ----------------------------------------------------------------------
57 
59  typedef void (*CompFuncPtr)(
60  Fw::PassiveComponentBase* callComp,
61  FwIndexType portNum
62  );
63 
64  public:
65 
66  // ----------------------------------------------------------------------
67  // Input Port Member functions
68  // ----------------------------------------------------------------------
69 
72 
74  void init();
75 
77  void addCallComp(
78  Fw::PassiveComponentBase* callComp,
79  CompFuncPtr funcPtr
80  );
81 
83  void invoke();
84 
85  private:
86 
87 #if FW_PORT_SERIALIZATION == 1
88 
90  Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
91 
92 #endif
93 
94  private:
95 
96  // ----------------------------------------------------------------------
97  // Member variables
98  // ----------------------------------------------------------------------
99 
101  CompFuncPtr m_func;
102 
103  };
104 
121  public Fw::OutputPortBase
122  {
123 
124  public:
125 
126  // ----------------------------------------------------------------------
127  // Output Port Member functions
128  // ----------------------------------------------------------------------
129 
131  OutputReadyPort();
132 
134  void init();
135 
137  void addCallPort(
138  InputReadyPort* callPort
139  );
140 
142  void invoke() const;
143 
144  private:
145 
146  // ----------------------------------------------------------------------
147  // Member variables
148  // ----------------------------------------------------------------------
149 
151  InputReadyPort* m_port;
152 
153  };
154 
155 }
156 
157 #endif
void init()
Initialization function.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: ReadyPortAc.cpp:58
void init()
Initialization function.
Definition: ReadyPortAc.cpp:52
The size of the serial representations of the port arguments.
Definition: ReadyPortAc.hpp:49
PlatformIndexType FwIndexType
Definition: FpConfig.h:25
SerializeStatus
forward declaration for string
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum)
The port callback function type.
Definition: ReadyPortAc.hpp:59
void invoke()
Invoke a port interface.
Definition: ReadyPortAc.cpp:72
InputReadyPort()
Constructor.
Definition: ReadyPortAc.cpp:44
C++-compatible configuration header for fprime configuration.
OutputReadyPort()
Constructor.
void addCallPort(InputReadyPort *callPort)
Register an input port.
void invoke() const
Invoke a port interface.