F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
DpGetPortAc.cpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title DpGetPortAc.cpp
3
// \author Generated by fpp-to-cpp
4
// \brief cpp file for DpGet port
5
// ======================================================================
6
7
#include "
F-Prime/Fw/Dp/DpGetPortAc.hpp
"
8
#include "
Fw/Types/Assert.hpp
"
9
#include "
Fw/Types/ExternalString.hpp
"
10
11
namespace
Fw
{
12
13
// ----------------------------------------------------------------------
14
// Input Port Member functions
15
// ----------------------------------------------------------------------
16
17
InputDpGetPort ::
18
InputDpGetPort() :
19
Fw
::
InputPortBase
(),
20
m_func(nullptr)
21
{
22
23
}
24
25
void
InputDpGetPort ::
26
init()
27
{
28
Fw::InputPortBase::init
();
29
}
30
31
void
InputDpGetPort ::
32
addCallComp(
33
Fw::PassiveComponentBase
* callComp,
34
CompFuncPtr funcPtr
35
)
36
{
37
FW_ASSERT
(callComp !=
nullptr
);
38
FW_ASSERT
(funcPtr !=
nullptr
);
39
40
this->m_comp = callComp;
41
this->m_func = funcPtr;
42
this->m_connObj = callComp;
43
}
44
45
Fw::Success
InputDpGetPort ::
46
invoke(
47
FwDpIdType
id
,
48
FwSizeType
dataSize,
49
Fw::Buffer
& buffer
50
)
51
{
52
#if FW_PORT_TRACING == 1
53
this->trace();
54
#endif
55
56
FW_ASSERT
(this->m_comp !=
nullptr
);
57
FW_ASSERT
(this->m_func !=
nullptr
);
58
59
return
this->m_func(this->m_comp, this->m_portNum,
id
, dataSize, buffer);
60
}
61
62
#if FW_PORT_SERIALIZATION == 1
63
64
Fw::SerializeStatus
InputDpGetPort ::
65
invokeSerial(
Fw::SerializeBufferBase
& _buffer)
66
{
67
// For ports with a return type, invokeSerial is not used
68
(void) _buffer;
69
70
FW_ASSERT
(0);
71
return
Fw::FW_SERIALIZE_OK
;
72
}
73
74
#endif
75
76
// ----------------------------------------------------------------------
77
// Output Port Member functions
78
// ----------------------------------------------------------------------
79
80
OutputDpGetPort ::
81
OutputDpGetPort() :
82
Fw
::
OutputPortBase
(),
83
m_port(nullptr)
84
{
85
86
}
87
88
void
OutputDpGetPort ::
89
init()
90
{
91
Fw::OutputPortBase::init
();
92
}
93
94
void
OutputDpGetPort ::
95
addCallPort(
InputDpGetPort
* callPort)
96
{
97
FW_ASSERT
(callPort !=
nullptr
);
98
99
this->m_port = callPort;
100
this->m_connObj = callPort;
101
102
#if FW_PORT_SERIALIZATION == 1
103
this->m_serPort =
nullptr
;
104
#endif
105
}
106
107
Fw::Success
OutputDpGetPort ::
108
invoke(
109
FwDpIdType
id
,
110
FwSizeType
dataSize,
111
Fw::Buffer
& buffer
112
)
const
113
{
114
#if FW_PORT_TRACING == 1
115
this->trace();
116
#endif
117
118
FW_ASSERT
(this->m_port !=
nullptr
);
119
return
this->m_port->invoke(
id
, dataSize, buffer);
120
}
121
122
}
Assert.hpp
FW_ASSERT
#define FW_ASSERT(...)
Definition
Assert.hpp:14
DpGetPortAc.hpp
ExternalString.hpp
FwDpIdType
U32 FwDpIdType
Definition
FpConfig.h:115
FwSizeType
PlatformSizeType FwSizeType
Definition
FpConfig.h:35
Fw::Buffer
Definition
Buffer.hpp:43
Fw::InputDpGetPort
Definition
DpGetPortAc.hpp:32
Fw::InputPortBase
Definition
InputPortBase.hpp:12
Fw::InputPortBase::init
virtual void init()
Definition
InputPortBase.cpp:18
Fw::OutputPortBase
Definition
OutputPortBase.hpp:11
Fw::OutputPortBase::init
virtual void init()
Definition
OutputPortBase.cpp:21
Fw::PassiveComponentBase
Definition
PassiveComponentBase.hpp:10
Fw::SerializeBufferBase
Definition
Serializable.hpp:54
Fw::Success
Success/Failure.
Definition
SuccessEnumAc.hpp:19
Fw
Definition
FppConstantsAc.hpp:121
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition
Serializable.hpp:14
Fw::FW_SERIALIZE_OK
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
Definition
Serializable.hpp:15
Fw
Dp
DpGetPortAc.cpp
Generated by
1.9.8