F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DpResponsePortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DpResponsePortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for DpResponse port
5 // ======================================================================
6 
7 #ifndef Fw_DpResponsePortAc_HPP
8 #define Fw_DpResponsePortAc_HPP
9 
10 #include <cstdio>
11 #include <cstring>
12 
13 #include "Fw/Buffer/Buffer.hpp"
15 #include "Fw/FPrimeBasicTypes.hpp"
19 #include "Fw/Types/String.hpp"
22 
23 namespace Fw {
24 
28  public Fw::InputPortBase
29  {
30 
31  public:
32 
33  // ----------------------------------------------------------------------
34  // Constants
35  // ----------------------------------------------------------------------
36 
37  enum {
40  sizeof(FwDpIdType) +
43  };
44 
45  public:
46 
47  // ----------------------------------------------------------------------
48  // Types
49  // ----------------------------------------------------------------------
50 
52  typedef void (*CompFuncPtr)(
53  Fw::PassiveComponentBase* callComp,
54  FwIndexType portNum,
55  FwDpIdType id,
56  const Fw::Buffer& buffer,
57  const Fw::Success& status
58  );
59 
60  public:
61 
62  // ----------------------------------------------------------------------
63  // Input Port Member functions
64  // ----------------------------------------------------------------------
65 
68 
70  void init();
71 
73  void addCallComp(
74  Fw::PassiveComponentBase* callComp,
75  CompFuncPtr funcPtr
76  );
77 
79  void invoke(
80  FwDpIdType id,
81  const Fw::Buffer& buffer,
82  const Fw::Success& status
83  );
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 
108  public Fw::OutputPortBase
109  {
110 
111  public:
112 
113  // ----------------------------------------------------------------------
114  // Output Port Member functions
115  // ----------------------------------------------------------------------
116 
119 
121  void init();
122 
124  void addCallPort(
125  InputDpResponsePort* callPort
126  );
127 
129  void invoke(
130  FwDpIdType id,
131  const Fw::Buffer& buffer,
132  const Fw::Success& status
133  ) const;
134 
135  private:
136 
137  // ----------------------------------------------------------------------
138  // Member variables
139  // ----------------------------------------------------------------------
140 
142  InputDpResponsePort* m_port;
143 
144  };
145 
146 }
147 
148 #endif
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, FwDpIdType id, const Fw::Buffer &buffer, const Fw::Success &status)
The port callback function type.
InputDpResponsePort()
Constructor.
OutputDpResponsePort()
Constructor.
void addCallPort(InputDpResponsePort *callPort)
Register an input port.
U32 FwDpIdType
The type of a data product identifier.
void invoke(FwDpIdType id, const Fw::Buffer &buffer, const Fw::Success &status) const
Invoke a port interface.
SerializeStatus
forward declaration for string
The size of the serial representations of the port arguments.
void init()
Initialization function.
void init()
Initialization function.
Size of Fw::Buffer when serialized.
Definition: Buffer.hpp:50
The size of the serial representation.
void invoke(FwDpIdType id, const Fw::Buffer &buffer, const Fw::Success &status)
Invoke a port interface.
PlatformIndexType FwIndexType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Success/Failure.