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  U16 securityAssociationIndex,
56  )
57  {
58 #if FW_PORT_TRACING == 1
59  this->trace();
60 #endif
61 
62  FW_ASSERT(this->m_comp != nullptr);
63  FW_ASSERT(this->m_func != nullptr);
64 
65  return this->m_func(this->m_comp, this->m_portNum, securityAssociationIndex, key);
66  }
67 
68  // ----------------------------------------------------------------------
69  // Private member functions for InputSdlsKeyPort
70  // ----------------------------------------------------------------------
71 
72 #if FW_PORT_SERIALIZATION == 1
73 
74  Fw::SerializeStatus InputSdlsKeyPort ::
75  invokeSerial(Fw::LinearBufferBase& _buffer)
76  {
77  // For ports with a return type, invokeSerial is not used
78  (void) _buffer;
79 
80  FW_ASSERT(false);
81  return Fw::FW_SERIALIZE_OK;
82  }
83 
84 #endif
85 
86  // ----------------------------------------------------------------------
87  // Public constructors for OutputSdlsKeyPort
88  // ----------------------------------------------------------------------
89 
92  Fw::OutputPortBase(),
93  m_port(nullptr)
94  {
95 
96  }
97 
98  // ----------------------------------------------------------------------
99  // Public member functions for OutputSdlsKeyPort
100  // ----------------------------------------------------------------------
101 
104  {
106  }
107 
110  {
111  FW_ASSERT(callPort != nullptr);
112 
113  this->m_port = callPort;
114  this->m_connObj = callPort;
115 
116 #if FW_PORT_SERIALIZATION == 1
117  this->m_serPort = nullptr;
118 #endif
119  }
120 
123  U16 securityAssociationIndex,
125  ) const
126  {
127 #if FW_PORT_TRACING == 1
128  this->trace();
129 #endif
130 
131  FW_ASSERT(this->m_port != nullptr);
132  return this->m_port->invoke(securityAssociationIndex, key);
133  }
134 
135 #endif
136 
137  }
138 
139 }
Serialization/Deserialization operation was successful.
FwIndexType m_portNum
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
Svc::Ccsds::SdlsStatus invoke(U16 securityAssociationIndex, Svc::Ccsds::SdlsKeyBuffer &key)
Invoke a port interface.
void init()
Initialization function.
PassiveComponentBase * m_comp
void init() override
RateGroupDivider component implementation.
Svc::Ccsds::SdlsStatus invoke(U16 securityAssociationIndex, 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.