F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
PingPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PingPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Ping port
5 // ======================================================================
6 
7 #ifndef Svc_PingPortAc_HPP
8 #define Svc_PingPortAc_HPP
9 
10 #include <cstdio>
11 #include <cstring>
12 
13 #include "FpConfig.hpp"
18 #include "Fw/Types/StringType.hpp"
19 
20 namespace Svc {
21 
24  class InputPingPort :
25  public Fw::InputPortBase
26  {
27 
28  public:
29 
30  // ----------------------------------------------------------------------
31  // Constants
32  // ----------------------------------------------------------------------
33 
34  enum {
37  sizeof(U32)
38  };
39 
40  public:
41 
42  // ----------------------------------------------------------------------
43  // Types
44  // ----------------------------------------------------------------------
45 
47  typedef void (*CompFuncPtr)(
48  Fw::PassiveComponentBase* callComp,
49  FwIndexType portNum,
50  U32 key
51  );
52 
53  public:
54 
55  // ----------------------------------------------------------------------
56  // Input Port Member functions
57  // ----------------------------------------------------------------------
58 
60  InputPingPort();
61 
63  void init();
64 
66  void addCallComp(
67  Fw::PassiveComponentBase* callComp,
68  CompFuncPtr funcPtr
69  );
70 
72  void invoke(
73  U32 key
74  );
75 
76  private:
77 
78 #if FW_PORT_SERIALIZATION == 1
79 
81  Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
82 
83 #endif
84 
85  private:
86 
87  // ----------------------------------------------------------------------
88  // Member variables
89  // ----------------------------------------------------------------------
90 
92  CompFuncPtr m_func;
93 
94  };
95 
99  public Fw::OutputPortBase
100  {
101 
102  public:
103 
104  // ----------------------------------------------------------------------
105  // Output Port Member functions
106  // ----------------------------------------------------------------------
107 
109  OutputPingPort();
110 
112  void init();
113 
115  void addCallPort(
116  InputPingPort* callPort
117  );
118 
120  void invoke(
121  U32 key
122  );
123 
124  private:
125 
126  // ----------------------------------------------------------------------
127  // Member variables
128  // ----------------------------------------------------------------------
129 
131  InputPingPort* m_port;
132 
133  };
134 
135 }
136 
137 #endif
PlatformIndexType FwIndexType
Definition: FpConfig.h:25
C++-compatible configuration header for fprime configuration.
InputPingPort()
Constructor.
Definition: PingPortAc.cpp:48
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, U32 key)
The port callback function type.
Definition: PingPortAc.hpp:47
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: PingPortAc.cpp:62
void init()
Initialization function.
Definition: PingPortAc.cpp:56
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
Definition: PingPortAc.hpp:36
void invoke(U32 key)
Invoke a port interface.
Definition: PingPortAc.cpp:76
void invoke(U32 key)
Invoke a port interface.
Definition: PingPortAc.cpp:147
void init()
Initialization function.
Definition: PingPortAc.cpp:128
void addCallPort(InputPingPort *callPort)
Register an input port.
Definition: PingPortAc.cpp:134
OutputPingPort()
Constructor.
Definition: PingPortAc.cpp:120
SerializeStatus
forward declaration for string