F´ Flight Software - C/C++ Documentation devel
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"
22
23namespace Svc {
24
29 {
30
31 public:
32
33 // ----------------------------------------------------------------------
34 // Constants
35 // ----------------------------------------------------------------------
36
37 enum {
40 sizeof(U32) +
44 };
45
46 public:
47
48 // ----------------------------------------------------------------------
49 // Types
50 // ----------------------------------------------------------------------
51
53 typedef void (*CompFuncPtr)(
55 NATIVE_INT_TYPE portNum,
56 U32 entry,
58 Fw::Time& time,
59 Fw::PolyType& val
60 );
61
62 public:
63
64 // ----------------------------------------------------------------------
65 // Input Port Member functions
66 // ----------------------------------------------------------------------
67
70
72 void init();
73
75 void addCallComp(
76 Fw::PassiveComponentBase* callComp,
77 CompFuncPtr funcPtr
78 );
79
81 void invoke(
82 U32 entry,
84 Fw::Time& time,
85 Fw::PolyType& val
86 );
87
88 private:
89
90#if FW_PORT_SERIALIZATION == 1
91
93 Fw::SerializeStatus invokeSerial(Fw::SerializeBufferBase& _buffer);
94
95#endif
96
97 private:
98
99 // ----------------------------------------------------------------------
100 // Member variables
101 // ----------------------------------------------------------------------
102
104 CompFuncPtr m_func;
105
106 };
107
111 public Fw::OutputPortBase
112 {
113
114 public:
115
116 // ----------------------------------------------------------------------
117 // Output Port Member functions
118 // ----------------------------------------------------------------------
119
122
124 void init();
125
127 void addCallPort(
128 InputPolyPort* callPort
129 );
130
132 void invoke(
133 U32 entry,
134 Svc::MeasurementStatus& status,
135 Fw::Time& time,
136 Fw::PolyType& val
137 );
138
139 private:
140
141 // ----------------------------------------------------------------------
142 // Member variables
143 // ----------------------------------------------------------------------
144
146 InputPolyPort* m_port;
147
148 };
149
150}
151
152#endif
PlatformIntType NATIVE_INT_TYPE
Definition BasicTypes.h:51
C++-compatible configuration header for fprime configuration.
Declares ISF string base class.
@ SERIALIZED_SIZE
stored serialized size
Definition PolyType.hpp:165
@ SERIALIZED_SIZE
Definition Time.hpp:13
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void init()
Initialization function.
InputPolyPort()
Constructor.
void invoke(U32 entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
Invoke a port interface.
void(* CompFuncPtr)(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, U32 entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
The port callback function type.
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(U32 entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
Invoke a port interface.
void init()
Initialization function.
SerializeStatus
forward declaration for string