F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
DpRequestPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DpRequestPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for DpRequest port
5 // ======================================================================
6 
7 #ifndef Fw_DpRequestPortAc_HPP
8 #define Fw_DpRequestPortAc_HPP
9 
10 #include <cstdio>
11 #include <cstring>
12 
13 #include "FpConfig.hpp"
18 #include "Fw/Types/StringType.hpp"
19 
20 namespace Fw {
21 
28  public Fw::InputPortBase
29  {
30 
31  public:
32 
33  // ----------------------------------------------------------------------
34  // Constants
35  // ----------------------------------------------------------------------
36 
37  enum {
40  sizeof(FwDpIdType) +
41  sizeof(FwSizeType)
42  };
43 
44  public:
45 
46  // ----------------------------------------------------------------------
47  // Types
48  // ----------------------------------------------------------------------
49 
51  typedef void (*CompFuncPtr)(
52  Fw::PassiveComponentBase* callComp,
53  FwIndexType portNum,
54  FwDpIdType id,
55  FwSizeType dataSize
56  );
57 
58  public:
59 
60  // ----------------------------------------------------------------------
61  // Input Port Member functions
62  // ----------------------------------------------------------------------
63 
66 
68  void init();
69 
71  void addCallComp(
72  Fw::PassiveComponentBase* callComp,
73  CompFuncPtr funcPtr
74  );
75 
77  void invoke(
78  FwDpIdType id,
79  FwSizeType dataSize
80  );
81 
82  private:
83 
84 #if FW_PORT_SERIALIZATION == 1
85 
87  Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
88 
89 #endif
90 
91  private:
92 
93  // ----------------------------------------------------------------------
94  // Member variables
95  // ----------------------------------------------------------------------
96 
98  CompFuncPtr m_func;
99 
100  };
101 
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  InputDpRequestPort* callPort
126  );
127 
129  void invoke(
130  FwDpIdType id,
131  FwSizeType dataSize
132  );
133 
134  private:
135 
136  // ----------------------------------------------------------------------
137  // Member variables
138  // ----------------------------------------------------------------------
139 
141  InputDpRequestPort* m_port;
142 
143  };
144 
145 }
146 
147 #endif
U32 FwDpIdType
Definition: FpConfig.h:102
PlatformSizeType FwSizeType
Definition: FpConfig.h:30
PlatformIndexType FwIndexType
Definition: FpConfig.h:20
C++-compatible configuration header for fprime configuration.
void init()
Initialization function.
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
InputDpRequestPort()
Constructor.
void invoke(FwDpIdType id, FwSizeType dataSize)
Invoke a port interface.
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, FwDpIdType id, FwSizeType dataSize)
The port callback function type.
void init()
Initialization function.
void addCallPort(InputDpRequestPort *callPort)
Register an input port.
void invoke(FwDpIdType id, FwSizeType dataSize)
Invoke a port interface.
OutputDpRequestPort()
Constructor.
SerializeStatus
forward declaration for string