F´ Flight Software - C/C++ Documentation
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 
14 #include "Fw/FPrimeBasicTypes.hpp"
18 #include "Fw/Types/String.hpp"
21 
22 namespace Fw {
23 
30  public Fw::InputPortBase
31  {
32 
33  public:
34 
35  // ----------------------------------------------------------------------
36  // Constants
37  // ----------------------------------------------------------------------
38 
39  enum {
42  sizeof(FwDpIdType) +
43  sizeof(FwSizeType)
44  };
45 
46  public:
47 
48  // ----------------------------------------------------------------------
49  // Types
50  // ----------------------------------------------------------------------
51 
53  typedef void (*CompFuncPtr)(
54  Fw::PassiveComponentBase* callComp,
55  FwIndexType portNum,
56  FwDpIdType id,
57  FwSizeType dataSize
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  FwSizeType dataSize
82  );
83 
84  private:
85 
86 #if FW_PORT_SERIALIZATION == 1
87 
89  Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
90 
91 #endif
92 
93  private:
94 
95  // ----------------------------------------------------------------------
96  // Member variables
97  // ----------------------------------------------------------------------
98 
100  CompFuncPtr m_func;
101 
102  };
103 
110  public Fw::OutputPortBase
111  {
112 
113  public:
114 
115  // ----------------------------------------------------------------------
116  // Output Port Member functions
117  // ----------------------------------------------------------------------
118 
121 
123  void init();
124 
126  void addCallPort(
127  InputDpRequestPort* callPort
128  );
129 
131  void invoke(
132  FwDpIdType id,
133  FwSizeType dataSize
134  ) const;
135 
136  private:
137 
138  // ----------------------------------------------------------------------
139  // Member variables
140  // ----------------------------------------------------------------------
141 
143  InputDpRequestPort* m_port;
144 
145  };
146 
147 }
148 
149 #endif
void invoke(FwDpIdType id, FwSizeType dataSize)
Invoke a port interface.
The size of the serial representations of the port arguments.
PlatformSizeType FwSizeType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void init()
Initialization function.
void addCallPort(InputDpRequestPort *callPort)
Register an input port.
SerializeStatus
forward declaration for string
OutputDpRequestPort()
Constructor.
InputDpRequestPort()
Constructor.
void invoke(FwDpIdType id, FwSizeType dataSize) const
Invoke a port interface.
void init()
Initialization function.
FwIdType FwDpIdType
The type of a data product identifier.
PlatformIndexType FwIndexType
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, FwDpIdType id, FwSizeType dataSize)
The port callback function type.