F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
PrmSetPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PrmSetPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for PrmSet port
5 // ======================================================================
6 
7 #ifndef Fw_PrmSetPortAc_HPP
8 #define Fw_PrmSetPortAc_HPP
9 
10 #include <cstdio>
11 #include <cstring>
12 
13 #include "FpConfig.hpp"
17 #include "Fw/Prm/ParamBuffer.hpp"
19 #include "Fw/Types/StringType.hpp"
20 
21 namespace Fw {
22 
26  public Fw::InputPortBase
27  {
28 
29  public:
30 
31  // ----------------------------------------------------------------------
32  // Constants
33  // ----------------------------------------------------------------------
34 
35  enum {
38  sizeof(FwPrmIdType) +
40  };
41 
42  public:
43 
44  // ----------------------------------------------------------------------
45  // Types
46  // ----------------------------------------------------------------------
47 
49  typedef void (*CompFuncPtr)(
50  Fw::PassiveComponentBase* callComp,
51  FwIndexType portNum,
52  FwPrmIdType id,
53  Fw::ParamBuffer& val
54  );
55 
56  public:
57 
58  // ----------------------------------------------------------------------
59  // Input Port Member functions
60  // ----------------------------------------------------------------------
61 
64 
66  void init();
67 
69  void addCallComp(
70  Fw::PassiveComponentBase* callComp,
71  CompFuncPtr funcPtr
72  );
73 
75  void invoke(
76  FwPrmIdType id,
77  Fw::ParamBuffer& val
78  );
79 
80  private:
81 
82 #if FW_PORT_SERIALIZATION == 1
83 
85  Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
86 
87 #endif
88 
89  private:
90 
91  // ----------------------------------------------------------------------
92  // Member variables
93  // ----------------------------------------------------------------------
94 
96  CompFuncPtr m_func;
97 
98  };
99 
103  public Fw::OutputPortBase
104  {
105 
106  public:
107 
108  // ----------------------------------------------------------------------
109  // Output Port Member functions
110  // ----------------------------------------------------------------------
111 
114 
116  void init();
117 
119  void addCallPort(
120  InputPrmSetPort* callPort
121  );
122 
124  void invoke(
125  FwPrmIdType id,
126  Fw::ParamBuffer& val
127  );
128 
129  private:
130 
131  // ----------------------------------------------------------------------
132  // Member variables
133  // ----------------------------------------------------------------------
134 
136  InputPrmSetPort* m_port;
137 
138  };
139 
140 }
141 
142 #endif
U32 FwPrmIdType
Definition: FpConfig.h:90
PlatformIndexType FwIndexType
Definition: FpConfig.h:20
C++-compatible configuration header for fprime configuration.
void invoke(FwPrmIdType id, Fw::ParamBuffer &val)
Invoke a port interface.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)
The port callback function type.
void init()
Initialization function.
InputPrmSetPort()
Constructor.
void addCallPort(InputPrmSetPort *callPort)
Register an input port.
OutputPrmSetPort()
Constructor.
void invoke(FwPrmIdType id, Fw::ParamBuffer &val)
Invoke a port interface.
void init()
Initialization function.
SerializeStatus
forward declaration for string