F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
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
13#include "FpConfig.hpp"
21
22namespace Svc {
23
28 {
29
30 public:
31
32 // ----------------------------------------------------------------------
33 // Constants
34 // ----------------------------------------------------------------------
35
36 enum {
42 };
43
44 public:
45
46 // ----------------------------------------------------------------------
47 // Types
48 // ----------------------------------------------------------------------
49
51 typedef void (*CompFuncPtr)(
53 FwIndexType portNum,
54 const Svc::VersionCfg::VersionEnum& version_id,
55 Fw::StringBase& version_string,
56 Svc::VersionStatus& status
57 );
58
59 public:
60
61 // ----------------------------------------------------------------------
62 // Input Port Member functions
63 // ----------------------------------------------------------------------
64
67
69 void init();
70
72 void addCallComp(
73 Fw::PassiveComponentBase* callComp,
74 CompFuncPtr funcPtr
75 );
76
78 void invoke(
79 const Svc::VersionCfg::VersionEnum& version_id,
80 Fw::StringBase& version_string,
81 Svc::VersionStatus& status
82 );
83
84 private:
85
86#if FW_PORT_SERIALIZATION == 1
87
89 Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
90
91#endif
92
93 private:
94
95 // ----------------------------------------------------------------------
96 // Member variables
97 // ----------------------------------------------------------------------
98
100 CompFuncPtr m_func;
101
102 };
103
107 public Fw::OutputPortBase
108 {
109
110 public:
111
112 // ----------------------------------------------------------------------
113 // Output Port Member functions
114 // ----------------------------------------------------------------------
115
118
120 void init();
121
123 void addCallPort(
124 InputVersionPort* callPort
125 );
126
128 void invoke(
129 const Svc::VersionCfg::VersionEnum& version_id,
130 Fw::StringBase& version_string,
131 Svc::VersionStatus& status
132 ) const;
133
134 private:
135
136 // ----------------------------------------------------------------------
137 // Member variables
138 // ----------------------------------------------------------------------
139
141 InputVersionPort* m_port;
142
143 };
144
145}
146
147#endif
PlatformIndexType FwIndexType
Definition FpConfig.h:25
C++-compatible configuration header for fprime configuration.
static constexpr SizeType STATIC_SERIALIZED_SIZE(SizeType maxLength)
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.
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
void init()
Initialization function.
InputVersionPort()
Constructor.
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.
void addCallPort(InputVersionPort *callPort)
Register an input port.
void init()
Initialization function.
void invoke(const Svc::VersionCfg::VersionEnum &version_id, Fw::StringBase &version_string, Svc::VersionStatus &status) const
Invoke a port interface.
OutputVersionPort()
Constructor.
@ SERIALIZED_SIZE
The size of the serial representation.
An enumeration for version status.
@ SERIALIZED_SIZE
The size of the serial representation.
SerializeStatus
forward declaration for string