F´ Flight Software - C/C++ Documentation  devel
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 "FpConfig.hpp"
14 #include "Fw/Buffer/Buffer.hpp"
18 #include "Fw/Types/StringType.hpp"
20 
21 namespace Fw {
22 
31  public Fw::InputPortBase
32  {
33 
34  public:
35 
36  // ----------------------------------------------------------------------
37  // Constants
38  // ----------------------------------------------------------------------
39 
40  enum {
43  sizeof(FwDpIdType) +
44  sizeof(FwSizeType) +
46  };
47 
48  public:
49 
50  // ----------------------------------------------------------------------
51  // Types
52  // ----------------------------------------------------------------------
53 
56  Fw::PassiveComponentBase* callComp,
57  FwIndexType portNum,
58  FwDpIdType id,
59  FwSizeType dataSize,
60  Fw::Buffer& buffer
61  );
62 
63  public:
64 
65  // ----------------------------------------------------------------------
66  // Input Port Member functions
67  // ----------------------------------------------------------------------
68 
71 
73  void init();
74 
76  void addCallComp(
77  Fw::PassiveComponentBase* callComp,
78  CompFuncPtr funcPtr
79  );
80 
83  FwDpIdType id,
84  FwSizeType dataSize,
85  Fw::Buffer& buffer
86  );
87 
88  private:
89 
90 #if FW_PORT_SERIALIZATION == 1
91 
93  Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
94 
95 #endif
96 
97  private:
98 
99  // ----------------------------------------------------------------------
100  // Member variables
101  // ----------------------------------------------------------------------
102 
104  CompFuncPtr m_func;
105 
106  };
107 
116  public Fw::OutputPortBase
117  {
118 
119  public:
120 
121  // ----------------------------------------------------------------------
122  // Output Port Member functions
123  // ----------------------------------------------------------------------
124 
126  OutputDpGetPort();
127 
129  void init();
130 
132  void addCallPort(
133  InputDpGetPort* callPort
134  );
135 
138  FwDpIdType id,
139  FwSizeType dataSize,
140  Fw::Buffer& buffer
141  );
142 
143  private:
144 
145  // ----------------------------------------------------------------------
146  // Member variables
147  // ----------------------------------------------------------------------
148 
150  InputDpGetPort* m_port;
151 
152  };
153 
154 }
155 
156 #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.
@ SERIALIZED_SIZE
Size of Fw::Buffer when serialized.
Definition: Buffer.hpp:48
void init()
Initialization function.
Definition: DpGetPortAc.cpp:26
InputDpGetPort()
Constructor.
Definition: DpGetPortAc.cpp:18
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: DpGetPortAc.cpp:32
Fw::Success invoke(FwDpIdType id, FwSizeType dataSize, Fw::Buffer &buffer)
Invoke a port interface.
Definition: DpGetPortAc.cpp:46
Fw::Success(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, FwDpIdType id, FwSizeType dataSize, Fw::Buffer &buffer)
The port callback function type.
Definition: DpGetPortAc.hpp:55
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
Definition: DpGetPortAc.hpp:42
OutputDpGetPort()
Constructor.
Definition: DpGetPortAc.cpp:81
Fw::Success invoke(FwDpIdType id, FwSizeType dataSize, Fw::Buffer &buffer)
Invoke a port interface.
void init()
Initialization function.
Definition: DpGetPortAc.cpp:89
void addCallPort(InputDpGetPort *callPort)
Register an input port.
Definition: DpGetPortAc.cpp:95
Success/Failure.
SerializeStatus
forward declaration for string