F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DpGetPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DpGetPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for DpGet port
5 // ======================================================================
6 
7 #ifndef Fw_DpGetPortAc_HPP
8 #define Fw_DpGetPortAc_HPP
9 
10 #include <cstdio>
11 #include <cstring>
12 
13 #include "Fw/Buffer/Buffer.hpp"
15 #include "Fw/FPrimeBasicTypes.hpp"
18 #include "Fw/Types/String.hpp"
22 
23 namespace Fw {
24 
33  public Fw::InputPortBase
34  {
35 
36  public:
37 
38  // ----------------------------------------------------------------------
39  // Constants
40  // ----------------------------------------------------------------------
41 
42  enum {
45  sizeof(FwDpIdType) +
46  sizeof(FwSizeType) +
48  };
49 
50  public:
51 
52  // ----------------------------------------------------------------------
53  // Types
54  // ----------------------------------------------------------------------
55 
58  Fw::PassiveComponentBase* callComp,
59  FwIndexType portNum,
60  FwDpIdType id,
61  FwSizeType dataSize,
62  Fw::Buffer& buffer
63  );
64 
65  public:
66 
67  // ----------------------------------------------------------------------
68  // Input Port Member functions
69  // ----------------------------------------------------------------------
70 
73 
75  void init();
76 
78  void addCallComp(
79  Fw::PassiveComponentBase* callComp,
80  CompFuncPtr funcPtr
81  );
82 
85  FwDpIdType id,
86  FwSizeType dataSize,
87  Fw::Buffer& buffer
88  );
89 
90  private:
91 
92 #if FW_PORT_SERIALIZATION == 1
93 
95  Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
96 
97 #endif
98 
99  private:
100 
101  // ----------------------------------------------------------------------
102  // Member variables
103  // ----------------------------------------------------------------------
104 
106  CompFuncPtr m_func;
107 
108  };
109 
118  public Fw::OutputPortBase
119  {
120 
121  public:
122 
123  // ----------------------------------------------------------------------
124  // Output Port Member functions
125  // ----------------------------------------------------------------------
126 
128  OutputDpGetPort();
129 
131  void init();
132 
134  void addCallPort(
135  InputDpGetPort* callPort
136  );
137 
140  FwDpIdType id,
141  FwSizeType dataSize,
142  Fw::Buffer& buffer
143  ) const;
144 
145  private:
146 
147  // ----------------------------------------------------------------------
148  // Member variables
149  // ----------------------------------------------------------------------
150 
152  InputDpGetPort* m_port;
153 
154  };
155 
156 }
157 
158 #endif
PlatformSizeType FwSizeType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: DpGetPortAc.cpp:32
Fw::Success(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, FwDpIdType id, FwSizeType dataSize, Fw::Buffer &buffer)
The port callback function type.
Definition: DpGetPortAc.hpp:57
U32 FwDpIdType
The type of a data product identifier.
Fw::Success invoke(FwDpIdType id, FwSizeType dataSize, Fw::Buffer &buffer)
Invoke a port interface.
Definition: DpGetPortAc.cpp:46
SerializeStatus
forward declaration for string
InputDpGetPort()
Constructor.
Definition: DpGetPortAc.cpp:18
OutputDpGetPort()
Constructor.
Definition: DpGetPortAc.cpp:81
The size of the serial representations of the port arguments.
Definition: DpGetPortAc.hpp:44
Fw::Success invoke(FwDpIdType id, FwSizeType dataSize, Fw::Buffer &buffer) const
Invoke a port interface.
PlatformIndexType FwIndexType
void addCallPort(InputDpGetPort *callPort)
Register an input port.
Definition: DpGetPortAc.cpp:95
Size of Fw::Buffer when serialized.
Definition: Buffer.hpp:50
void init()
Initialization function.
Definition: DpGetPortAc.cpp:89
Success/Failure.
void init()
Initialization function.
Definition: DpGetPortAc.cpp:26