F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
PassThroughRouter.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PassThroughRouter.cpp
3 // \author kessler
4 // \brief cpp file for PassThroughRouter component implementation class
5 // ======================================================================
6 
8 
9 namespace Svc {
10 
11 // ----------------------------------------------------------------------
12 // Component construction and destruction
13 // ----------------------------------------------------------------------
14 
15 PassThroughRouter::PassThroughRouter(const char* const compName) : PassThroughRouterComponentBase(compName) {}
16 
18 
19 // ----------------------------------------------------------------------
20 // Handler implementations for typed input ports
21 // ----------------------------------------------------------------------
22 
23 void PassThroughRouter::allPacketsReturnIn_handler(FwIndexType portNum, Fw::Buffer& fwBuffer) {
24  ComCfg::FrameContext context = {}; // default context used to satisfy dataReturnOut port interface
25  this->dataReturnOut_out(0, fwBuffer, context);
26 }
27 
28 void PassThroughRouter::dataIn_handler(FwIndexType portNum,
29  Fw::Buffer& packetBuffer,
30  const ComCfg::FrameContext& context) {
31  // allPacketsOut must always be connected. Users needing a null-router should write one explicitly.
32  this->allPacketsOut_out(0, packetBuffer);
33 }
34 
35 } // namespace Svc
PassThroughRouter(const char *const compName)
Construct PassThroughRouter object.
void allPacketsOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port allPacketsOut.
~PassThroughRouter()
Destroy PassThroughRouter object.
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataReturnOut.
PlatformIndexType FwIndexType
Type used to pass context info between components during framing/deframing.
RateGroupDivider component implementation.
Auto-generated base for PassThroughRouter component.