27 void CcsdsSdlsFramer ::bufferReturnIn_handler(
FwIndexType portNum,
31 this->dataReturnOut_out(0, data, context);
35 if (this->isConnected_comStatusOut_OutputPort(portNum)) {
36 this->comStatusOut_out(portNum, condition);
44 if (saIndex == unsetSaIndex) {
46 saIndex = this->paramGet_SA_INDEX(valid);
54 this->encryptOut_out(0, saIndex, data, newContext);
57 void CcsdsSdlsFramer ::dataReturnIn_handler(
FwIndexType portNum,
61 this->bufferDeallocate_out(0, data);
64 void CcsdsSdlsFramer ::encryptIn_handler(
FwIndexType portNum,
69 this->log_WARNING_HI_EncryptionFailed(status);
71 this->encryptReturnOut_out(0, data, context);
72 this->sendComStatusOnDrop();
76 FW_ASSERT(data.
getSize() <= std::numeric_limits<Fw::Buffer::SizeType>::max() -
sizeof(U16),
77 static_cast<FwAssertArgType>(data.
getSize()));
81 Fw::Buffer frameBuffer = this->bufferAllocate_out(0, frameSize);
82 if ((!frameBuffer.
isValid()) || (frameBuffer.
getSize() < frameSize)) {
83 this->log_WARNING_HI_BufferAllocationFailed(frameSize);
86 this->bufferDeallocate_out(0, frameBuffer);
88 this->encryptReturnOut_out(0, data, context);
89 this->sendComStatusOnDrop();
100 frameBuffer.
setSize(frameSize);
103 this->encryptReturnOut_out(0, data, context);
104 this->dataOut_out(0, frameBuffer, context);
111 void CcsdsSdlsFramer ::sendComStatusOnDrop() {
113 if (this->isConnected_comStatusOut_OutputPort(0)) {
115 this->comStatusOut_out(0, status);
Serialization/Deserialization operation was successful.
#define FW_PARAM_OK(paramValid)
CcsdsSdlsFramer(const char *const compName)
Construct CcsdsSdlsFramer object.
void setSize(FwSizeType size)
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
Status of an SDLS (Space Data Link Security) encryption/decryption request.
SerializeStatus
forward declaration for string
Omit length from serialization.
enum T e
The raw enum value.
FwSizeType getSize() const
U16 get_saIndex() const
Get member saIndex.
void set_saIndex(U16 saIndex)
Set member saIndex.
PlatformIndexType FwIndexType
FwSizeType SizeType
The size type for a buffer - for backwards compatibility.
Type used to pass context info between components during framing/deframing.
RateGroupDivider component implementation.
Enum representing parameter validity.
Request completed successfully.
ExternalSerializeBufferWithMemberCopy getSerializer()
~CcsdsSdlsFramer()
Destroy CcsdsSdlsFramer object.