17 "Svc.Ccsds.SdlsSaIndexSize must match the prepended SA index");
31 void CcsdsSdlsFramer ::bufferReturnIn_handler(
FwIndexType portNum,
35 this->dataReturnOut_out(0, data, context);
39 if (this->isConnected_comStatusOut_OutputPort(portNum)) {
40 this->comStatusOut_out(portNum, condition);
48 if (saIndex == unsetSaIndex) {
50 saIndex = this->paramGet_SA_INDEX(valid);
58 this->encryptOut_out(0, saIndex, data, newContext);
61 void CcsdsSdlsFramer ::dataReturnIn_handler(
FwIndexType portNum,
65 this->bufferDeallocate_out(0, data);
68 void CcsdsSdlsFramer ::encryptIn_handler(
FwIndexType portNum,
73 this->log_WARNING_HI_EncryptionFailed(status);
75 this->encryptReturnOut_out(0, data, context);
76 this->sendComStatusOnDrop();
80 FW_ASSERT(data.
getSize() <= std::numeric_limits<Fw::Buffer::SizeType>::max() -
sizeof(U16),
81 static_cast<FwAssertArgType>(data.
getSize()));
85 Fw::Buffer frameBuffer = this->bufferAllocate_out(0, frameSize);
86 if ((!frameBuffer.
isValid()) || (frameBuffer.
getSize() < frameSize)) {
87 this->log_WARNING_HI_BufferAllocationFailed(frameSize);
90 this->bufferDeallocate_out(0, frameBuffer);
92 this->encryptReturnOut_out(0, data, context);
93 this->sendComStatusOnDrop();
104 frameBuffer.
setSize(frameSize);
107 this->encryptReturnOut_out(0, data, context);
108 this->dataOut_out(0, frameBuffer, context);
115 void CcsdsSdlsFramer ::sendComStatusOnDrop() {
117 if (this->isConnected_comStatusOut_OutputPort(0)) {
119 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.