F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
VersionPortAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title VersionPortAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Version port
5 // ======================================================================
6 
7 #ifndef Svc_VersionPortAc_HPP
8 #define Svc_VersionPortAc_HPP
9 
10 #include <cstdio>
11 #include <cstring>
12 
14 #include "Fw/FPrimeBasicTypes.hpp"
18 #include "Fw/Types/String.hpp"
22 
23 namespace Svc {
24 
28  public Fw::InputPortBase
29  {
30 
31  public:
32 
33  // ----------------------------------------------------------------------
34  // Constants
35  // ----------------------------------------------------------------------
36 
37  enum {
43  };
44 
45  public:
46 
47  // ----------------------------------------------------------------------
48  // Types
49  // ----------------------------------------------------------------------
50 
52  typedef void (*CompFuncPtr)(
53  Fw::PassiveComponentBase* callComp,
54  FwIndexType portNum,
55  const Svc::VersionCfg::VersionEnum& version_id,
56  Fw::StringBase& version_string,
57  Svc::VersionStatus& status
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  const Svc::VersionCfg::VersionEnum& version_id,
81  Fw::StringBase& version_string,
82  Svc::VersionStatus& status
83  );
84 
85  private:
86 
87 #if FW_PORT_SERIALIZATION == 1
88 
90  Fw::SerializeStatus invokeSerial(Fw::LinearBufferBase& _buffer);
91 
92 #endif
93 
94  private:
95 
96  // ----------------------------------------------------------------------
97  // Member variables
98  // ----------------------------------------------------------------------
99 
101  CompFuncPtr m_func;
102 
103  };
104 
108  public Fw::OutputPortBase
109  {
110 
111  public:
112 
113  // ----------------------------------------------------------------------
114  // Output Port Member functions
115  // ----------------------------------------------------------------------
116 
119 
121  void init();
122 
124  void addCallPort(
125  InputVersionPort* callPort
126  );
127 
129  void invoke(
130  const Svc::VersionCfg::VersionEnum& version_id,
131  Fw::StringBase& version_string,
132  Svc::VersionStatus& status
133  ) const;
134 
135  private:
136 
137  // ----------------------------------------------------------------------
138  // Member variables
139  // ----------------------------------------------------------------------
140 
142  InputVersionPort* m_port;
143 
144  };
145 
146 }
147 
148 #endif
void init()
Initialization function.
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, const Svc::VersionCfg::VersionEnum &version_id, Fw::StringBase &version_string, Svc::VersionStatus &status)
The port callback function type.
InputVersionPort()
Constructor.
The size of the serial representation.
void invoke(const Svc::VersionCfg::VersionEnum &version_id, Fw::StringBase &version_string, Svc::VersionStatus &status) const
Invoke a port interface.
SerializeStatus
forward declaration for string
An enumeration for version status.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void invoke(const Svc::VersionCfg::VersionEnum &version_id, Fw::StringBase &version_string, Svc::VersionStatus &status)
Invoke a port interface.
The size of the serial representations of the port arguments.
The size of the serial representation.
PlatformIndexType FwIndexType
RateGroupDivider component implementation.
void init()
Initialization function.
static constexpr SizeType STATIC_SERIALIZED_SIZE(SizeType maxLength)
void addCallPort(InputVersionPort *callPort)
Register an input port.
OutputVersionPort()
Constructor.