fprime/Svc/FprimeDeframer/FprimeDeframer.hpp
Thomas Boyer-Chammard c3b2e04880
Use data return pattern on Uplink and standardize port names (#3546)
* First pass at Svc + TcpClient implementation

* Revert FileUplink changes

* Add copy (with allocation/deallocation) to FprimeRouter to simplify buffer management

* Update FprimeRouter UTs

* Update FprimeDeframer UTs

* Update FrameAccumulator UTs

* Update ComStub UTs

* Update missing Drv and UTs

* Update ComInterface to use ComDataWithContext on output

* Update Ref/RPI topology

* Fix spelling

* Fix test typo

* Update Udp component and UTs

* Rename data ports and standardize "Return" naming pattern

* Fix variable name

* Adapt UTs

* Update Communication Adapter Interface docs

* Full SDD updates

* Spelling &  nits and details

* Put formatting back to original

* Update Deframer interface to include bufferReturn

* Address review comments
2025-05-08 10:54:54 -07:00

56 lines
1.9 KiB
C++

// ======================================================================
// \title FprimeDeframer.hpp
// \author thomas-bc
// \brief hpp file for FprimeDeframer component implementation class
// ======================================================================
#ifndef Svc_FprimeDeframer_HPP
#define Svc_FprimeDeframer_HPP
#include "Svc/FprimeDeframer/FprimeDeframerComponentAc.hpp"
#include "Utils/Hash/Hash.hpp"
namespace Svc {
class FprimeDeframer final : public FprimeDeframerComponentBase {
public:
// ----------------------------------------------------------------------
// Component construction and destruction
// ----------------------------------------------------------------------
//! Construct FprimeDeframer object
FprimeDeframer(const char* const compName //!< The component name
);
//! Destroy FprimeDeframer object
~FprimeDeframer();
PRIVATE:
// ----------------------------------------------------------------------
// Handler implementations for user-defined typed input ports
// ----------------------------------------------------------------------
//! Handler implementation for frame
//!
//! Port to receive framed data. The handler will strip the header and trailer from the frame
//! and pass the deframed data to the deframed output port.
void dataIn_handler(FwIndexType portNum, //!< The port number
Fw::Buffer& data,
const ComCfg::FrameContext& context) override;
//! Handler implementation for dataReturnIn
//!
//! Port receiving back ownership of sent frame buffers
void dataReturnIn_handler(FwIndexType portNum, //!< The port number
Fw::Buffer& data, //!< The buffer
const ComCfg::FrameContext& context) override;
};
} // namespace Svc
#endif