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
8#include "Fw/Types/Assert.hpp"
10
11namespace Fw {
12
13 // ----------------------------------------------------------------------
14 // Input Port Member functions
15 // ----------------------------------------------------------------------
16
17 InputDpGetPort ::
18 InputDpGetPort() :
20 m_func(nullptr)
21 {
22
23 }
24
25 void InputDpGetPort ::
26 init()
27 {
29 }
30
31 void InputDpGetPort ::
32 addCallComp(
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);
72 }
73
74#endif
75
76 // ----------------------------------------------------------------------
77 // Output Port Member functions
78 // ----------------------------------------------------------------------
79
80 OutputDpGetPort ::
81 OutputDpGetPort() :
83 m_port(nullptr)
84 {
85
86 }
87
88 void OutputDpGetPort ::
89 init()
90 {
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}
#define FW_ASSERT(...)
Definition Assert.hpp:14
U32 FwDpIdType
Definition FpConfig.h:115
PlatformSizeType FwSizeType
Definition FpConfig.h:35
virtual void init()
virtual void init()
Success/Failure.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.