diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala index 57fde61b5..59c03f037 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala @@ -46,7 +46,10 @@ case class ComponentDataProducts ( addAccessTagAndComment( "PROTECTED", "Handlers to implement for data products", - containersByName.map((id, container) => getDpRecvHandler(container.getName)), + productRequestPort match { + case None => Nil + case _ => containersByName.map((id, container) => getDpRecvHandler(container.getName)) + }, CppDoc.Lines.Hpp ) diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala index a8975176d..2fe5d3a80 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentImplWriter.scala @@ -155,9 +155,12 @@ case class ComponentImplWriter( addAccessTagAndComment( "PRIVATE", s"Handler implementations for data products", - containersByName.map( - (id, container) => getDpRecvHandler(container.getName, lines("// TODO")) - ) + productRequestPort match { + case None => Nil + case _ => containersByName.map( + (id, container) => getDpRecvHandler(container.getName, lines("// TODO")) + ) + } ) private def getDestructor: CppDoc.Class.Member = diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.hpp index abeb3e696..c72cb61c2 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.hpp @@ -1298,42 +1298,6 @@ class ActiveGetProductsComponentBase : Fw::Time timeTag = Fw::ZERO_TIME //!< The time tag ); - PROTECTED: - - // ---------------------------------------------------------------------- - // Handlers to implement for data products - // ---------------------------------------------------------------------- - - //! Receive a container of type Container1 - virtual void dpRecv_Container1_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container2 - virtual void dpRecv_Container2_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container3 - virtual void dpRecv_Container3_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container4 - virtual void dpRecv_Container4_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container5 - virtual void dpRecv_Container5_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - PROTECTED: // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.hpp index 7ce884773..b97d77853 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.hpp @@ -1063,42 +1063,6 @@ class PassiveGetProductsComponentBase : Fw::Time timeTag = Fw::ZERO_TIME //!< The time tag ); - PROTECTED: - - // ---------------------------------------------------------------------- - // Handlers to implement for data products - // ---------------------------------------------------------------------- - - //! Receive a container of type Container1 - virtual void dpRecv_Container1_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container2 - virtual void dpRecv_Container2_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container3 - virtual void dpRecv_Container3_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container4 - virtual void dpRecv_Container4_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container5 - virtual void dpRecv_Container5_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - PROTECTED: // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.hpp index eff431928..268ec397b 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.hpp @@ -1298,42 +1298,6 @@ class QueuedGetProductsComponentBase : Fw::Time timeTag = Fw::ZERO_TIME //!< The time tag ); - PROTECTED: - - // ---------------------------------------------------------------------- - // Handlers to implement for data products - // ---------------------------------------------------------------------- - - //! Receive a container of type Container1 - virtual void dpRecv_Container1_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container2 - virtual void dpRecv_Container2_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container3 - virtual void dpRecv_Container3_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container4 - virtual void dpRecv_Container4_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - - //! Receive a container of type Container5 - virtual void dpRecv_Container5_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) = 0; - PROTECTED: // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveGetProducts.template.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveGetProducts.template.ref.cpp index 66edcb337..5431c0611 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveGetProducts.template.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveGetProducts.template.ref.cpp @@ -176,52 +176,3 @@ void ActiveGetProducts :: { // TODO } - -// ---------------------------------------------------------------------- -// Handler implementations for data products -// ---------------------------------------------------------------------- - -void ActiveGetProducts :: - dpRecv_Container1_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void ActiveGetProducts :: - dpRecv_Container2_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void ActiveGetProducts :: - dpRecv_Container3_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void ActiveGetProducts :: - dpRecv_Container4_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void ActiveGetProducts :: - dpRecv_Container5_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveGetProducts.template.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveGetProducts.template.ref.hpp index 235f470b3..e3ffb2f2f 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/ActiveGetProducts.template.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/ActiveGetProducts.template.ref.hpp @@ -180,42 +180,6 @@ class ActiveGetProducts : const S& s //!< A struct ) override; - PRIVATE: - - // ---------------------------------------------------------------------- - // Handler implementations for data products - // ---------------------------------------------------------------------- - - //! Receive a container of type Container1 - void dpRecv_Container1_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container2 - void dpRecv_Container2_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container3 - void dpRecv_Container3_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container4 - void dpRecv_Container4_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container5 - void dpRecv_Container5_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - }; #endif diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/PassiveGetProducts.template.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/impl/PassiveGetProducts.template.ref.cpp index be9ad6a83..079dba19e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/PassiveGetProducts.template.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/PassiveGetProducts.template.ref.cpp @@ -110,52 +110,3 @@ void PassiveGetProducts :: { // TODO } - -// ---------------------------------------------------------------------- -// Handler implementations for data products -// ---------------------------------------------------------------------- - -void PassiveGetProducts :: - dpRecv_Container1_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void PassiveGetProducts :: - dpRecv_Container2_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void PassiveGetProducts :: - dpRecv_Container3_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void PassiveGetProducts :: - dpRecv_Container4_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void PassiveGetProducts :: - dpRecv_Container5_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/PassiveGetProducts.template.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/impl/PassiveGetProducts.template.ref.hpp index ec66b2e57..3045641de 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/PassiveGetProducts.template.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/PassiveGetProducts.template.ref.hpp @@ -117,42 +117,6 @@ class PassiveGetProducts : const S& s //!< A struct ) override; - PRIVATE: - - // ---------------------------------------------------------------------- - // Handler implementations for data products - // ---------------------------------------------------------------------- - - //! Receive a container of type Container1 - void dpRecv_Container1_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container2 - void dpRecv_Container2_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container3 - void dpRecv_Container3_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container4 - void dpRecv_Container4_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container5 - void dpRecv_Container5_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - }; #endif diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedGetProducts.template.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedGetProducts.template.ref.cpp index ae9ce0b59..0831cd89c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedGetProducts.template.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedGetProducts.template.ref.cpp @@ -176,52 +176,3 @@ void QueuedGetProducts :: { // TODO } - -// ---------------------------------------------------------------------- -// Handler implementations for data products -// ---------------------------------------------------------------------- - -void QueuedGetProducts :: - dpRecv_Container1_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void QueuedGetProducts :: - dpRecv_Container2_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void QueuedGetProducts :: - dpRecv_Container3_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void QueuedGetProducts :: - dpRecv_Container4_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} - -void QueuedGetProducts :: - dpRecv_Container5_handler( - DpContainer& container, - Fw::Success::T status - ) -{ - // TODO -} diff --git a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedGetProducts.template.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedGetProducts.template.ref.hpp index a3257d3c4..fb5ac1f05 100644 --- a/compiler/tools/fpp-to-cpp/test/component/impl/QueuedGetProducts.template.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/impl/QueuedGetProducts.template.ref.hpp @@ -180,42 +180,6 @@ class QueuedGetProducts : const S& s //!< A struct ) override; - PRIVATE: - - // ---------------------------------------------------------------------- - // Handler implementations for data products - // ---------------------------------------------------------------------- - - //! Receive a container of type Container1 - void dpRecv_Container1_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container2 - void dpRecv_Container2_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container3 - void dpRecv_Container3_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container4 - void dpRecv_Container4_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - - //! Receive a container of type Container5 - void dpRecv_Container5_handler( - DpContainer& container, //!< The container - Fw::Success::T status //!< The container status - ) override; - }; #endif