From 79cbb8a6a73ff907123e8190fbf056d4f2e2c1d1 Mon Sep 17 00:00:00 2001 From: Tiffany Chieu Date: Thu, 29 Jun 2023 12:06:49 -0700 Subject: [PATCH] Remove redundant serial connector function --- .../ComponentCppWriter/ComponentPorts.scala | 1 - .../component/ActiveSerialComponentAc.ref.cpp | 18 ------------------ .../component/ActiveSerialComponentAc.ref.hpp | 12 ------------ .../component/PassiveSerialComponentAc.ref.cpp | 18 ------------------ .../component/PassiveSerialComponentAc.ref.hpp | 12 ------------ .../component/QueuedSerialComponentAc.ref.cpp | 18 ------------------ .../component/QueuedSerialComponentAc.ref.hpp | 12 ------------ 7 files changed, 91 deletions(-) diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentPorts.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentPorts.scala index ff21d4057..f64816cde 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentPorts.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentPorts.scala @@ -32,7 +32,6 @@ case class ComponentPorts( inputPortWriter.getGetters(serialInputPorts), outputPortWriter.getTypedConnectors(specialOutputPorts), outputPortWriter.getTypedConnectors(typedOutputPorts), - outputPortWriter.getTypedConnectors(serialOutputPorts), outputPortWriter.getSerialConnectors(specialOutputPorts), outputPortWriter.getSerialConnectors(typedOutputPorts), outputPortWriter.getSerialConnectors(serialOutputPorts), diff --git a/compiler/tools/fpp-to-cpp/test/component/ActiveSerialComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/ActiveSerialComponentAc.ref.cpp index 9cc563cc3..15959100f 100644 --- a/compiler/tools/fpp-to-cpp/test/component/ActiveSerialComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/ActiveSerialComponentAc.ref.cpp @@ -1282,24 +1282,6 @@ void ActiveSerialComponentBase :: this->m_typedReturnOut_OutputPort[portNum].addCallPort(port); } -// ---------------------------------------------------------------------- -// Connect serial input ports to serial output ports -// ---------------------------------------------------------------------- - -void ActiveSerialComponentBase :: - set_serialOut_OutputPort( - NATIVE_INT_TYPE portNum, - Fw::InputSerializePort* port - ) -{ - FW_ASSERT( - portNum < this->getNum_serialOut_OutputPorts(), - static_cast(portNum) - ); - - this->m_serialOut_OutputPort[portNum].registerSerialPort(port); -} - #if FW_PORT_SERIALIZATION // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/ActiveSerialComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/ActiveSerialComponentAc.ref.hpp index d51df8649..4068d833f 100644 --- a/compiler/tools/fpp-to-cpp/test/component/ActiveSerialComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/ActiveSerialComponentAc.ref.hpp @@ -441,18 +441,6 @@ class ActiveSerialComponentBase : InputTypedReturnPort* port //!< The input port ); - public: - - // ---------------------------------------------------------------------- - // Connect serial input ports to serial output ports - // ---------------------------------------------------------------------- - - //! Connect port to serialOut[portNum] - void set_serialOut_OutputPort( - NATIVE_INT_TYPE portNum, //!< The port number - Fw::InputSerializePort* port //!< The input port - ); - #if FW_PORT_SERIALIZATION public: diff --git a/compiler/tools/fpp-to-cpp/test/component/PassiveSerialComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/PassiveSerialComponentAc.ref.cpp index f2f831688..10e92fb79 100644 --- a/compiler/tools/fpp-to-cpp/test/component/PassiveSerialComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/PassiveSerialComponentAc.ref.cpp @@ -876,24 +876,6 @@ void PassiveSerialComponentBase :: this->m_typedReturnOut_OutputPort[portNum].addCallPort(port); } -// ---------------------------------------------------------------------- -// Connect serial input ports to serial output ports -// ---------------------------------------------------------------------- - -void PassiveSerialComponentBase :: - set_serialOut_OutputPort( - NATIVE_INT_TYPE portNum, - Fw::InputSerializePort* port - ) -{ - FW_ASSERT( - portNum < this->getNum_serialOut_OutputPorts(), - static_cast(portNum) - ); - - this->m_serialOut_OutputPort[portNum].registerSerialPort(port); -} - #if FW_PORT_SERIALIZATION // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/PassiveSerialComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/PassiveSerialComponentAc.ref.hpp index c2bfde262..8f8009d5c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/PassiveSerialComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/PassiveSerialComponentAc.ref.hpp @@ -361,18 +361,6 @@ class PassiveSerialComponentBase : InputTypedReturnPort* port //!< The input port ); - public: - - // ---------------------------------------------------------------------- - // Connect serial input ports to serial output ports - // ---------------------------------------------------------------------- - - //! Connect port to serialOut[portNum] - void set_serialOut_OutputPort( - NATIVE_INT_TYPE portNum, //!< The port number - Fw::InputSerializePort* port //!< The input port - ); - #if FW_PORT_SERIALIZATION public: diff --git a/compiler/tools/fpp-to-cpp/test/component/QueuedSerialComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/QueuedSerialComponentAc.ref.cpp index 22c02f77e..3fb8c91a5 100644 --- a/compiler/tools/fpp-to-cpp/test/component/QueuedSerialComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/QueuedSerialComponentAc.ref.cpp @@ -1282,24 +1282,6 @@ void QueuedSerialComponentBase :: this->m_typedReturnOut_OutputPort[portNum].addCallPort(port); } -// ---------------------------------------------------------------------- -// Connect serial input ports to serial output ports -// ---------------------------------------------------------------------- - -void QueuedSerialComponentBase :: - set_serialOut_OutputPort( - NATIVE_INT_TYPE portNum, - Fw::InputSerializePort* port - ) -{ - FW_ASSERT( - portNum < this->getNum_serialOut_OutputPorts(), - static_cast(portNum) - ); - - this->m_serialOut_OutputPort[portNum].registerSerialPort(port); -} - #if FW_PORT_SERIALIZATION // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/component/QueuedSerialComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/QueuedSerialComponentAc.ref.hpp index 10778c3f2..3f80f81a8 100644 --- a/compiler/tools/fpp-to-cpp/test/component/QueuedSerialComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/QueuedSerialComponentAc.ref.hpp @@ -441,18 +441,6 @@ class QueuedSerialComponentBase : InputTypedReturnPort* port //!< The input port ); - public: - - // ---------------------------------------------------------------------- - // Connect serial input ports to serial output ports - // ---------------------------------------------------------------------- - - //! Connect port to serialOut[portNum] - void set_serialOut_OutputPort( - NATIVE_INT_TYPE portNum, //!< The port number - Fw::InputSerializePort* port //!< The input port - ); - #if FW_PORT_SERIALIZATION public: