From fedb5570d52a4f9edc9b60c0afd52ef823761f63 Mon Sep 17 00:00:00 2001 From: Rob Bocchino Date: Tue, 4 Feb 2025 08:38:51 -0800 Subject: [PATCH] Revise test impl generation --- .../ComponentImplWriter.scala | 9 ++-- .../impl/ActiveGetProducts.template.ref.cpp | 49 ------------------- .../impl/ActiveGetProducts.template.ref.hpp | 36 -------------- .../impl/PassiveGetProducts.template.ref.cpp | 49 ------------------- .../impl/PassiveGetProducts.template.ref.hpp | 36 -------------- .../impl/QueuedGetProducts.template.ref.cpp | 49 ------------------- .../impl/QueuedGetProducts.template.ref.hpp | 36 -------------- 7 files changed, 6 insertions(+), 258 deletions(-) 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/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