25 void CcsdsSdlsFramer ::bufferReturnIn_handler(
FwIndexType portNum,
29 this->dataReturnOut_out(0, data, context);
33 if (this->isConnected_comStatusOut_OutputPort(portNum)) {
34 this->comStatusOut_out(portNum, condition);
42 if (saIndex == unsetSaIndex) {
44 saIndex = this->paramGet_SA_INDEX(valid);
46 static_cast<FwAssertArgType>(valid.
e));
53 this->encryptOut_out(0, saIndex, data, newContext);
56 void CcsdsSdlsFramer ::dataReturnIn_handler(
FwIndexType portNum,
60 this->bufferDeallocate_out(0, data);
63 void CcsdsSdlsFramer ::encryptIn_handler(
FwIndexType portNum,
68 this->log_WARNING_HI_EncryptionFailed(status);
70 this->encryptReturnOut_out(0, data, context);
71 this->sendComStatusOnDrop();
75 FW_ASSERT(data.
getSize() <= std::numeric_limits<Fw::Buffer::SizeType>::max() -
sizeof(U16),
76 static_cast<FwAssertArgType>(data.
getSize()));
80 Fw::Buffer frameBuffer = this->bufferAllocate_out(0, frameSize);
81 if ((!frameBuffer.
isValid()) || (frameBuffer.
getSize() < frameSize)) {
82 this->log_WARNING_HI_BufferAllocationFailed(frameSize);
85 this->bufferDeallocate_out(0, frameBuffer);
87 this->encryptReturnOut_out(0, data, context);
88 this->sendComStatusOnDrop();
102 this->encryptReturnOut_out(0, data, context);
103 this->dataOut_out(0, frameBuffer, context);
110 void CcsdsSdlsFramer ::sendComStatusOnDrop() {
112 if (this->isConnected_comStatusOut_OutputPort(0)) {
114 this->comStatusOut_out(0, status);
Serialization/Deserialization operation was successful.
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.