F´ Flight Software - C/C++ Documentation
devel
A framework for building embedded system applications to NASA flight quality standards.
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
"
14
#include "
Fw/Comp/PassiveComponentBase.hpp
"
15
#include "
Fw/Port/InputPortBase.hpp
"
16
#include "
Fw/Port/OutputPortBase.hpp
"
17
#include "
Fw/Time/Time.hpp
"
18
#include "
Fw/Types/PolyType.hpp
"
19
#include "
Fw/Types/Serializable.hpp
"
20
#include "
Fw/Types/StringType.hpp
"
21
#include "
Svc/PolyIf/MeasurementStatusEnumAc.hpp
"
22
#include "
config/PolyDbEntryEnumAc.hpp
"
23
24
namespace
Svc
{
25
28
class
InputPolyPort
:
29
public
Fw::InputPortBase
30
{
31
32
public
:
33
34
// ----------------------------------------------------------------------
35
// Constants
36
// ----------------------------------------------------------------------
37
38
enum
{
40
SERIALIZED_SIZE
=
41
Svc::PolyDbCfg::PolyDbEntry::SERIALIZED_SIZE
+
42
Svc::MeasurementStatus::SERIALIZED_SIZE
+
43
Fw::Time::SERIALIZED_SIZE
+
44
Fw::PolyType::SERIALIZED_SIZE
45
};
46
47
public
:
48
49
// ----------------------------------------------------------------------
50
// Types
51
// ----------------------------------------------------------------------
52
54
typedef
void (*
CompFuncPtr
)(
55
Fw::PassiveComponentBase
* callComp,
56
FwIndexType
portNum,
57
const
Svc::PolyDbCfg::PolyDbEntry
& entry,
58
Svc::MeasurementStatus
& status,
59
Fw::Time
& time,
60
Fw::PolyType
& val
61
);
62
63
public
:
64
65
// ----------------------------------------------------------------------
66
// Input Port Member functions
67
// ----------------------------------------------------------------------
68
70
InputPolyPort
();
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,
84
Svc::MeasurementStatus
& status,
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
111
class
OutputPolyPort
:
112
public
Fw::OutputPortBase
113
{
114
115
public
:
116
117
// ----------------------------------------------------------------------
118
// Output Port Member functions
119
// ----------------------------------------------------------------------
120
122
OutputPolyPort
();
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
);
139
140
private
:
141
142
// ----------------------------------------------------------------------
143
// Member variables
144
// ----------------------------------------------------------------------
145
147
InputPolyPort
* m_port;
148
149
};
150
151
}
152
153
#endif
FwIndexType
PlatformIndexType FwIndexType
Definition:
FpConfig.h:25
FpConfig.hpp
C++-compatible configuration header for fprime configuration.
InputPortBase.hpp
MeasurementStatusEnumAc.hpp
OutputPortBase.hpp
PassiveComponentBase.hpp
PolyDbEntryEnumAc.hpp
PolyType.hpp
Serializable.hpp
StringType.hpp
Time.hpp
Fw::InputPortBase
Definition:
InputPortBase.hpp:12
Fw::OutputPortBase
Definition:
OutputPortBase.hpp:11
Fw::PassiveComponentBase
Definition:
PassiveComponentBase.hpp:10
Fw::PolyType
Definition:
PolyType.hpp:11
Fw::PolyType::SERIALIZED_SIZE
@ SERIALIZED_SIZE
stored serialized size
Definition:
PolyType.hpp:162
Fw::SerializeBufferBase
Definition:
Serializable.hpp:54
Fw::Time
Definition:
Time.hpp:9
Fw::Time::SERIALIZED_SIZE
@ SERIALIZED_SIZE
Definition:
Time.hpp:13
Svc::InputPolyPort
Definition:
PolyPortAc.hpp:30
Svc::InputPolyPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition:
PolyPortAc.cpp:62
Svc::InputPolyPort::init
void init()
Initialization function.
Definition:
PolyPortAc.cpp:56
Svc::InputPolyPort::CompFuncPtr
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.
Definition:
PolyPortAc.hpp:54
Svc::InputPolyPort::InputPolyPort
InputPolyPort()
Constructor.
Definition:
PolyPortAc.cpp:48
Svc::InputPolyPort::invoke
void invoke(const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
Invoke a port interface.
Definition:
PolyPortAc.cpp:76
Svc::InputPolyPort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
The size of the serial representations of the port arguments.
Definition:
PolyPortAc.hpp:40
Svc::MeasurementStatus
An enumeration for measurement status.
Definition:
MeasurementStatusEnumAc.hpp:19
Svc::MeasurementStatus::SERIALIZED_SIZE
@ SERIALIZED_SIZE
The size of the serial representation.
Definition:
MeasurementStatusEnumAc.hpp:51
Svc::OutputPolyPort
Definition:
PolyPortAc.hpp:113
Svc::OutputPolyPort::addCallPort
void addCallPort(InputPolyPort *callPort)
Register an input port.
Definition:
PolyPortAc.cpp:157
Svc::OutputPolyPort::OutputPolyPort
OutputPolyPort()
Constructor.
Definition:
PolyPortAc.cpp:143
Svc::OutputPolyPort::init
void init()
Initialization function.
Definition:
PolyPortAc.cpp:151
Svc::OutputPolyPort::invoke
void invoke(const Svc::PolyDbCfg::PolyDbEntry &entry, Svc::MeasurementStatus &status, Fw::Time &time, Fw::PolyType &val)
Invoke a port interface.
Definition:
PolyPortAc.cpp:170
Svc::PolyDbCfg::PolyDbEntry
Definition:
PolyDbEntryEnumAc.hpp:22
Svc::PolyDbCfg::PolyDbEntry::SERIALIZED_SIZE
@ SERIALIZED_SIZE
The size of the serial representation.
Definition:
PolyDbEntryEnumAc.hpp:66
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition:
Serializable.hpp:14
Svc
Definition:
ActiveRateGroupCfg.hpp:18
Svc
PolyIf
PolyPortAc.hpp
Generated by
1.9.1