F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
PolyPortAc.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title PolyPortAc.hpp
3// \author Generated by fpp-to-cpp
4// \brief hpp file for Poly port
5// ======================================================================
6
7#ifndef Svc_PolyPortAc_HPP
8#define Svc_PolyPortAc_HPP
9
10#include <cstdio>
11#include <cstring>
12
13#include "FpConfig.hpp"
17#include "Fw/Time/Time.hpp"
18#include "Fw/Types/PolyType.hpp"
23
24namespace Svc {
25
30 {
31
32 public:
33
34 // ----------------------------------------------------------------------
35 // Constants
36 // ----------------------------------------------------------------------
37
38 enum {
45 };
46
47 public:
48
49 // ----------------------------------------------------------------------
50 // Types
51 // ----------------------------------------------------------------------
52
54 typedef void (*CompFuncPtr)(
56 FwIndexType portNum,
57 const Svc::PolyDbCfg::PolyDbEntry& entry,
59 Fw::Time& time,
60 Fw::PolyType& val
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
82 void invoke(
83 const Svc::PolyDbCfg::PolyDbEntry& entry,
85 Fw::Time& time,
86 Fw::PolyType& val
87 );
88
89 private:
90
91#if FW_PORT_SERIALIZATION == 1
92
94 Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
95
96#endif
97
98 private:
99
100 // ----------------------------------------------------------------------
101 // Member variables
102 // ----------------------------------------------------------------------
103
105 CompFuncPtr m_func;
106
107 };
108
112 public Fw::OutputPortBase
113 {
114
115 public:
116
117 // ----------------------------------------------------------------------
118 // Output Port Member functions
119 // ----------------------------------------------------------------------
120
123
125 void init();
126
128 void addCallPort(
129 InputPolyPort* callPort
130 );
131
133 void invoke(
134 const Svc::PolyDbCfg::PolyDbEntry& entry,
135 Svc::MeasurementStatus& status,
136 Fw::Time& time,
137 Fw::PolyType& val
138 ) const;
139
140 private:
141
142 // ----------------------------------------------------------------------
143 // Member variables
144 // ----------------------------------------------------------------------
145
147 InputPolyPort* m_port;
148
149 };
150
151}
152
153#endif
PlatformIndexType FwIndexType
Definition FpConfig.h:25
C++-compatible configuration header for fprime configuration.
@ SERIALIZED_SIZE
stored serialized size
Definition PolyType.hpp:162
@ SERIALIZED_SIZE
Definition Time.hpp:13
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void init()
Initialization function.
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, FwIndexType portNum, const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
The port callback function type.
InputPolyPort()
Constructor.
void invoke(const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
Invoke a port interface.
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
An enumeration for measurement status.
@ SERIALIZED_SIZE
The size of the serial representation.
void addCallPort(InputPolyPort *callPort)
Register an input port.
OutputPolyPort()
Constructor.
void invoke(const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val) const
Invoke a port interface.
void init()
Initialization function.
@ SERIALIZED_SIZE
The size of the serial representation.
SerializeStatus
forward declaration for string