F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
SdlsKeyPortAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title SdlsKeyPortAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for SdlsKey port
5 // ======================================================================
6 
7 #include "Fw/Types/Assert.hpp"
9 
10 namespace Svc {
11 
12  namespace Ccsds {
13 
14 #if !FW_DIRECT_PORT_CALLS
15 
16  // ----------------------------------------------------------------------
17  // Public constructors for InputSdlsKeyPort
18  // ----------------------------------------------------------------------
19 
22  Fw::InputPortBase(),
23  m_func(nullptr)
24  {
25 
26  }
27 
28  // ----------------------------------------------------------------------
29  // Public member functions for InputSdlsKeyPort
30  // ----------------------------------------------------------------------
31 
34  {
36  }
37 
40  Fw::PassiveComponentBase* callComp,
41  CompFuncPtr funcPtr
42  )
43  {
44  FW_ASSERT(callComp != nullptr);
45  FW_ASSERT(funcPtr != nullptr);
46 
47  this->m_comp = callComp;
48  this->m_func = funcPtr;
49  this->m_connObj = callComp;
50  }
51 
54  {
55 #if FW_PORT_TRACING == 1
56  this->trace();
57 #endif
58 
59  FW_ASSERT(this->m_comp != nullptr);
60  FW_ASSERT(this->m_func != nullptr);
61 
62  return this->m_func(this->m_comp, this->m_portNum, key);
63  }
64 
65  // ----------------------------------------------------------------------
66  // Private member functions for InputSdlsKeyPort
67  // ----------------------------------------------------------------------
68 
69 #if FW_PORT_SERIALIZATION == 1
70 
71  Fw::SerializeStatus InputSdlsKeyPort ::
72  invokeSerial(Fw::LinearBufferBase& _buffer)
73  {
74  // For ports with a return type, invokeSerial is not used
75  (void) _buffer;
76 
77  FW_ASSERT(false);
78  return Fw::FW_SERIALIZE_OK;
79  }
80 
81 #endif
82 
83  // ----------------------------------------------------------------------
84  // Public constructors for OutputSdlsKeyPort
85  // ----------------------------------------------------------------------
86 
89  Fw::OutputPortBase(),
90  m_port(nullptr)
91  {
92 
93  }
94 
95  // ----------------------------------------------------------------------
96  // Public member functions for OutputSdlsKeyPort
97  // ----------------------------------------------------------------------
98 
101  {
103  }
104 
107  {
108  FW_ASSERT(callPort != nullptr);
109 
110  this->m_port = callPort;
111  this->m_connObj = callPort;
112 
113 #if FW_PORT_SERIALIZATION == 1
114  this->m_serPort = nullptr;
115 #endif
116  }
117 
120  {
121 #if FW_PORT_TRACING == 1
122  this->trace();
123 #endif
124 
125  FW_ASSERT(this->m_port != nullptr);
126  return this->m_port->invoke(key);
127  }
128 
129 #endif
130 
131  }
132 
133 }
Serialization/Deserialization operation was successful.
FwIndexType m_portNum
Svc::Ccsds::SdlsStatus invoke(Svc::Ccsds::SdlsKeyBuffer &key)
Invoke a port interface.
void addCallPort(InputSdlsKeyPort *callPort)
Register an input port.
Status of an SDLS (Space Data Link Security) encryption/decryption request.
SerializeStatus
forward declaration for string
void init() override
void init()
Initialization function.
PassiveComponentBase * m_comp
void init() override
RateGroupDivider component implementation.
Svc::Ccsds::SdlsStatus invoke(Svc::Ccsds::SdlsKeyBuffer &key) const
Implementation of malloc based allocator.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Fw::ObjBase * m_connObj
Definition: PortBase.hpp:34
#define FW_ASSERT(...)
Definition: Assert.hpp:14
void init()
Initialization function.