From 05e30d98c602f2552b0c2d332a0c4cdd978b3a83 Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Mon, 11 Dec 2023 09:40:57 -0800 Subject: [PATCH 1/9] Revise generated code for dp tests --- .../TestWriter/ComponentGTestBaseWriter.scala | 10 ++++++++-- .../test-base/ActiveAsyncProductsGTestBase.ref.cpp | 2 ++ .../test-base/ActiveAsyncProductsGTestBase.ref.hpp | 5 +++-- .../test-base/ActiveGetProductsGTestBase.ref.cpp | 2 ++ .../test-base/ActiveGetProductsGTestBase.ref.hpp | 5 +++-- .../test-base/ActiveGuardedProductsGTestBase.ref.cpp | 2 ++ .../test-base/ActiveGuardedProductsGTestBase.ref.hpp | 5 +++-- .../test-base/ActiveSyncProductsGTestBase.ref.cpp | 2 ++ .../test-base/ActiveSyncProductsGTestBase.ref.hpp | 5 +++-- .../component/test-base/ActiveTestGTestBase.ref.cpp | 2 ++ .../component/test-base/ActiveTestGTestBase.ref.hpp | 5 +++-- .../test-base/PassiveGetProductsGTestBase.ref.cpp | 2 ++ .../test-base/PassiveGetProductsGTestBase.ref.hpp | 5 +++-- .../test-base/PassiveGuardedProductsGTestBase.ref.cpp | 2 ++ .../test-base/PassiveGuardedProductsGTestBase.ref.hpp | 5 +++-- .../test-base/PassiveSyncProductsGTestBase.ref.cpp | 2 ++ .../test-base/PassiveSyncProductsGTestBase.ref.hpp | 5 +++-- .../component/test-base/PassiveTestGTestBase.ref.cpp | 2 ++ .../component/test-base/PassiveTestGTestBase.ref.hpp | 5 +++-- .../test-base/QueuedAsyncProductsGTestBase.ref.cpp | 2 ++ .../test-base/QueuedAsyncProductsGTestBase.ref.hpp | 5 +++-- .../test-base/QueuedGetProductsGTestBase.ref.cpp | 2 ++ .../test-base/QueuedGetProductsGTestBase.ref.hpp | 5 +++-- .../test-base/QueuedGuardedProductsGTestBase.ref.cpp | 2 ++ .../test-base/QueuedGuardedProductsGTestBase.ref.hpp | 5 +++-- .../test-base/QueuedSyncProductsGTestBase.ref.cpp | 2 ++ .../test-base/QueuedSyncProductsGTestBase.ref.hpp | 5 +++-- .../component/test-base/QueuedTestGTestBase.ref.cpp | 2 ++ .../component/test-base/QueuedTestGTestBase.ref.hpp | 5 +++-- 29 files changed, 78 insertions(+), 30 deletions(-) diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentGTestBaseWriter.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentGTestBaseWriter.scala index 57bf2b76e..f66193968 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentGTestBaseWriter.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentGTestBaseWriter.scala @@ -289,8 +289,8 @@ case class ComponentGTestBaseWriter( """#define ASSERT_PRODUCT_SEND_SIZE(size) \ | this->assertProductSend_size(__FILE__, __LINE__, size) | - |#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - | assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) + |#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + | assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) |""" ) ) @@ -838,6 +838,11 @@ case class ComponentGTestBaseWriter( "userData", Some("The expected user data (input)") ), + CppDoc.Function.Param( + CppDoc.Type("Fw::DpState"), + "dpState", + Some("The expected data product state (input)") + ), CppDoc.Function.Param( CppDoc.Type("FwSizeType"), "dataSize", @@ -880,6 +885,7 @@ case class ComponentGTestBaseWriter( | timeTag, | procType, | userData, + | dpState, | dataSize |); |""" diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.cpp index ea69dc71a..d0b5d7563 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.cpp @@ -188,6 +188,7 @@ void ActiveAsyncProductsGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -221,6 +222,7 @@ void ActiveAsyncProductsGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.hpp index a2a89a64c..bc402fb67 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class ActiveAsyncProductsGTestBase //! \brief Auto-generated base for ActiveAsyncProducts component Google Test harness @@ -324,6 +324,7 @@ class ActiveAsyncProductsGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.cpp index b97bbb851..99600100f 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.cpp @@ -188,6 +188,7 @@ void ActiveGetProductsGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -221,6 +222,7 @@ void ActiveGetProductsGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.hpp index 271e942ce..7fcee9d6e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class ActiveGetProductsGTestBase //! \brief Auto-generated base for ActiveGetProducts component Google Test harness @@ -324,6 +324,7 @@ class ActiveGetProductsGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.cpp index e682561b4..60cb64254 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.cpp @@ -188,6 +188,7 @@ void ActiveGuardedProductsGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -221,6 +222,7 @@ void ActiveGuardedProductsGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.hpp index dc2c40d60..2194dab38 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class ActiveGuardedProductsGTestBase //! \brief Auto-generated base for ActiveGuardedProducts component Google Test harness @@ -324,6 +324,7 @@ class ActiveGuardedProductsGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.cpp index badb232c8..24ed00a28 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.cpp @@ -188,6 +188,7 @@ void ActiveSyncProductsGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -221,6 +222,7 @@ void ActiveSyncProductsGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.hpp index 0b2f1c17c..c09f46930 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class ActiveSyncProductsGTestBase //! \brief Auto-generated base for ActiveSyncProducts component Google Test harness @@ -324,6 +324,7 @@ class ActiveSyncProductsGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.cpp index 1d6c95409..e3f9baf2a 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.cpp @@ -1020,6 +1020,7 @@ namespace M { const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -1053,6 +1054,7 @@ namespace M { timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.hpp index a43e3ccdf..b8e980f32 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.hpp @@ -336,8 +336,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) namespace M { @@ -758,6 +758,7 @@ namespace M { const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.cpp index ae3cc1771..bee6564e1 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.cpp @@ -188,6 +188,7 @@ void PassiveGetProductsGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -221,6 +222,7 @@ void PassiveGetProductsGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.hpp index d41902ef3..788b6968f 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class PassiveGetProductsGTestBase //! \brief Auto-generated base for PassiveGetProducts component Google Test harness @@ -324,6 +324,7 @@ class PassiveGetProductsGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.cpp index cc99791e0..144bda4ec 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.cpp @@ -188,6 +188,7 @@ void PassiveGuardedProductsGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -221,6 +222,7 @@ void PassiveGuardedProductsGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.hpp index 7e1778b15..6f33a6078 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class PassiveGuardedProductsGTestBase //! \brief Auto-generated base for PassiveGuardedProducts component Google Test harness @@ -324,6 +324,7 @@ class PassiveGuardedProductsGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.cpp index 1b960fa8f..b8d994409 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.cpp @@ -188,6 +188,7 @@ void PassiveSyncProductsGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -221,6 +222,7 @@ void PassiveSyncProductsGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.hpp index 946f19fa2..6d612b676 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class PassiveSyncProductsGTestBase //! \brief Auto-generated base for PassiveSyncProducts component Google Test harness @@ -324,6 +324,7 @@ class PassiveSyncProductsGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.cpp index bbca1d795..c60eac581 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.cpp @@ -1018,6 +1018,7 @@ void PassiveTestGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -1051,6 +1052,7 @@ void PassiveTestGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.hpp index eda9db33f..d8bd72716 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.hpp @@ -336,8 +336,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class PassiveTestGTestBase //! \brief Auto-generated base for PassiveTest component Google Test harness @@ -756,6 +756,7 @@ class PassiveTestGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.cpp index 8e47a55c0..26f1ac6c2 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.cpp @@ -188,6 +188,7 @@ void QueuedAsyncProductsGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -221,6 +222,7 @@ void QueuedAsyncProductsGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.hpp index 3150ff35b..9945080f2 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class QueuedAsyncProductsGTestBase //! \brief Auto-generated base for QueuedAsyncProducts component Google Test harness @@ -324,6 +324,7 @@ class QueuedAsyncProductsGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.cpp index a82652684..c649a37bd 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.cpp @@ -188,6 +188,7 @@ void QueuedGetProductsGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -221,6 +222,7 @@ void QueuedGetProductsGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.hpp index 75ea3145f..4d8fd2c0d 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class QueuedGetProductsGTestBase //! \brief Auto-generated base for QueuedGetProducts component Google Test harness @@ -324,6 +324,7 @@ class QueuedGetProductsGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.cpp index 5cdbea27c..1412f398d 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.cpp @@ -188,6 +188,7 @@ void QueuedGuardedProductsGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -221,6 +222,7 @@ void QueuedGuardedProductsGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.hpp index bfac9faeb..af635d0f5 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class QueuedGuardedProductsGTestBase //! \brief Auto-generated base for QueuedGuardedProducts component Google Test harness @@ -324,6 +324,7 @@ class QueuedGuardedProductsGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.cpp index dd7a51103..3b2c5f1c3 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.cpp @@ -188,6 +188,7 @@ void QueuedSyncProductsGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -221,6 +222,7 @@ void QueuedSyncProductsGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.hpp index feccb50fe..635cb3c63 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class QueuedSyncProductsGTestBase //! \brief Auto-generated base for QueuedSyncProducts component Google Test harness @@ -324,6 +324,7 @@ class QueuedSyncProductsGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.cpp index 8c74c9ecf..dd58061c7 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.cpp @@ -1018,6 +1018,7 @@ void QueuedTestGTestBase :: const Fw::Time& timeTag, Fw::DpCfg::ProcType procType, const Fw::DpContainer::Header::UserData& userData, + Fw::DpState dpState, FwSizeType dataSize, Fw::Buffer& historyBuffer ) const @@ -1051,6 +1052,7 @@ void QueuedTestGTestBase :: timeTag, procType, userData, + dpState, dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.hpp index 1d56decf2..87f42aace 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.hpp @@ -336,8 +336,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) //! \class QueuedTestGTestBase //! \brief Auto-generated base for QueuedTest component Google Test harness @@ -756,6 +756,7 @@ class QueuedTestGTestBase : const Fw::Time& timeTag, //!< The expected time tag (input) Fw::DpCfg::ProcType procType, //!< The expected processing type (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) + Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) Fw::Buffer& historyBuffer //!< The buffer from the history (output) ) const; From 95ca01fb9508195b5f09effcd873ee0d6feb27c3 Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Mon, 11 Dec 2023 14:24:26 -0800 Subject: [PATCH 2/9] Fix issues with running fpp-to-json tests Some errors were returning status zero --- compiler/tools/fpp-to-json/test/run | 62 ++++++++++++----------------- 1 file changed, 25 insertions(+), 37 deletions(-) diff --git a/compiler/tools/fpp-to-json/test/run b/compiler/tools/fpp-to-json/test/run index f1564af06..5b83ae03c 100755 --- a/compiler/tools/fpp-to-json/test/run +++ b/compiler/tools/fpp-to-json/test/run @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/sh -e . ../../../scripts/test-utils.sh @@ -17,28 +17,30 @@ run_test() fi - # Run fpp_to_json and concatenate the output files - $fpp_to_json $infile.fpp $args 2>&1 | remove_path_prefix > $outfile.out.txt - - remove_path_prefix < fpp-ast.json >> $outfile.out.txt - remove_path_prefix < fpp-loc-map.json >> $outfile.out.txt - - locationMapValidator "$outfile" - exit_status=$? - if [ $exit_status -eq 1 ]; then - return 1 - fi - - if [ "$args" = "-s" ]; then - rm fpp-ast.json fpp-loc-map.json - - else - remove_path_prefix < fpp-analysis.json >> $outfile.out.txt - # Delete the JSON files - rm fpp-ast.json fpp-loc-map.json fpp-analysis.json - fi - - diff -u $outfile.ref.txt $outfile.out.txt > $outfile.diff.txt 2>&1 + { + # Run fpp_to_json and concatenate the output files + $fpp_to_json $infile.fpp $args 2>&1 | remove_path_prefix > $outfile.out.txt && \ + remove_path_prefix < fpp-ast.json >> $outfile.out.txt && \ + remove_path_prefix < fpp-loc-map.json >> $outfile.out.txt + } && \ + { + # Validate the location map + python3 python/locationMapValidator.py fpp-ast.json fpp-loc-map.json + } && \ + { + # Clean up + if [ "$args" = "-s" ]; then + rm fpp-ast.json fpp-loc-map.json + else + remove_path_prefix < fpp-analysis.json >> $outfile.out.txt + # Delete the JSON files + rm fpp-ast.json fpp-loc-map.json fpp-analysis.json + fi + } && \ + { + # Compare the output + diff -u $outfile.ref.txt $outfile.out.txt > $outfile.diff.txt 2>&1 + } } @@ -130,20 +132,6 @@ syntaxOnly(){ run_test "-s" syntaxOnly } -locationMapValidator(){ - outfile=$1 - - # Run locationMapValidator.py and capture its output - output=$(python3 python/locationMapValidator.py fpp-ast.json fpp-loc-map.json) - exit_status=$? - if [ $exit_status -eq 1 ]; then - echo "$output" >&2 - return 1 - fi - return 0 -} - - tests=" activeComponents commands From b10e27683f3b21d5cadf3adc2f3e5e757c4a1bbf Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Mon, 11 Dec 2023 16:09:30 -0800 Subject: [PATCH 3/9] Revise dp unit test code gen --- .../TestWriter/ComponentGTestBaseWriter.scala | 12 ++++++------ .../test-base/ActiveAsyncProductsGTestBase.ref.cpp | 4 ++-- .../test-base/ActiveAsyncProductsGTestBase.ref.hpp | 6 +++--- .../test-base/ActiveGetProductsGTestBase.ref.cpp | 4 ++-- .../test-base/ActiveGetProductsGTestBase.ref.hpp | 6 +++--- .../test-base/ActiveGuardedProductsGTestBase.ref.cpp | 4 ++-- .../test-base/ActiveGuardedProductsGTestBase.ref.hpp | 6 +++--- .../test-base/ActiveSyncProductsGTestBase.ref.cpp | 4 ++-- .../test-base/ActiveSyncProductsGTestBase.ref.hpp | 6 +++--- .../component/test-base/ActiveTestGTestBase.ref.cpp | 4 ++-- .../component/test-base/ActiveTestGTestBase.ref.hpp | 6 +++--- .../test-base/PassiveGetProductsGTestBase.ref.cpp | 4 ++-- .../test-base/PassiveGetProductsGTestBase.ref.hpp | 6 +++--- .../PassiveGuardedProductsGTestBase.ref.cpp | 4 ++-- .../PassiveGuardedProductsGTestBase.ref.hpp | 6 +++--- .../test-base/PassiveSyncProductsGTestBase.ref.cpp | 4 ++-- .../test-base/PassiveSyncProductsGTestBase.ref.hpp | 6 +++--- .../component/test-base/PassiveTestGTestBase.ref.cpp | 4 ++-- .../component/test-base/PassiveTestGTestBase.ref.hpp | 6 +++--- .../test-base/QueuedAsyncProductsGTestBase.ref.cpp | 4 ++-- .../test-base/QueuedAsyncProductsGTestBase.ref.hpp | 6 +++--- .../test-base/QueuedGetProductsGTestBase.ref.cpp | 4 ++-- .../test-base/QueuedGetProductsGTestBase.ref.hpp | 6 +++--- .../test-base/QueuedGuardedProductsGTestBase.ref.cpp | 4 ++-- .../test-base/QueuedGuardedProductsGTestBase.ref.hpp | 6 +++--- .../test-base/QueuedSyncProductsGTestBase.ref.cpp | 4 ++-- .../test-base/QueuedSyncProductsGTestBase.ref.hpp | 6 +++--- .../component/test-base/QueuedTestGTestBase.ref.cpp | 4 ++-- .../component/test-base/QueuedTestGTestBase.ref.hpp | 6 +++--- 29 files changed, 76 insertions(+), 76 deletions(-) diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentGTestBaseWriter.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentGTestBaseWriter.scala index f66193968..ed4d89927 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentGTestBaseWriter.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentGTestBaseWriter.scala @@ -289,8 +289,8 @@ case class ComponentGTestBaseWriter( """#define ASSERT_PRODUCT_SEND_SIZE(size) \ | this->assertProductSend_size(__FILE__, __LINE__, size) | - |#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - | assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) + |#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + | assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) |""" ) ) @@ -829,9 +829,9 @@ case class ComponentGTestBaseWriter( Some("The expected time tag (input)") ), CppDoc.Function.Param( - CppDoc.Type("Fw::DpCfg::ProcType"), - "procType", - Some("The expected processing type (input)") + CppDoc.Type("Fw::DpCfg::ProcType::SerialType"), + "procTypes", + Some("The expected processing types (input)") ), CppDoc.Function.Param( CppDoc.Type("const Fw::DpContainer::Header::UserData&"), @@ -883,7 +883,7 @@ case class ComponentGTestBaseWriter( | id, | priority, | timeTag, - | procType, + | procTypes, | userData, | dpState, | dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.cpp index d0b5d7563..54f53f235 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.cpp @@ -186,7 +186,7 @@ void ActiveAsyncProductsGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -220,7 +220,7 @@ void ActiveAsyncProductsGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.hpp index bc402fb67..c393c572b 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class ActiveAsyncProductsGTestBase //! \brief Auto-generated base for ActiveAsyncProducts component Google Test harness @@ -322,7 +322,7 @@ class ActiveAsyncProductsGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.cpp index 99600100f..c0f2effbf 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.cpp @@ -186,7 +186,7 @@ void ActiveGetProductsGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -220,7 +220,7 @@ void ActiveGetProductsGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.hpp index 7fcee9d6e..18fadd1c6 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class ActiveGetProductsGTestBase //! \brief Auto-generated base for ActiveGetProducts component Google Test harness @@ -322,7 +322,7 @@ class ActiveGetProductsGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.cpp index 60cb64254..29976b071 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.cpp @@ -186,7 +186,7 @@ void ActiveGuardedProductsGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -220,7 +220,7 @@ void ActiveGuardedProductsGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.hpp index 2194dab38..2a73caf4e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class ActiveGuardedProductsGTestBase //! \brief Auto-generated base for ActiveGuardedProducts component Google Test harness @@ -322,7 +322,7 @@ class ActiveGuardedProductsGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.cpp index 24ed00a28..3534f6db3 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.cpp @@ -186,7 +186,7 @@ void ActiveSyncProductsGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -220,7 +220,7 @@ void ActiveSyncProductsGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.hpp index c09f46930..3aa714ec4 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class ActiveSyncProductsGTestBase //! \brief Auto-generated base for ActiveSyncProducts component Google Test harness @@ -322,7 +322,7 @@ class ActiveSyncProductsGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.cpp index e3f9baf2a..4ab17a02e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.cpp @@ -1018,7 +1018,7 @@ namespace M { FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -1052,7 +1052,7 @@ namespace M { id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.hpp index b8e980f32..775b49075 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestGTestBase.ref.hpp @@ -336,8 +336,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) namespace M { @@ -756,7 +756,7 @@ namespace M { FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.cpp index bee6564e1..1f0d5734a 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.cpp @@ -186,7 +186,7 @@ void PassiveGetProductsGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -220,7 +220,7 @@ void PassiveGetProductsGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.hpp index 788b6968f..8d5709d3a 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class PassiveGetProductsGTestBase //! \brief Auto-generated base for PassiveGetProducts component Google Test harness @@ -322,7 +322,7 @@ class PassiveGetProductsGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.cpp index 144bda4ec..8acab9efd 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.cpp @@ -186,7 +186,7 @@ void PassiveGuardedProductsGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -220,7 +220,7 @@ void PassiveGuardedProductsGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.hpp index 6f33a6078..5a2025193 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class PassiveGuardedProductsGTestBase //! \brief Auto-generated base for PassiveGuardedProducts component Google Test harness @@ -322,7 +322,7 @@ class PassiveGuardedProductsGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.cpp index b8d994409..a2f9ffc17 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.cpp @@ -186,7 +186,7 @@ void PassiveSyncProductsGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -220,7 +220,7 @@ void PassiveSyncProductsGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.hpp index 6d612b676..1b8c98ce3 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class PassiveSyncProductsGTestBase //! \brief Auto-generated base for PassiveSyncProducts component Google Test harness @@ -322,7 +322,7 @@ class PassiveSyncProductsGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.cpp index c60eac581..872db2f92 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.cpp @@ -1016,7 +1016,7 @@ void PassiveTestGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -1050,7 +1050,7 @@ void PassiveTestGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.hpp index d8bd72716..2c7cd55f1 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestGTestBase.ref.hpp @@ -336,8 +336,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class PassiveTestGTestBase //! \brief Auto-generated base for PassiveTest component Google Test harness @@ -754,7 +754,7 @@ class PassiveTestGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.cpp index 26f1ac6c2..aff326e89 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.cpp @@ -186,7 +186,7 @@ void QueuedAsyncProductsGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -220,7 +220,7 @@ void QueuedAsyncProductsGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.hpp index 9945080f2..c651078f6 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class QueuedAsyncProductsGTestBase //! \brief Auto-generated base for QueuedAsyncProducts component Google Test harness @@ -322,7 +322,7 @@ class QueuedAsyncProductsGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.cpp index c649a37bd..51f23ed21 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.cpp @@ -186,7 +186,7 @@ void QueuedGetProductsGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -220,7 +220,7 @@ void QueuedGetProductsGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.hpp index 4d8fd2c0d..0e5182784 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class QueuedGetProductsGTestBase //! \brief Auto-generated base for QueuedGetProducts component Google Test harness @@ -322,7 +322,7 @@ class QueuedGetProductsGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.cpp index 1412f398d..1323b48bc 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.cpp @@ -186,7 +186,7 @@ void QueuedGuardedProductsGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -220,7 +220,7 @@ void QueuedGuardedProductsGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.hpp index af635d0f5..0610e0b2e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class QueuedGuardedProductsGTestBase //! \brief Auto-generated base for QueuedGuardedProducts component Google Test harness @@ -322,7 +322,7 @@ class QueuedGuardedProductsGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.cpp index 3b2c5f1c3..8c99f9a91 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.cpp @@ -186,7 +186,7 @@ void QueuedSyncProductsGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -220,7 +220,7 @@ void QueuedSyncProductsGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.hpp index 635cb3c63..849319267 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsGTestBase.ref.hpp @@ -210,8 +210,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class QueuedSyncProductsGTestBase //! \brief Auto-generated base for QueuedSyncProducts component Google Test harness @@ -322,7 +322,7 @@ class QueuedSyncProductsGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.cpp index dd58061c7..073a18a9b 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.cpp @@ -1016,7 +1016,7 @@ void QueuedTestGTestBase :: FwDpIdType id, FwDpPriorityType priority, const Fw::Time& timeTag, - Fw::DpCfg::ProcType procType, + Fw::DpCfg::ProcType::SerialType procTypes, const Fw::DpContainer::Header::UserData& userData, Fw::DpState dpState, FwSizeType dataSize, @@ -1050,7 +1050,7 @@ void QueuedTestGTestBase :: id, priority, timeTag, - procType, + procTypes, userData, dpState, dataSize diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.hpp index 87f42aace..8172a3aaf 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestGTestBase.ref.hpp @@ -336,8 +336,8 @@ #define ASSERT_PRODUCT_SEND_SIZE(size) \ this->assertProductSend_size(__FILE__, __LINE__, size) -#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) \ - assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procType, userData, dpState, dataSize, buffer) +#define ASSERT_PRODUCT_SEND(index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) \ + assertProductSend(__FILE__, __LINE__, index, id, priority, timeTag, procTypes, userData, dpState, dataSize, buffer) //! \class QueuedTestGTestBase //! \brief Auto-generated base for QueuedTest component Google Test harness @@ -754,7 +754,7 @@ class QueuedTestGTestBase : FwDpIdType id, //!< The expected container ID (input) FwDpPriorityType priority, //!< The expected priority (input) const Fw::Time& timeTag, //!< The expected time tag (input) - Fw::DpCfg::ProcType procType, //!< The expected processing type (input) + Fw::DpCfg::ProcType::SerialType procTypes, //!< The expected processing types (input) const Fw::DpContainer::Header::UserData& userData, //!< The expected user data (input) Fw::DpState dpState, //!< The expected data product state (input) FwSizeType dataSize, //!< The expected data size (input) From b565319458691dd1d74353ad2c06115a882b340c Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Tue, 12 Dec 2023 13:37:21 -0800 Subject: [PATCH 4/9] Update unit tests * Update fprime stub installation * Regnenerate test output --- .../base/ActiveGetProductsComponentAc.ref.hpp | 6 +-- ...siveGetProductPortsOnlyComponentAc.ref.hpp | 6 +-- .../PassiveGetProductsComponentAc.ref.hpp | 6 +-- .../base/QueuedGetProductsComponentAc.ref.hpp | 6 +-- .../ActiveGetProductsTesterBase.ref.hpp | 16 +++--- .../PassiveGetProductsTesterBase.ref.hpp | 16 +++--- .../QueuedGetProductsTesterBase.ref.hpp | 16 +++--- .../tools/fpp-to-cpp/test/fprime/Fw/Dp/Dp.fpp | 25 ++++++++-- .../test/fprime/Fw/Dp/DpContainer.cpp | 49 ++++++++++--------- .../test/fprime/Fw/Dp/DpContainer.hpp | 40 ++++++++++----- .../fpp-to-cpp/test/fprime/config/DpCfg.fpp | 12 +++-- 11 files changed, 119 insertions(+), 79 deletions(-) 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 2d132291a..cd90b97b1 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 @@ -1129,9 +1129,9 @@ class ActiveGetProductsComponentBase : //! Invoke output port productGetOut Fw::Success productGetOut_out( NATIVE_INT_TYPE portNum, //!< The port number - FwDpIdType id, //!< The container ID - FwSizeType size, //!< The size of the requested buffer - Fw::Buffer& buffer //!< The buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size, //!< The size of the requested buffer (input) + Fw::Buffer& buffer //!< The buffer (output) ); //! Invoke output port productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.hpp index 8e1cf9508..f44c28c03 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.hpp @@ -145,9 +145,9 @@ class PassiveGetProductPortsOnlyComponentBase : //! Invoke output port productGetOut Fw::Success productGetOut_out( NATIVE_INT_TYPE portNum, //!< The port number - FwDpIdType id, //!< The container ID - FwSizeType size, //!< The size of the requested buffer - Fw::Buffer& buffer //!< The buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size, //!< The size of the requested buffer (input) + Fw::Buffer& buffer //!< The buffer (output) ); //! Invoke output port productSendOut 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 903ed0a46..7bcc638f7 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 @@ -894,9 +894,9 @@ class PassiveGetProductsComponentBase : //! Invoke output port productGetOut Fw::Success productGetOut_out( NATIVE_INT_TYPE portNum, //!< The port number - FwDpIdType id, //!< The container ID - FwSizeType size, //!< The size of the requested buffer - Fw::Buffer& buffer //!< The buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size, //!< The size of the requested buffer (input) + Fw::Buffer& buffer //!< The buffer (output) ); //! Invoke output port productSendOut 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 59265c2d7..cef580c54 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 @@ -1129,9 +1129,9 @@ class QueuedGetProductsComponentBase : //! Invoke output port productGetOut Fw::Success productGetOut_out( NATIVE_INT_TYPE portNum, //!< The port number - FwDpIdType id, //!< The container ID - FwSizeType size, //!< The size of the requested buffer - Fw::Buffer& buffer //!< The buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size, //!< The size of the requested buffer (input) + Fw::Buffer& buffer //!< The buffer (output) ); //! Invoke output port productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.hpp index a7289591f..56c4dfbd2 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.hpp @@ -845,8 +845,8 @@ class ActiveGetProductsTesterBase : //! Push an entry on the product get history void pushProductGetEntry( - FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size //!< The size of the requested buffer (input) ); //! Handle a data product get from the component under test @@ -855,9 +855,9 @@ class ActiveGetProductsTesterBase : //! and return FAILURE. You can override this behavior, e.g., to call //! pushProductGetEntry, allocate a buffer and return SUCCESS. virtual Fw::Success::T productGet_handler( - FwDpIdType id, //!< The container ID - FwSizeType size, //!< The size of the requested buffer - Fw::Buffer& buffer //!< The buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size, //!< The size of the requested buffer (input) + Fw::Buffer& buffer //!< The buffer (output) ); //! Push an entry on the product send history @@ -925,9 +925,9 @@ class ActiveGetProductsTesterBase : static Fw::Success from_productGetOut_static( Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number - FwDpIdType id, //!< The container ID - FwSizeType size, //!< The size of the requested buffer - Fw::Buffer& buffer //!< The buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size, //!< The size of the requested buffer (input) + Fw::Buffer& buffer //!< The buffer (output) ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.hpp index 01d49b464..5d1cf508c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.hpp @@ -702,8 +702,8 @@ class PassiveGetProductsTesterBase : //! Push an entry on the product get history void pushProductGetEntry( - FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size //!< The size of the requested buffer (input) ); //! Handle a data product get from the component under test @@ -712,9 +712,9 @@ class PassiveGetProductsTesterBase : //! and return FAILURE. You can override this behavior, e.g., to call //! pushProductGetEntry, allocate a buffer and return SUCCESS. virtual Fw::Success::T productGet_handler( - FwDpIdType id, //!< The container ID - FwSizeType size, //!< The size of the requested buffer - Fw::Buffer& buffer //!< The buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size, //!< The size of the requested buffer (input) + Fw::Buffer& buffer //!< The buffer (output) ); //! Push an entry on the product send history @@ -782,9 +782,9 @@ class PassiveGetProductsTesterBase : static Fw::Success from_productGetOut_static( Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number - FwDpIdType id, //!< The container ID - FwSizeType size, //!< The size of the requested buffer - Fw::Buffer& buffer //!< The buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size, //!< The size of the requested buffer (input) + Fw::Buffer& buffer //!< The buffer (output) ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.hpp index f83529e13..59578988b 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.hpp @@ -845,8 +845,8 @@ class QueuedGetProductsTesterBase : //! Push an entry on the product get history void pushProductGetEntry( - FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size //!< The size of the requested buffer (input) ); //! Handle a data product get from the component under test @@ -855,9 +855,9 @@ class QueuedGetProductsTesterBase : //! and return FAILURE. You can override this behavior, e.g., to call //! pushProductGetEntry, allocate a buffer and return SUCCESS. virtual Fw::Success::T productGet_handler( - FwDpIdType id, //!< The container ID - FwSizeType size, //!< The size of the requested buffer - Fw::Buffer& buffer //!< The buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size, //!< The size of the requested buffer (input) + Fw::Buffer& buffer //!< The buffer (output) ); //! Push an entry on the product send history @@ -925,9 +925,9 @@ class QueuedGetProductsTesterBase : static Fw::Success from_productGetOut_static( Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number - FwDpIdType id, //!< The container ID - FwSizeType size, //!< The size of the requested buffer - Fw::Buffer& buffer //!< The buffer + FwDpIdType id, //!< The container ID (input) + FwSizeType size, //!< The size of the requested buffer (input) + Fw::Buffer& buffer //!< The buffer (output) ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/Dp.fpp b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/Dp.fpp index bf23f801f..d7725a338 100644 --- a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/Dp.fpp +++ b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/Dp.fpp @@ -1,13 +1,32 @@ module Fw { + # ---------------------------------------------------------------------- + # Types + # ---------------------------------------------------------------------- + + enum DpState: U8 { + @ The untransmitted state + UNTRANSMITTED + @ The transmitted state + TRANSMITTED + } default UNTRANSMITTED + + # ---------------------------------------------------------------------- + # Ports + # ---------------------------------------------------------------------- + @ Port for synchronously getting a data product buffer @ Returns the status + @ + @ On return, buffer should be set to a valid buffer of at least + @ the requested size (if status is SUCCESS) or an invalid buffer + @ (if status is FAILURE). port DpGet( - @ The container ID + @ The container ID (input) $id: FwDpIdType - @ The size of the requested buffer + @ The size of the requested buffer (input) $size: FwSizeType - @ The buffer + @ The buffer (output) ref buffer: Fw.Buffer ) -> Fw.Success diff --git a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp index c6a32091b..7ecd72706 100644 --- a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp +++ b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp @@ -17,15 +17,14 @@ namespace Fw { // ---------------------------------------------------------------------- DpContainer::DpContainer(FwDpIdType id, const Fw::Buffer& buffer) - : id(id), priority(0), procType(DpCfg::ProcType::NONE), dataSize(0), buffer() { + : id(id), priority(0), procTypes(0), dpState(), dataSize(0), buffer() { // Initialize the user data field this->initUserDataField(); // Set the buffer this->setBuffer(buffer); } -DpContainer::DpContainer() - : id(0), priority(0), procType(DpCfg::ProcType::NONE), dataSize(0), buffer() { +DpContainer::DpContainer() : id(0), priority(0), procTypes(0), dataSize(0), buffer() { // Initialize the user data field this->initUserDataField(); } @@ -44,32 +43,36 @@ Fw::SerializeStatus DpContainer::serializeHeader() { auto& serializeRepr = this->buffer.getSerializeRepr(); // Reset serialization serializeRepr.resetSer(); - // Serialize the packet type - auto status = serializeRepr.serialize(static_cast(Fw::ComPacket::FW_PACKET_DP)); - // Serialize the container id - if (status == Fw::FW_SERIALIZE_OK) { + // Serialize the header + Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; + if (Header::SIZE <= serializeRepr.getBuffCapacity()) { + // Serialize the packet type + status = serializeRepr.serialize(static_cast(Fw::ComPacket::FW_PACKET_DP)); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the container id status = serializeRepr.serialize(this->id); - } - // Serialize the priority - if (status == Fw::FW_SERIALIZE_OK) { + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the priority status = serializeRepr.serialize(this->priority); - } - // Serialize the time tag - if (status == Fw::FW_SERIALIZE_OK) { + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the time tag status = serializeRepr.serialize(this->timeTag); - } - // Serialize the processing type - if (status == Fw::FW_SERIALIZE_OK) { - status = serializeRepr.serialize(this->procType); - } - // Serialize the user data - if (status == Fw::FW_SERIALIZE_OK) { + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the processing types + status = serializeRepr.serialize(this->procTypes); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the user data const bool omitLength = true; status = serializeRepr.serialize(this->userData, sizeof userData, omitLength); - } - // Serialize the data size - if (status == Fw::FW_SERIALIZE_OK) { + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the data product state + status = serializeRepr.serialize(this->dpState); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the data size status = serializeRepr.serialize(this->dataSize); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + } else { + status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; } return status; } diff --git a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp index 0fc8aa902..e28c0a027 100644 --- a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp +++ b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp @@ -8,6 +8,7 @@ #define Fw_DpContainer_HPP #include "Fw/Buffer/Buffer.hpp" +#include "Fw/Dp/DpStateEnumAc.hpp" #include "Fw/Time/Time.hpp" #include "config/FppConstantsAc.hpp" #include "config/ProcTypeEnumAc.hpp" @@ -23,6 +24,8 @@ class DpContainer { //! A DpContainer packet header struct Header { + //! The type of user data + using UserData = U8[DpCfg::CONTAINER_USER_DATA_SIZE]; //! The offset for the packet descriptor field static constexpr FwSizeType PACKET_DESCRIPTOR_OFFSET = 0; //! The offset for the id field @@ -31,12 +34,14 @@ class DpContainer { static constexpr FwDpPriorityType PRIORITY_OFFSET = ID_OFFSET + sizeof(FwDpIdType); //! The offset for the time tag field static constexpr FwSizeType TIME_TAG_OFFSET = PRIORITY_OFFSET + sizeof(FwDpPriorityType); - //! The offset for the processing ID field - static constexpr FwSizeType PROC_ID_OFFSET = TIME_TAG_OFFSET + Time::SERIALIZED_SIZE; + //! The offset for the processing types field + static constexpr FwSizeType PROC_TYPES_OFFSET = TIME_TAG_OFFSET + Time::SERIALIZED_SIZE; //! The offset for the user data field - static constexpr FwSizeType USER_DATA_OFFSET = PROC_ID_OFFSET + sizeof(DpCfg::ProcType::SerialType); + static constexpr FwSizeType USER_DATA_OFFSET = PROC_TYPES_OFFSET + sizeof(DpCfg::ProcType::SerialType); + //! The offset of the data product state field + static constexpr FwSizeType DP_STATE_OFFSET = USER_DATA_OFFSET + DpCfg::CONTAINER_USER_DATA_SIZE; //! The offset for the data size field - static constexpr FwSizeType DATA_SIZE_OFFSET = USER_DATA_OFFSET + DpCfg::CONTAINER_USER_DATA_SIZE; + static constexpr FwSizeType DATA_SIZE_OFFSET = DP_STATE_OFFSET + DpState::SERIALIZED_SIZE; //! The header size static constexpr FwSizeType SIZE = DATA_SIZE_OFFSET + sizeof(FwSizeType); }; @@ -82,9 +87,9 @@ class DpContainer { //! \return The time tag Fw::Time getTimeTag() const { return this->timeTag; } - //! Get the processing type - //! \return The processing type - DpCfg::ProcType getProcType() const { return this->procType; } + //! Get the processing types + //! \return The processing types + DpCfg::ProcType::SerialType getProcTypes() const { return this->procTypes; } //! Move the packet serialization to the specified offset //! \return The serialize status @@ -113,10 +118,16 @@ class DpContainer { this->timeTag = timeTag; } - //! Set the processing type - void setProcType(DpCfg::ProcType procType //!< The processing type + //! Set the processing types bit mask + void setProcTypes(DpCfg::ProcType::SerialType procTypes //!< The processing types ) { - this->procType = procType; + this->procTypes = procTypes; + } + + //! Set the data product state + void setDpState(DpState dpState //!< The data product state + ) { + this->dpState = dpState; } //! Set the packet buffer @@ -137,7 +148,7 @@ class DpContainer { // ---------------------------------------------------------------------- //! The user data - U8 userData[DpCfg::CONTAINER_USER_DATA_SIZE]; + Header::UserData userData; PROTECTED: // ---------------------------------------------------------------------- @@ -154,8 +165,11 @@ class DpContainer { //! The time tag Time timeTag; - //! The processing type - DpCfg::ProcType procType; + //! The processing types + DpCfg::ProcType::SerialType procTypes; + + //! The data product state + DpState dpState; //! The data size FwSizeType dataSize; diff --git a/compiler/tools/fpp-to-cpp/test/fprime/config/DpCfg.fpp b/compiler/tools/fpp-to-cpp/test/fprime/config/DpCfg.fpp index 9961c3c3e..0d04662c9 100644 --- a/compiler/tools/fpp-to-cpp/test/fprime/config/DpCfg.fpp +++ b/compiler/tools/fpp-to-cpp/test/fprime/config/DpCfg.fpp @@ -10,11 +10,15 @@ module Fw { @ packet header constant CONTAINER_USER_DATA_SIZE = 32; - @ The type of the identifier for the type of processing to perform on + @ A bit mask for selecting the type of processing to perform on @ a container before writing it to disk. - enum ProcType : U8 { - @ No processing - NONE + enum ProcType: U8 { + @ Processing type 0 + PROC_TYPE_ZERO = 0x01 + @ Processing type 1 + PROC_TYPE_ONE = 0x02 + @ Processing type 2 + PROC_TYPE_TWO = 0x04 } } From 365062744c0a18ff3b0ff251545a2725ac5c7a26 Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Tue, 12 Dec 2023 22:45:13 -0800 Subject: [PATCH 5/9] Revise dp code gen --- .../ComponentDataProducts.scala | 14 ++++++----- .../ComponentTesterBaseWriter.scala | 8 +++---- ...veAsyncProductPortsOnlyComponentAc.ref.cpp | 4 ++-- ...veAsyncProductPortsOnlyComponentAc.ref.hpp | 2 +- .../ActiveAsyncProductsComponentAc.ref.cpp | 7 +++--- .../ActiveAsyncProductsComponentAc.ref.hpp | 4 ++-- .../base/ActiveGetProductsComponentAc.ref.cpp | 7 +++--- .../base/ActiveGetProductsComponentAc.ref.hpp | 24 +++++++++---------- .../ActiveGuardedProductsComponentAc.ref.cpp | 7 +++--- .../ActiveGuardedProductsComponentAc.ref.hpp | 4 ++-- .../ActiveSyncProductsComponentAc.ref.cpp | 7 +++--- .../ActiveSyncProductsComponentAc.ref.hpp | 4 ++-- .../base/ActiveTestComponentAc.ref.cpp | 7 +++--- .../base/ActiveTestComponentAc.ref.hpp | 4 ++-- ...siveGetProductPortsOnlyComponentAc.ref.cpp | 4 ++-- ...siveGetProductPortsOnlyComponentAc.ref.hpp | 2 +- .../PassiveGetProductsComponentAc.ref.cpp | 7 +++--- .../PassiveGetProductsComponentAc.ref.hpp | 24 +++++++++---------- .../PassiveGuardedProductsComponentAc.ref.cpp | 7 +++--- .../PassiveGuardedProductsComponentAc.ref.hpp | 4 ++-- ...iveSyncProductPortsOnlyComponentAc.ref.cpp | 4 ++-- ...iveSyncProductPortsOnlyComponentAc.ref.hpp | 2 +- .../PassiveSyncProductsComponentAc.ref.cpp | 7 +++--- .../PassiveSyncProductsComponentAc.ref.hpp | 4 ++-- .../base/PassiveTestComponentAc.ref.cpp | 7 +++--- .../base/PassiveTestComponentAc.ref.hpp | 4 ++-- ...edAsyncProductPortsOnlyComponentAc.ref.cpp | 4 ++-- ...edAsyncProductPortsOnlyComponentAc.ref.hpp | 2 +- .../QueuedAsyncProductsComponentAc.ref.cpp | 7 +++--- .../QueuedAsyncProductsComponentAc.ref.hpp | 4 ++-- .../base/QueuedGetProductsComponentAc.ref.cpp | 7 +++--- .../base/QueuedGetProductsComponentAc.ref.hpp | 24 +++++++++---------- .../QueuedGuardedProductsComponentAc.ref.cpp | 7 +++--- .../QueuedGuardedProductsComponentAc.ref.hpp | 4 ++-- .../QueuedSyncProductsComponentAc.ref.cpp | 7 +++--- .../QueuedSyncProductsComponentAc.ref.hpp | 4 ++-- .../base/QueuedTestComponentAc.ref.cpp | 7 +++--- .../base/QueuedTestComponentAc.ref.hpp | 4 ++-- .../ActiveAsyncProductsTesterBase.ref.cpp | 12 +++++----- .../ActiveAsyncProductsTesterBase.ref.hpp | 6 ++--- .../ActiveGetProductsTesterBase.ref.cpp | 12 +++++----- .../ActiveGetProductsTesterBase.ref.hpp | 6 ++--- .../ActiveGuardedProductsTesterBase.ref.cpp | 12 +++++----- .../ActiveGuardedProductsTesterBase.ref.hpp | 6 ++--- .../ActiveSyncProductsTesterBase.ref.cpp | 12 +++++----- .../ActiveSyncProductsTesterBase.ref.hpp | 6 ++--- .../test-base/ActiveTestTesterBase.ref.cpp | 12 +++++----- .../test-base/ActiveTestTesterBase.ref.hpp | 6 ++--- .../PassiveGetProductsTesterBase.ref.cpp | 12 +++++----- .../PassiveGetProductsTesterBase.ref.hpp | 6 ++--- .../PassiveGuardedProductsTesterBase.ref.cpp | 12 +++++----- .../PassiveGuardedProductsTesterBase.ref.hpp | 6 ++--- .../PassiveSyncProductsTesterBase.ref.cpp | 12 +++++----- .../PassiveSyncProductsTesterBase.ref.hpp | 6 ++--- .../test-base/PassiveTestTesterBase.ref.cpp | 12 +++++----- .../test-base/PassiveTestTesterBase.ref.hpp | 6 ++--- .../QueuedAsyncProductsTesterBase.ref.cpp | 12 +++++----- .../QueuedAsyncProductsTesterBase.ref.hpp | 6 ++--- .../QueuedGetProductsTesterBase.ref.cpp | 12 +++++----- .../QueuedGetProductsTesterBase.ref.hpp | 6 ++--- .../QueuedGuardedProductsTesterBase.ref.cpp | 12 +++++----- .../QueuedGuardedProductsTesterBase.ref.hpp | 6 ++--- .../QueuedSyncProductsTesterBase.ref.cpp | 12 +++++----- .../QueuedSyncProductsTesterBase.ref.hpp | 6 ++--- .../test-base/QueuedTestTesterBase.ref.cpp | 12 +++++----- .../test-base/QueuedTestTesterBase.ref.hpp | 6 ++--- .../tools/fpp-to-cpp/test/fprime/Fw/Dp/Dp.fpp | 18 +++++++------- .../test/fprime/Fw/Dp/DpContainer.cpp | 2 +- .../test/fprime/Fw/Dp/DpContainer.hpp | 23 +++++++++++++++++- 69 files changed, 297 insertions(+), 258 deletions(-) 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 666d4d9d8..0d58e97d7 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala @@ -39,10 +39,10 @@ case class ComponentDataProducts ( |//! Get a buffer and use it to initialize container $name |//! \\return The status of the buffer request |Fw::Success::T dpGet_$name( - | FwSizeType size, //!< The buffer size (input) + | FwSizeType dataSize, //!< The data size (input) | DpContainer& container //!< The container (output) |) { - | return this->dpGet(ContainerId::$name, size, container); + | return this->dpGet(ContainerId::$name, dataSize, container); |}""" ) ) @@ -126,8 +126,8 @@ case class ComponentDataProducts ( ), CppDoc.Function.Param( CppDoc.Type("FwSizeType"), - "size", - Some("The buffer size (input)") + "dataSize", + Some("The data size (input)") ), CppDoc.Function.Param( CppDoc.Type("DpContainer&"), @@ -140,6 +140,7 @@ case class ComponentDataProducts ( val invokeProductGet = outputPortInvokerName(productGetPort.get) lines(s"""|const FwDpIdType baseId = this->getIdBase(); |const FwDpIdType globalId = baseId + containerId; + |const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); |Fw::Buffer buffer; |const Fw::Success::T status = this->$invokeProductGet(0, globalId, size, buffer); |if (status == Fw::Success::SUCCESS) { @@ -161,8 +162,8 @@ case class ComponentDataProducts ( ), CppDoc.Function.Param( CppDoc.Type("FwSizeType"), - "size", - Some("The buffer size") + "dataSize", + Some("The data size") ) ), CppDoc.Type("void"), @@ -170,6 +171,7 @@ case class ComponentDataProducts ( val invokeProductRequest = outputPortInvokerName(productRequestPort.get) lines( s"""|const FwDpIdType globalId = this->getIdBase() + containerId; + |const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); |this->$invokeProductRequest(0, globalId, size);""" ) } diff --git a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentTesterBaseWriter.scala b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentTesterBaseWriter.scala index 2e34a5cde..d6728ac94 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentTesterBaseWriter.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/TestWriter/ComponentTesterBaseWriter.scala @@ -479,7 +479,7 @@ case class ComponentTesterBaseWriter( getPortFunctionParams(productGetPort.get).take(2), CppDoc.Type("void"), lines( - """|DpGet e = { id, size }; + """|DpGet e = { id, dataSize }; |this->productGetHistory->push_back(e);""" ) ) @@ -496,7 +496,7 @@ case class ComponentTesterBaseWriter( CppDoc.Type("Fw::Success::T"), lines( """|(void) buffer; - |this->pushProductGetEntry(id, size); + |this->pushProductGetEntry(id, dataSize); |return Fw::Success::FAILURE; |""" ), @@ -508,7 +508,7 @@ case class ComponentTesterBaseWriter( getPortFunctionParams(productRequestPort.get), CppDoc.Type("void"), lines( - """|DpRequest e = { id, size }; + """|DpRequest e = { id, dataSize }; |this->productRequestHistory->push_back(e);""" ) ) @@ -522,7 +522,7 @@ case class ComponentTesterBaseWriter( "productRequest_handler", getPortFunctionParams(productRequestPort.get), CppDoc.Type("void"), - lines("this->pushProductRequestEntry(id, size);"), + lines("this->pushProductRequestEntry(id, dataSize);"), CppDoc.Function.Virtual ) lazy val sendProductResponse = functionClassMember( diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductPortsOnlyComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductPortsOnlyComponentAc.ref.cpp index dde695b88..c38914db0 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductPortsOnlyComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductPortsOnlyComponentAc.ref.cpp @@ -406,7 +406,7 @@ void ActiveAsyncProductPortsOnlyComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -415,7 +415,7 @@ void ActiveAsyncProductPortsOnlyComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductPortsOnlyComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductPortsOnlyComponentAc.ref.hpp index 2c8e1f051..a18bef1e4 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductPortsOnlyComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductPortsOnlyComponentAc.ref.hpp @@ -217,7 +217,7 @@ class ActiveAsyncProductPortsOnlyComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp index 0f9357ca0..12a848fe0 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp @@ -2744,7 +2744,7 @@ void ActiveAsyncProductsComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -2753,7 +2753,7 @@ void ActiveAsyncProductsComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } @@ -3619,10 +3619,11 @@ void ActiveAsyncProductsComponentBase :: void ActiveAsyncProductsComponentBase :: dpRequest( ContainerId::T containerId, - FwSizeType size + FwSizeType dataSize ) { const FwDpIdType globalId = this->getIdBase() + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); this->productRequestOut_out(0, globalId, size); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.hpp index 00bfe1fb4..2be194891 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.hpp @@ -1184,7 +1184,7 @@ class ActiveAsyncProductsComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut @@ -1525,7 +1525,7 @@ class ActiveAsyncProductsComponentBase : //! Request a data product container void dpRequest( ContainerId::T containerId, //!< The component-local container id - FwSizeType size //!< The buffer size + FwSizeType dataSize //!< The data size ); //! Handler implementation for productRecvIn diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp index 66ea3fc2f..88fe650bb 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp @@ -2589,7 +2589,7 @@ Fw::Success ActiveGetProductsComponentBase :: productGetOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size, + FwSizeType dataSize, Fw::Buffer& buffer ) { @@ -2599,7 +2599,7 @@ Fw::Success ActiveGetProductsComponentBase :: ); return this->m_productGetOut_OutputPort[portNum].invoke( id, - size, + dataSize, buffer ); } @@ -3411,12 +3411,13 @@ void ActiveGetProductsComponentBase :: Fw::Success::T ActiveGetProductsComponentBase :: dpGet( ContainerId::T containerId, - FwSizeType size, + FwSizeType dataSize, DpContainer& container ) { const FwDpIdType baseId = this->getIdBase(); const FwDpIdType globalId = baseId + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); Fw::Buffer buffer; const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer); if (status == Fw::Success::SUCCESS) { 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 cd90b97b1..f05daa32a 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 @@ -1130,7 +1130,7 @@ class ActiveGetProductsComponentBase : Fw::Success productGetOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID (input) - FwSizeType size, //!< The size of the requested buffer (input) + FwSizeType dataSize, //!< The data size of the requested buffer (input) Fw::Buffer& buffer //!< The buffer (output) ); @@ -1190,46 +1190,46 @@ class ActiveGetProductsComponentBase : //! Get a buffer and use it to initialize container Container1 //! \return The status of the buffer request Fw::Success::T dpGet_Container1( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container1, size, container); + return this->dpGet(ContainerId::Container1, dataSize, container); } //! Get a buffer and use it to initialize container Container2 //! \return The status of the buffer request Fw::Success::T dpGet_Container2( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container2, size, container); + return this->dpGet(ContainerId::Container2, dataSize, container); } //! Get a buffer and use it to initialize container Container3 //! \return The status of the buffer request Fw::Success::T dpGet_Container3( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container3, size, container); + return this->dpGet(ContainerId::Container3, dataSize, container); } //! Get a buffer and use it to initialize container Container4 //! \return The status of the buffer request Fw::Success::T dpGet_Container4( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container4, size, container); + return this->dpGet(ContainerId::Container4, dataSize, container); } //! Get a buffer and use it to initialize container Container5 //! \return The status of the buffer request Fw::Success::T dpGet_Container5( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container5, size, container); + return this->dpGet(ContainerId::Container5, dataSize, container); } //! Send a data product @@ -1474,7 +1474,7 @@ class ActiveGetProductsComponentBase : //! \return The status of the buffer request Fw::Success::T dpGet( ContainerId::T containerId, //!< The component-local container id (input) - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp index 56b17240b..6b79c7c2c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp @@ -2700,7 +2700,7 @@ void ActiveGuardedProductsComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -2709,7 +2709,7 @@ void ActiveGuardedProductsComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } @@ -3539,10 +3539,11 @@ void ActiveGuardedProductsComponentBase :: void ActiveGuardedProductsComponentBase :: dpRequest( ContainerId::T containerId, - FwSizeType size + FwSizeType dataSize ) { const FwDpIdType globalId = this->getIdBase() + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); this->productRequestOut_out(0, globalId, size); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.hpp index fecc20334..bbc9c7498 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.hpp @@ -1184,7 +1184,7 @@ class ActiveGuardedProductsComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut @@ -1525,7 +1525,7 @@ class ActiveGuardedProductsComponentBase : //! Request a data product container void dpRequest( ContainerId::T containerId, //!< The component-local container id - FwSizeType size //!< The buffer size + FwSizeType dataSize //!< The data size ); //! Handler implementation for productRecvIn diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp index f584d82a9..2f23f7628 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp @@ -2694,7 +2694,7 @@ void ActiveSyncProductsComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -2703,7 +2703,7 @@ void ActiveSyncProductsComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } @@ -3533,10 +3533,11 @@ void ActiveSyncProductsComponentBase :: void ActiveSyncProductsComponentBase :: dpRequest( ContainerId::T containerId, - FwSizeType size + FwSizeType dataSize ) { const FwDpIdType globalId = this->getIdBase() + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); this->productRequestOut_out(0, globalId, size); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.hpp index 018e4acc0..7a478ed8c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.hpp @@ -1184,7 +1184,7 @@ class ActiveSyncProductsComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut @@ -1525,7 +1525,7 @@ class ActiveSyncProductsComponentBase : //! Request a data product container void dpRequest( ContainerId::T containerId, //!< The component-local container id - FwSizeType size //!< The buffer size + FwSizeType dataSize //!< The data size ); //! Handler implementation for productRecvIn diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp index 9f16c57bc..5a13f9c37 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp @@ -3099,7 +3099,7 @@ namespace M { productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -3108,7 +3108,7 @@ namespace M { ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } @@ -7433,10 +7433,11 @@ namespace M { void ActiveTestComponentBase :: dpRequest( ContainerId::T containerId, - FwSizeType size + FwSizeType dataSize ) { const FwDpIdType globalId = this->getIdBase() + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); this->productRequestOut_out(0, globalId, size); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.hpp index 6594d772a..c12f2a86d 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.hpp @@ -1293,7 +1293,7 @@ namespace M { void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut @@ -2412,7 +2412,7 @@ namespace M { //! Request a data product container void dpRequest( ContainerId::T containerId, //!< The component-local container id - FwSizeType size //!< The buffer size + FwSizeType dataSize //!< The data size ); //! Handler implementation for productRecvIn diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.cpp index 24954730e..44aec71ce 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.cpp @@ -186,7 +186,7 @@ Fw::Success PassiveGetProductPortsOnlyComponentBase :: productGetOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size, + FwSizeType dataSize, Fw::Buffer& buffer ) { @@ -196,7 +196,7 @@ Fw::Success PassiveGetProductPortsOnlyComponentBase :: ); return this->m_productGetOut_OutputPort[portNum].invoke( id, - size, + dataSize, buffer ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.hpp index f44c28c03..b055475f7 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductPortsOnlyComponentAc.ref.hpp @@ -146,7 +146,7 @@ class PassiveGetProductPortsOnlyComponentBase : Fw::Success productGetOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID (input) - FwSizeType size, //!< The size of the requested buffer (input) + FwSizeType dataSize, //!< The data size of the requested buffer (input) Fw::Buffer& buffer //!< The buffer (output) ); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp index 3895bce37..ae73847fe 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp @@ -1759,7 +1759,7 @@ Fw::Success PassiveGetProductsComponentBase :: productGetOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size, + FwSizeType dataSize, Fw::Buffer& buffer ) { @@ -1769,7 +1769,7 @@ Fw::Success PassiveGetProductsComponentBase :: ); return this->m_productGetOut_OutputPort[portNum].invoke( id, - size, + dataSize, buffer ); } @@ -2115,12 +2115,13 @@ void PassiveGetProductsComponentBase :: Fw::Success::T PassiveGetProductsComponentBase :: dpGet( ContainerId::T containerId, - FwSizeType size, + FwSizeType dataSize, DpContainer& container ) { const FwDpIdType baseId = this->getIdBase(); const FwDpIdType globalId = baseId + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); Fw::Buffer buffer; const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer); if (status == Fw::Success::SUCCESS) { 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 7bcc638f7..31492d572 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 @@ -895,7 +895,7 @@ class PassiveGetProductsComponentBase : Fw::Success productGetOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID (input) - FwSizeType size, //!< The size of the requested buffer (input) + FwSizeType dataSize, //!< The data size of the requested buffer (input) Fw::Buffer& buffer //!< The buffer (output) ); @@ -955,46 +955,46 @@ class PassiveGetProductsComponentBase : //! Get a buffer and use it to initialize container Container1 //! \return The status of the buffer request Fw::Success::T dpGet_Container1( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container1, size, container); + return this->dpGet(ContainerId::Container1, dataSize, container); } //! Get a buffer and use it to initialize container Container2 //! \return The status of the buffer request Fw::Success::T dpGet_Container2( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container2, size, container); + return this->dpGet(ContainerId::Container2, dataSize, container); } //! Get a buffer and use it to initialize container Container3 //! \return The status of the buffer request Fw::Success::T dpGet_Container3( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container3, size, container); + return this->dpGet(ContainerId::Container3, dataSize, container); } //! Get a buffer and use it to initialize container Container4 //! \return The status of the buffer request Fw::Success::T dpGet_Container4( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container4, size, container); + return this->dpGet(ContainerId::Container4, dataSize, container); } //! Get a buffer and use it to initialize container Container5 //! \return The status of the buffer request Fw::Success::T dpGet_Container5( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container5, size, container); + return this->dpGet(ContainerId::Container5, dataSize, container); } //! Send a data product @@ -1172,7 +1172,7 @@ class PassiveGetProductsComponentBase : //! \return The status of the buffer request Fw::Success::T dpGet( ContainerId::T containerId, //!< The component-local container id (input) - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp index 32b76a8be..9c19effe4 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp @@ -1870,7 +1870,7 @@ void PassiveGuardedProductsComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -1879,7 +1879,7 @@ void PassiveGuardedProductsComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } @@ -2243,10 +2243,11 @@ void PassiveGuardedProductsComponentBase :: void PassiveGuardedProductsComponentBase :: dpRequest( ContainerId::T containerId, - FwSizeType size + FwSizeType dataSize ) { const FwDpIdType globalId = this->getIdBase() + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); this->productRequestOut_out(0, globalId, size); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.hpp index e41ab3ac0..0260818b4 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.hpp @@ -949,7 +949,7 @@ class PassiveGuardedProductsComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut @@ -1223,7 +1223,7 @@ class PassiveGuardedProductsComponentBase : //! Request a data product container void dpRequest( ContainerId::T containerId, //!< The component-local container id - FwSizeType size //!< The buffer size + FwSizeType dataSize //!< The data size ); //! Handler implementation for productRecvIn diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductPortsOnlyComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductPortsOnlyComponentAc.ref.cpp index 117f2fc41..3ee52d800 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductPortsOnlyComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductPortsOnlyComponentAc.ref.cpp @@ -299,7 +299,7 @@ void PassiveSyncProductPortsOnlyComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -308,7 +308,7 @@ void PassiveSyncProductPortsOnlyComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductPortsOnlyComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductPortsOnlyComponentAc.ref.hpp index 5ffc39e26..bb7e827ce 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductPortsOnlyComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductPortsOnlyComponentAc.ref.hpp @@ -216,7 +216,7 @@ class PassiveSyncProductPortsOnlyComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp index c03ad1000..dacca8188 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp @@ -1864,7 +1864,7 @@ void PassiveSyncProductsComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -1873,7 +1873,7 @@ void PassiveSyncProductsComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } @@ -2237,10 +2237,11 @@ void PassiveSyncProductsComponentBase :: void PassiveSyncProductsComponentBase :: dpRequest( ContainerId::T containerId, - FwSizeType size + FwSizeType dataSize ) { const FwDpIdType globalId = this->getIdBase() + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); this->productRequestOut_out(0, globalId, size); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.hpp index 5906da79d..6a4b5181f 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.hpp @@ -949,7 +949,7 @@ class PassiveSyncProductsComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut @@ -1223,7 +1223,7 @@ class PassiveSyncProductsComponentBase : //! Request a data product container void dpRequest( ContainerId::T containerId, //!< The component-local container id - FwSizeType size //!< The buffer size + FwSizeType dataSize //!< The data size ); //! Handler implementation for productRecvIn diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp index 327646509..588632671 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp @@ -2161,7 +2161,7 @@ void PassiveTestComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -2170,7 +2170,7 @@ void PassiveTestComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } @@ -4895,10 +4895,11 @@ Fw::CmdResponse PassiveTestComponentBase :: void PassiveTestComponentBase :: dpRequest( ContainerId::T containerId, - FwSizeType size + FwSizeType dataSize ) { const FwDpIdType globalId = this->getIdBase() + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); this->productRequestOut_out(0, globalId, size); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.hpp index e744a7a88..afdebf884 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.hpp @@ -1050,7 +1050,7 @@ class PassiveTestComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut @@ -1901,7 +1901,7 @@ class PassiveTestComponentBase : //! Request a data product container void dpRequest( ContainerId::T containerId, //!< The component-local container id - FwSizeType size //!< The buffer size + FwSizeType dataSize //!< The data size ); //! Handler implementation for productRecvIn diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductPortsOnlyComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductPortsOnlyComponentAc.ref.cpp index 417e6e1fa..c71f4acc2 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductPortsOnlyComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductPortsOnlyComponentAc.ref.cpp @@ -406,7 +406,7 @@ void QueuedAsyncProductPortsOnlyComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -415,7 +415,7 @@ void QueuedAsyncProductPortsOnlyComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductPortsOnlyComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductPortsOnlyComponentAc.ref.hpp index 7a3946d5e..9bfb054c0 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductPortsOnlyComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductPortsOnlyComponentAc.ref.hpp @@ -217,7 +217,7 @@ class QueuedAsyncProductPortsOnlyComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp index f5c9ce6b0..df78f30a3 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp @@ -2744,7 +2744,7 @@ void QueuedAsyncProductsComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -2753,7 +2753,7 @@ void QueuedAsyncProductsComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } @@ -3619,10 +3619,11 @@ void QueuedAsyncProductsComponentBase :: void QueuedAsyncProductsComponentBase :: dpRequest( ContainerId::T containerId, - FwSizeType size + FwSizeType dataSize ) { const FwDpIdType globalId = this->getIdBase() + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); this->productRequestOut_out(0, globalId, size); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.hpp index 2fcb1a61a..0eb80747b 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.hpp @@ -1184,7 +1184,7 @@ class QueuedAsyncProductsComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut @@ -1525,7 +1525,7 @@ class QueuedAsyncProductsComponentBase : //! Request a data product container void dpRequest( ContainerId::T containerId, //!< The component-local container id - FwSizeType size //!< The buffer size + FwSizeType dataSize //!< The data size ); //! Handler implementation for productRecvIn diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp index df03b367d..eaae0e1b8 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp @@ -2589,7 +2589,7 @@ Fw::Success QueuedGetProductsComponentBase :: productGetOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size, + FwSizeType dataSize, Fw::Buffer& buffer ) { @@ -2599,7 +2599,7 @@ Fw::Success QueuedGetProductsComponentBase :: ); return this->m_productGetOut_OutputPort[portNum].invoke( id, - size, + dataSize, buffer ); } @@ -3411,12 +3411,13 @@ void QueuedGetProductsComponentBase :: Fw::Success::T QueuedGetProductsComponentBase :: dpGet( ContainerId::T containerId, - FwSizeType size, + FwSizeType dataSize, DpContainer& container ) { const FwDpIdType baseId = this->getIdBase(); const FwDpIdType globalId = baseId + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); Fw::Buffer buffer; const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer); if (status == Fw::Success::SUCCESS) { 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 cef580c54..24efdd711 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 @@ -1130,7 +1130,7 @@ class QueuedGetProductsComponentBase : Fw::Success productGetOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID (input) - FwSizeType size, //!< The size of the requested buffer (input) + FwSizeType dataSize, //!< The data size of the requested buffer (input) Fw::Buffer& buffer //!< The buffer (output) ); @@ -1190,46 +1190,46 @@ class QueuedGetProductsComponentBase : //! Get a buffer and use it to initialize container Container1 //! \return The status of the buffer request Fw::Success::T dpGet_Container1( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container1, size, container); + return this->dpGet(ContainerId::Container1, dataSize, container); } //! Get a buffer and use it to initialize container Container2 //! \return The status of the buffer request Fw::Success::T dpGet_Container2( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container2, size, container); + return this->dpGet(ContainerId::Container2, dataSize, container); } //! Get a buffer and use it to initialize container Container3 //! \return The status of the buffer request Fw::Success::T dpGet_Container3( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container3, size, container); + return this->dpGet(ContainerId::Container3, dataSize, container); } //! Get a buffer and use it to initialize container Container4 //! \return The status of the buffer request Fw::Success::T dpGet_Container4( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container4, size, container); + return this->dpGet(ContainerId::Container4, dataSize, container); } //! Get a buffer and use it to initialize container Container5 //! \return The status of the buffer request Fw::Success::T dpGet_Container5( - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ) { - return this->dpGet(ContainerId::Container5, size, container); + return this->dpGet(ContainerId::Container5, dataSize, container); } //! Send a data product @@ -1474,7 +1474,7 @@ class QueuedGetProductsComponentBase : //! \return The status of the buffer request Fw::Success::T dpGet( ContainerId::T containerId, //!< The component-local container id (input) - FwSizeType size, //!< The buffer size (input) + FwSizeType dataSize, //!< The data size (input) DpContainer& container //!< The container (output) ); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp index 499a245f3..3b95a9b62 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp @@ -2700,7 +2700,7 @@ void QueuedGuardedProductsComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -2709,7 +2709,7 @@ void QueuedGuardedProductsComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } @@ -3539,10 +3539,11 @@ void QueuedGuardedProductsComponentBase :: void QueuedGuardedProductsComponentBase :: dpRequest( ContainerId::T containerId, - FwSizeType size + FwSizeType dataSize ) { const FwDpIdType globalId = this->getIdBase() + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); this->productRequestOut_out(0, globalId, size); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.hpp index 79382d0bb..14e153f1d 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.hpp @@ -1184,7 +1184,7 @@ class QueuedGuardedProductsComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut @@ -1525,7 +1525,7 @@ class QueuedGuardedProductsComponentBase : //! Request a data product container void dpRequest( ContainerId::T containerId, //!< The component-local container id - FwSizeType size //!< The buffer size + FwSizeType dataSize //!< The data size ); //! Handler implementation for productRecvIn diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp index a6b097f80..31b6af063 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp @@ -2694,7 +2694,7 @@ void QueuedSyncProductsComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -2703,7 +2703,7 @@ void QueuedSyncProductsComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } @@ -3533,10 +3533,11 @@ void QueuedSyncProductsComponentBase :: void QueuedSyncProductsComponentBase :: dpRequest( ContainerId::T containerId, - FwSizeType size + FwSizeType dataSize ) { const FwDpIdType globalId = this->getIdBase() + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); this->productRequestOut_out(0, globalId, size); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.hpp index c66973280..9df2783f1 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.hpp @@ -1184,7 +1184,7 @@ class QueuedSyncProductsComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut @@ -1525,7 +1525,7 @@ class QueuedSyncProductsComponentBase : //! Request a data product container void dpRequest( ContainerId::T containerId, //!< The component-local container id - FwSizeType size //!< The buffer size + FwSizeType dataSize //!< The data size ); //! Handler implementation for productRecvIn diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp index c0508a414..ea79d2bd0 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp @@ -3097,7 +3097,7 @@ void QueuedTestComponentBase :: productRequestOut_out( NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { FW_ASSERT( @@ -3106,7 +3106,7 @@ void QueuedTestComponentBase :: ); this->m_productRequestOut_OutputPort[portNum].invoke( id, - size + dataSize ); } @@ -7436,10 +7436,11 @@ Fw::CmdResponse QueuedTestComponentBase :: void QueuedTestComponentBase :: dpRequest( ContainerId::T containerId, - FwSizeType size + FwSizeType dataSize ) { const FwDpIdType globalId = this->getIdBase() + containerId; + const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize); this->productRequestOut_out(0, globalId, size); } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.hpp index ddc6202b0..ef7686e69 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.hpp @@ -1291,7 +1291,7 @@ class QueuedTestComponentBase : void productRequestOut_out( NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Invoke output port productSendOut @@ -2410,7 +2410,7 @@ class QueuedTestComponentBase : //! Request a data product container void dpRequest( ContainerId::T containerId, //!< The component-local container id - FwSizeType size //!< The buffer size + FwSizeType dataSize //!< The data size ); //! Handler implementation for productRecvIn diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsTesterBase.ref.cpp index d32bf463a..3e1d1f4de 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsTesterBase.ref.cpp @@ -1643,20 +1643,20 @@ void ActiveAsyncProductsTesterBase :: void ActiveAsyncProductsTesterBase :: pushProductRequestEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpRequest e = { id, size }; + DpRequest e = { id, dataSize }; this->productRequestHistory->push_back(e); } void ActiveAsyncProductsTesterBase :: productRequest_handler( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - this->pushProductRequestEntry(id, size); + this->pushProductRequestEntry(id, dataSize); } void ActiveAsyncProductsTesterBase :: @@ -1783,11 +1783,11 @@ void ActiveAsyncProductsTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { ActiveAsyncProductsTesterBase* _testerBase = static_cast(callComp); - _testerBase->productRequest_handler(id, size); + _testerBase->productRequest_handler(id, dataSize); } void ActiveAsyncProductsTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsTesterBase.ref.hpp index 295893e2f..095ee522c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveAsyncProductsTesterBase.ref.hpp @@ -864,7 +864,7 @@ class ActiveAsyncProductsTesterBase : //! Push an entry on the product request history void pushProductRequestEntry( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Handle a data product request from the component under test @@ -873,7 +873,7 @@ class ActiveAsyncProductsTesterBase : //! this behavior. virtual void productRequest_handler( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Send a data product response to the component under test @@ -949,7 +949,7 @@ class ActiveAsyncProductsTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.cpp index 7ecf6271f..4697d2274 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.cpp @@ -1589,22 +1589,22 @@ void ActiveGetProductsTesterBase :: void ActiveGetProductsTesterBase :: pushProductGetEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpGet e = { id, size }; + DpGet e = { id, dataSize }; this->productGetHistory->push_back(e); } Fw::Success::T ActiveGetProductsTesterBase :: productGet_handler( FwDpIdType id, - FwSizeType size, + FwSizeType dataSize, Fw::Buffer& buffer ) { (void) buffer; - this->pushProductGetEntry(id, size); + this->pushProductGetEntry(id, dataSize); return Fw::Success::FAILURE; } @@ -1720,12 +1720,12 @@ Fw::Success ActiveGetProductsTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size, + FwSizeType dataSize, Fw::Buffer& buffer ) { ActiveGetProductsTesterBase* _testerBase = static_cast(callComp); - return _testerBase->productGet_handler(id, size, buffer); + return _testerBase->productGet_handler(id, dataSize, buffer); } void ActiveGetProductsTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.hpp index 56c4dfbd2..97e6b70b2 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGetProductsTesterBase.ref.hpp @@ -846,7 +846,7 @@ class ActiveGetProductsTesterBase : //! Push an entry on the product get history void pushProductGetEntry( FwDpIdType id, //!< The container ID (input) - FwSizeType size //!< The size of the requested buffer (input) + FwSizeType dataSize //!< The data size of the requested buffer (input) ); //! Handle a data product get from the component under test @@ -856,7 +856,7 @@ class ActiveGetProductsTesterBase : //! pushProductGetEntry, allocate a buffer and return SUCCESS. virtual Fw::Success::T productGet_handler( FwDpIdType id, //!< The container ID (input) - FwSizeType size, //!< The size of the requested buffer (input) + FwSizeType dataSize, //!< The data size of the requested buffer (input) Fw::Buffer& buffer //!< The buffer (output) ); @@ -926,7 +926,7 @@ class ActiveGetProductsTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID (input) - FwSizeType size, //!< The size of the requested buffer (input) + FwSizeType dataSize, //!< The data size of the requested buffer (input) Fw::Buffer& buffer //!< The buffer (output) ); diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsTesterBase.ref.cpp index 96447d497..8f89927ed 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsTesterBase.ref.cpp @@ -1643,20 +1643,20 @@ void ActiveGuardedProductsTesterBase :: void ActiveGuardedProductsTesterBase :: pushProductRequestEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpRequest e = { id, size }; + DpRequest e = { id, dataSize }; this->productRequestHistory->push_back(e); } void ActiveGuardedProductsTesterBase :: productRequest_handler( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - this->pushProductRequestEntry(id, size); + this->pushProductRequestEntry(id, dataSize); } void ActiveGuardedProductsTesterBase :: @@ -1783,11 +1783,11 @@ void ActiveGuardedProductsTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { ActiveGuardedProductsTesterBase* _testerBase = static_cast(callComp); - _testerBase->productRequest_handler(id, size); + _testerBase->productRequest_handler(id, dataSize); } void ActiveGuardedProductsTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsTesterBase.ref.hpp index 45dac5078..8de2331aa 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveGuardedProductsTesterBase.ref.hpp @@ -864,7 +864,7 @@ class ActiveGuardedProductsTesterBase : //! Push an entry on the product request history void pushProductRequestEntry( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Handle a data product request from the component under test @@ -873,7 +873,7 @@ class ActiveGuardedProductsTesterBase : //! this behavior. virtual void productRequest_handler( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Send a data product response to the component under test @@ -949,7 +949,7 @@ class ActiveGuardedProductsTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsTesterBase.ref.cpp index 4fc566993..40462863a 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsTesterBase.ref.cpp @@ -1643,20 +1643,20 @@ void ActiveSyncProductsTesterBase :: void ActiveSyncProductsTesterBase :: pushProductRequestEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpRequest e = { id, size }; + DpRequest e = { id, dataSize }; this->productRequestHistory->push_back(e); } void ActiveSyncProductsTesterBase :: productRequest_handler( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - this->pushProductRequestEntry(id, size); + this->pushProductRequestEntry(id, dataSize); } void ActiveSyncProductsTesterBase :: @@ -1783,11 +1783,11 @@ void ActiveSyncProductsTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { ActiveSyncProductsTesterBase* _testerBase = static_cast(callComp); - _testerBase->productRequest_handler(id, size); + _testerBase->productRequest_handler(id, dataSize); } void ActiveSyncProductsTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsTesterBase.ref.hpp index b4ece2925..96be68ba1 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveSyncProductsTesterBase.ref.hpp @@ -864,7 +864,7 @@ class ActiveSyncProductsTesterBase : //! Push an entry on the product request history void pushProductRequestEntry( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Handle a data product request from the component under test @@ -873,7 +873,7 @@ class ActiveSyncProductsTesterBase : //! this behavior. virtual void productRequest_handler( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Send a data product response to the component under test @@ -949,7 +949,7 @@ class ActiveSyncProductsTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestTesterBase.ref.cpp index dc4ed624e..5f8e5431a 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestTesterBase.ref.cpp @@ -3569,20 +3569,20 @@ namespace M { void ActiveTestTesterBase :: pushProductRequestEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpRequest e = { id, size }; + DpRequest e = { id, dataSize }; this->productRequestHistory->push_back(e); } void ActiveTestTesterBase :: productRequest_handler( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - this->pushProductRequestEntry(id, size); + this->pushProductRequestEntry(id, dataSize); } void ActiveTestTesterBase :: @@ -4037,11 +4037,11 @@ namespace M { Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { ActiveTestTesterBase* _testerBase = static_cast(callComp); - _testerBase->productRequest_handler(id, size); + _testerBase->productRequest_handler(id, dataSize); } void ActiveTestTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestTesterBase.ref.hpp index c7b93f3cb..5a0dbdca9 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/ActiveTestTesterBase.ref.hpp @@ -1372,7 +1372,7 @@ namespace M { //! Push an entry on the product request history void pushProductRequestEntry( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Handle a data product request from the component under test @@ -1381,7 +1381,7 @@ namespace M { //! this behavior. virtual void productRequest_handler( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Send a data product response to the component under test @@ -1518,7 +1518,7 @@ namespace M { Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.cpp index f3e302572..dbfb18511 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.cpp @@ -1206,22 +1206,22 @@ void PassiveGetProductsTesterBase :: void PassiveGetProductsTesterBase :: pushProductGetEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpGet e = { id, size }; + DpGet e = { id, dataSize }; this->productGetHistory->push_back(e); } Fw::Success::T PassiveGetProductsTesterBase :: productGet_handler( FwDpIdType id, - FwSizeType size, + FwSizeType dataSize, Fw::Buffer& buffer ) { (void) buffer; - this->pushProductGetEntry(id, size); + this->pushProductGetEntry(id, dataSize); return Fw::Success::FAILURE; } @@ -1337,12 +1337,12 @@ Fw::Success PassiveGetProductsTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size, + FwSizeType dataSize, Fw::Buffer& buffer ) { PassiveGetProductsTesterBase* _testerBase = static_cast(callComp); - return _testerBase->productGet_handler(id, size, buffer); + return _testerBase->productGet_handler(id, dataSize, buffer); } void PassiveGetProductsTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.hpp index 5d1cf508c..198a548c3 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGetProductsTesterBase.ref.hpp @@ -703,7 +703,7 @@ class PassiveGetProductsTesterBase : //! Push an entry on the product get history void pushProductGetEntry( FwDpIdType id, //!< The container ID (input) - FwSizeType size //!< The size of the requested buffer (input) + FwSizeType dataSize //!< The data size of the requested buffer (input) ); //! Handle a data product get from the component under test @@ -713,7 +713,7 @@ class PassiveGetProductsTesterBase : //! pushProductGetEntry, allocate a buffer and return SUCCESS. virtual Fw::Success::T productGet_handler( FwDpIdType id, //!< The container ID (input) - FwSizeType size, //!< The size of the requested buffer (input) + FwSizeType dataSize, //!< The data size of the requested buffer (input) Fw::Buffer& buffer //!< The buffer (output) ); @@ -783,7 +783,7 @@ class PassiveGetProductsTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID (input) - FwSizeType size, //!< The size of the requested buffer (input) + FwSizeType dataSize, //!< The data size of the requested buffer (input) Fw::Buffer& buffer //!< The buffer (output) ); diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsTesterBase.ref.cpp index 1b0f460fb..cd0bfdc14 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsTesterBase.ref.cpp @@ -1260,20 +1260,20 @@ void PassiveGuardedProductsTesterBase :: void PassiveGuardedProductsTesterBase :: pushProductRequestEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpRequest e = { id, size }; + DpRequest e = { id, dataSize }; this->productRequestHistory->push_back(e); } void PassiveGuardedProductsTesterBase :: productRequest_handler( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - this->pushProductRequestEntry(id, size); + this->pushProductRequestEntry(id, dataSize); } void PassiveGuardedProductsTesterBase :: @@ -1400,11 +1400,11 @@ void PassiveGuardedProductsTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { PassiveGuardedProductsTesterBase* _testerBase = static_cast(callComp); - _testerBase->productRequest_handler(id, size); + _testerBase->productRequest_handler(id, dataSize); } void PassiveGuardedProductsTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsTesterBase.ref.hpp index 197ee18d5..bd48bf7bb 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveGuardedProductsTesterBase.ref.hpp @@ -721,7 +721,7 @@ class PassiveGuardedProductsTesterBase : //! Push an entry on the product request history void pushProductRequestEntry( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Handle a data product request from the component under test @@ -730,7 +730,7 @@ class PassiveGuardedProductsTesterBase : //! this behavior. virtual void productRequest_handler( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Send a data product response to the component under test @@ -806,7 +806,7 @@ class PassiveGuardedProductsTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsTesterBase.ref.cpp index 4460fd9cc..93831599e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsTesterBase.ref.cpp @@ -1260,20 +1260,20 @@ void PassiveSyncProductsTesterBase :: void PassiveSyncProductsTesterBase :: pushProductRequestEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpRequest e = { id, size }; + DpRequest e = { id, dataSize }; this->productRequestHistory->push_back(e); } void PassiveSyncProductsTesterBase :: productRequest_handler( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - this->pushProductRequestEntry(id, size); + this->pushProductRequestEntry(id, dataSize); } void PassiveSyncProductsTesterBase :: @@ -1400,11 +1400,11 @@ void PassiveSyncProductsTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { PassiveSyncProductsTesterBase* _testerBase = static_cast(callComp); - _testerBase->productRequest_handler(id, size); + _testerBase->productRequest_handler(id, dataSize); } void PassiveSyncProductsTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsTesterBase.ref.hpp index ef3818955..272fc9d05 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveSyncProductsTesterBase.ref.hpp @@ -721,7 +721,7 @@ class PassiveSyncProductsTesterBase : //! Push an entry on the product request history void pushProductRequestEntry( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Handle a data product request from the component under test @@ -730,7 +730,7 @@ class PassiveSyncProductsTesterBase : //! this behavior. virtual void productRequest_handler( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Send a data product response to the component under test @@ -806,7 +806,7 @@ class PassiveSyncProductsTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestTesterBase.ref.cpp index ad6b2db92..73b5ef361 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestTesterBase.ref.cpp @@ -3041,20 +3041,20 @@ void PassiveTestTesterBase :: void PassiveTestTesterBase :: pushProductRequestEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpRequest e = { id, size }; + DpRequest e = { id, dataSize }; this->productRequestHistory->push_back(e); } void PassiveTestTesterBase :: productRequest_handler( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - this->pushProductRequestEntry(id, size); + this->pushProductRequestEntry(id, dataSize); } void PassiveTestTesterBase :: @@ -3509,11 +3509,11 @@ void PassiveTestTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { PassiveTestTesterBase* _testerBase = static_cast(callComp); - _testerBase->productRequest_handler(id, size); + _testerBase->productRequest_handler(id, dataSize); } void PassiveTestTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestTesterBase.ref.hpp index 359fd29e9..3e8eb3124 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/PassiveTestTesterBase.ref.hpp @@ -1195,7 +1195,7 @@ class PassiveTestTesterBase : //! Push an entry on the product request history void pushProductRequestEntry( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Handle a data product request from the component under test @@ -1204,7 +1204,7 @@ class PassiveTestTesterBase : //! this behavior. virtual void productRequest_handler( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Send a data product response to the component under test @@ -1341,7 +1341,7 @@ class PassiveTestTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsTesterBase.ref.cpp index b54d08764..2e6056ee4 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsTesterBase.ref.cpp @@ -1643,20 +1643,20 @@ void QueuedAsyncProductsTesterBase :: void QueuedAsyncProductsTesterBase :: pushProductRequestEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpRequest e = { id, size }; + DpRequest e = { id, dataSize }; this->productRequestHistory->push_back(e); } void QueuedAsyncProductsTesterBase :: productRequest_handler( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - this->pushProductRequestEntry(id, size); + this->pushProductRequestEntry(id, dataSize); } void QueuedAsyncProductsTesterBase :: @@ -1783,11 +1783,11 @@ void QueuedAsyncProductsTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { QueuedAsyncProductsTesterBase* _testerBase = static_cast(callComp); - _testerBase->productRequest_handler(id, size); + _testerBase->productRequest_handler(id, dataSize); } void QueuedAsyncProductsTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsTesterBase.ref.hpp index 904dc4a22..02e19549a 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedAsyncProductsTesterBase.ref.hpp @@ -864,7 +864,7 @@ class QueuedAsyncProductsTesterBase : //! Push an entry on the product request history void pushProductRequestEntry( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Handle a data product request from the component under test @@ -873,7 +873,7 @@ class QueuedAsyncProductsTesterBase : //! this behavior. virtual void productRequest_handler( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Send a data product response to the component under test @@ -949,7 +949,7 @@ class QueuedAsyncProductsTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.cpp index 358b07840..055213cf9 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.cpp @@ -1589,22 +1589,22 @@ void QueuedGetProductsTesterBase :: void QueuedGetProductsTesterBase :: pushProductGetEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpGet e = { id, size }; + DpGet e = { id, dataSize }; this->productGetHistory->push_back(e); } Fw::Success::T QueuedGetProductsTesterBase :: productGet_handler( FwDpIdType id, - FwSizeType size, + FwSizeType dataSize, Fw::Buffer& buffer ) { (void) buffer; - this->pushProductGetEntry(id, size); + this->pushProductGetEntry(id, dataSize); return Fw::Success::FAILURE; } @@ -1720,12 +1720,12 @@ Fw::Success QueuedGetProductsTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size, + FwSizeType dataSize, Fw::Buffer& buffer ) { QueuedGetProductsTesterBase* _testerBase = static_cast(callComp); - return _testerBase->productGet_handler(id, size, buffer); + return _testerBase->productGet_handler(id, dataSize, buffer); } void QueuedGetProductsTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.hpp index 59578988b..4a993382c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGetProductsTesterBase.ref.hpp @@ -846,7 +846,7 @@ class QueuedGetProductsTesterBase : //! Push an entry on the product get history void pushProductGetEntry( FwDpIdType id, //!< The container ID (input) - FwSizeType size //!< The size of the requested buffer (input) + FwSizeType dataSize //!< The data size of the requested buffer (input) ); //! Handle a data product get from the component under test @@ -856,7 +856,7 @@ class QueuedGetProductsTesterBase : //! pushProductGetEntry, allocate a buffer and return SUCCESS. virtual Fw::Success::T productGet_handler( FwDpIdType id, //!< The container ID (input) - FwSizeType size, //!< The size of the requested buffer (input) + FwSizeType dataSize, //!< The data size of the requested buffer (input) Fw::Buffer& buffer //!< The buffer (output) ); @@ -926,7 +926,7 @@ class QueuedGetProductsTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID (input) - FwSizeType size, //!< The size of the requested buffer (input) + FwSizeType dataSize, //!< The data size of the requested buffer (input) Fw::Buffer& buffer //!< The buffer (output) ); diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsTesterBase.ref.cpp index 817f1767f..709cbe683 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsTesterBase.ref.cpp @@ -1643,20 +1643,20 @@ void QueuedGuardedProductsTesterBase :: void QueuedGuardedProductsTesterBase :: pushProductRequestEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpRequest e = { id, size }; + DpRequest e = { id, dataSize }; this->productRequestHistory->push_back(e); } void QueuedGuardedProductsTesterBase :: productRequest_handler( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - this->pushProductRequestEntry(id, size); + this->pushProductRequestEntry(id, dataSize); } void QueuedGuardedProductsTesterBase :: @@ -1783,11 +1783,11 @@ void QueuedGuardedProductsTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { QueuedGuardedProductsTesterBase* _testerBase = static_cast(callComp); - _testerBase->productRequest_handler(id, size); + _testerBase->productRequest_handler(id, dataSize); } void QueuedGuardedProductsTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsTesterBase.ref.hpp index 211c237ea..9d6223e46 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedGuardedProductsTesterBase.ref.hpp @@ -864,7 +864,7 @@ class QueuedGuardedProductsTesterBase : //! Push an entry on the product request history void pushProductRequestEntry( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Handle a data product request from the component under test @@ -873,7 +873,7 @@ class QueuedGuardedProductsTesterBase : //! this behavior. virtual void productRequest_handler( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Send a data product response to the component under test @@ -949,7 +949,7 @@ class QueuedGuardedProductsTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsTesterBase.ref.cpp index c2fb1c366..b915df908 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsTesterBase.ref.cpp @@ -1643,20 +1643,20 @@ void QueuedSyncProductsTesterBase :: void QueuedSyncProductsTesterBase :: pushProductRequestEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpRequest e = { id, size }; + DpRequest e = { id, dataSize }; this->productRequestHistory->push_back(e); } void QueuedSyncProductsTesterBase :: productRequest_handler( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - this->pushProductRequestEntry(id, size); + this->pushProductRequestEntry(id, dataSize); } void QueuedSyncProductsTesterBase :: @@ -1783,11 +1783,11 @@ void QueuedSyncProductsTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { QueuedSyncProductsTesterBase* _testerBase = static_cast(callComp); - _testerBase->productRequest_handler(id, size); + _testerBase->productRequest_handler(id, dataSize); } void QueuedSyncProductsTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsTesterBase.ref.hpp index 84fc5f83f..642c3f36d 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedSyncProductsTesterBase.ref.hpp @@ -864,7 +864,7 @@ class QueuedSyncProductsTesterBase : //! Push an entry on the product request history void pushProductRequestEntry( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Handle a data product request from the component under test @@ -873,7 +873,7 @@ class QueuedSyncProductsTesterBase : //! this behavior. virtual void productRequest_handler( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Send a data product response to the component under test @@ -949,7 +949,7 @@ class QueuedSyncProductsTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestTesterBase.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestTesterBase.ref.cpp index aca5150fd..cdaa6d660 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestTesterBase.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestTesterBase.ref.cpp @@ -3567,20 +3567,20 @@ void QueuedTestTesterBase :: void QueuedTestTesterBase :: pushProductRequestEntry( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - DpRequest e = { id, size }; + DpRequest e = { id, dataSize }; this->productRequestHistory->push_back(e); } void QueuedTestTesterBase :: productRequest_handler( FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { - this->pushProductRequestEntry(id, size); + this->pushProductRequestEntry(id, dataSize); } void QueuedTestTesterBase :: @@ -4035,11 +4035,11 @@ void QueuedTestTesterBase :: Fw::PassiveComponentBase* const callComp, NATIVE_INT_TYPE portNum, FwDpIdType id, - FwSizeType size + FwSizeType dataSize ) { QueuedTestTesterBase* _testerBase = static_cast(callComp); - _testerBase->productRequest_handler(id, size); + _testerBase->productRequest_handler(id, dataSize); } void QueuedTestTesterBase :: diff --git a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestTesterBase.ref.hpp b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestTesterBase.ref.hpp index 8b2eefbf0..99ab7197b 100644 --- a/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestTesterBase.ref.hpp +++ b/compiler/tools/fpp-to-cpp/test/component/test-base/QueuedTestTesterBase.ref.hpp @@ -1370,7 +1370,7 @@ class QueuedTestTesterBase : //! Push an entry on the product request history void pushProductRequestEntry( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Handle a data product request from the component under test @@ -1379,7 +1379,7 @@ class QueuedTestTesterBase : //! this behavior. virtual void productRequest_handler( FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Send a data product response to the component under test @@ -1516,7 +1516,7 @@ class QueuedTestTesterBase : Fw::PassiveComponentBase* const callComp, //!< The component instance NATIVE_INT_TYPE portNum, //!< The port number FwDpIdType id, //!< The container ID - FwSizeType size //!< The size of the requested buffer + FwSizeType dataSize //!< The data size of the requested buffer ); //! Static function for port from_productSendOut diff --git a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/Dp.fpp b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/Dp.fpp index d7725a338..8f564c34b 100644 --- a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/Dp.fpp +++ b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/Dp.fpp @@ -18,25 +18,27 @@ module Fw { @ Port for synchronously getting a data product buffer @ Returns the status @ - @ On return, buffer should be set to a valid buffer of at least - @ the requested size (if status is SUCCESS) or an invalid buffer - @ (if status is FAILURE). + @ On return, buffer should be set to a valid buffer large enough + @ to hold a data product packet with the requested data size (if + @ status is SUCCESS) or an invalid buffer (if status is FAILURE). port DpGet( @ The container ID (input) $id: FwDpIdType - @ The size of the requested buffer (input) - $size: FwSizeType + @ The data size of the requested buffer (input) + dataSize: FwSizeType @ The buffer (output) ref buffer: Fw.Buffer ) -> Fw.Success @ Port for sending a request for a data product buffer to - @ back a data product container + @ back a data product container. The request is for a buffer + @ large enough to hold a data product packet with the requested + @ data size. port DpRequest( @ The container ID $id: FwDpIdType - @ The size of the requested buffer - $size: FwSizeType + @ The data size of the requested buffer + dataSize: FwSizeType ) @ Port for receiving a response to a buffer request diff --git a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp index 7ecd72706..a41dc972e 100644 --- a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp +++ b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp @@ -80,7 +80,7 @@ Fw::SerializeStatus DpContainer::serializeHeader() { void DpContainer::setBuffer(const Buffer& buffer) { this->buffer = buffer; // Move the serialization index to the end of the header - const auto status = this->moveSerToOffset(Header::SIZE); + const auto status = this->moveSerToOffset(DATA_OFFSET); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } diff --git a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp index e28c0a027..a0d83a3c5 100644 --- a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp +++ b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp @@ -10,6 +10,7 @@ #include "Fw/Buffer/Buffer.hpp" #include "Fw/Dp/DpStateEnumAc.hpp" #include "Fw/Time/Time.hpp" +#include "Utils/Hash/Hash.hpp" #include "config/FppConstantsAc.hpp" #include "config/ProcTypeEnumAc.hpp" @@ -19,7 +20,7 @@ namespace Fw { class DpContainer { public: // ---------------------------------------------------------------------- - // Types + // Constants and Types // ---------------------------------------------------------------------- //! A DpContainer packet header @@ -46,6 +47,14 @@ class DpContainer { static constexpr FwSizeType SIZE = DATA_SIZE_OFFSET + sizeof(FwSizeType); }; + //! The header hash offset + static constexpr FwSizeType HEADER_HASH_OFFSET = Header::SIZE; + //! The data offset + //! FIXME: This should be HEADER_HASH_OFFSET + HASH_DIGEST_LENGTH + static constexpr FwSizeType DATA_OFFSET = HEADER_HASH_OFFSET; + //! The minimum packet size + static constexpr FwSizeType MIN_PACKET_SIZE = Header::SIZE + 2 * HASH_DIGEST_LENGTH; + public: // ---------------------------------------------------------------------- // Constructor @@ -77,6 +86,7 @@ class DpContainer { Fw::Buffer getBuffer() const { return this->buffer; } //! Get the packet size corresponding to the data size + // FIXME: This should be augmented by 2 * HASH_DIGEST_LENGTH FwSizeType getPacketSize() const { return Header::SIZE + this->dataSize; } //! Get the priority @@ -134,6 +144,17 @@ class DpContainer { void setBuffer(const Buffer& buffer //!< The buffer ); + public: + // ---------------------------------------------------------------------- + // Public static functions + // ---------------------------------------------------------------------- + + //! Get the packet size for a given data size + static constexpr FwSizeType getPacketSizeForDataSize(FwSizeType dataSize //!< The data size + ) { + return Header::SIZE + dataSize + 2 * HASH_DIGEST_LENGTH; + } + PRIVATE: // ---------------------------------------------------------------------- // Private member functions From 9ca8a4603519f8cb71c7004fd028a6a277dfebe0 Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Wed, 13 Dec 2023 11:38:06 -0800 Subject: [PATCH 6/9] Revise Dp code gen --- .../ComponentDataProducts.scala | 20 ++++----- .../ActiveAsyncProductsComponentAc.ref.cpp | 41 ++++++++----------- .../base/ActiveGetProductsComponentAc.ref.cpp | 41 ++++++++----------- .../ActiveGuardedProductsComponentAc.ref.cpp | 41 ++++++++----------- .../ActiveSyncProductsComponentAc.ref.cpp | 41 ++++++++----------- .../base/ActiveTestComponentAc.ref.cpp | 41 ++++++++----------- .../PassiveGetProductsComponentAc.ref.cpp | 41 ++++++++----------- .../PassiveGuardedProductsComponentAc.ref.cpp | 41 ++++++++----------- .../PassiveSyncProductsComponentAc.ref.cpp | 41 ++++++++----------- .../base/PassiveTestComponentAc.ref.cpp | 41 ++++++++----------- .../QueuedAsyncProductsComponentAc.ref.cpp | 41 ++++++++----------- .../base/QueuedGetProductsComponentAc.ref.cpp | 41 ++++++++----------- .../QueuedGuardedProductsComponentAc.ref.cpp | 41 ++++++++----------- .../QueuedSyncProductsComponentAc.ref.cpp | 41 ++++++++----------- .../base/QueuedTestComponentAc.ref.cpp | 41 ++++++++----------- .../test/fprime/Fw/Dp/DpContainer.cpp | 18 +++++--- .../test/fprime/Fw/Dp/DpContainer.hpp | 25 ++++++++--- 17 files changed, 294 insertions(+), 343 deletions(-) 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 0d58e97d7..61fba640e 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala @@ -377,16 +377,15 @@ case class ComponentDataProducts ( ), CppDoc.Type("Fw::SerializeStatus"), lines( - s"""|Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); - |const FwSizeType sizeDelta = + s"""|const FwSizeType sizeDelta = | sizeof(FwDpIdType) + | $typeSize; |Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - |if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + |if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { | const FwDpIdType id = this->baseId + RecordId::$name; - | status = serializeRepr.serialize(id); + | status = this->dataBuffer.serialize(id); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - | status = serializeRepr.serialize(elt); + | status = this->dataBuffer.serialize(elt); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); | this->dataSize += sizeDelta; |} @@ -425,27 +424,26 @@ case class ComponentDataProducts ( // Optimize the U8 case case Type.U8 => """| const bool omitSerializedLength = true; - | status = serializeRepr.serialize(array, size, omitSerializedLength); + | status = this->dataBuffer.serialize(array, size, omitSerializedLength); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);""" case _ => """| for (FwSizeType i = 0; i < size; i++) { - | status = serializeRepr.serialize(array[i]); + | status = this->dataBuffer.serialize(array[i]); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); | }""" }).stripMargin lines( s"""|FW_ASSERT(array != nullptr); - |Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); |const FwSizeType sizeDelta = | sizeof(FwDpIdType) + | sizeof(FwSizeType) + | size * $eltSize; |Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - |if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + |if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { | const FwDpIdType id = this->baseId + RecordId::$name; - | status = serializeRepr.serialize(id); + | status = this->dataBuffer.serialize(id); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - | status = serializeRepr.serialize(size); + | status = this->dataBuffer.serialize(size); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); |$serializeElts | this->dataSize += sizeDelta; diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp index 12a848fe0..43a537d0e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp @@ -101,20 +101,19 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * ActiveAsyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -128,16 +127,15 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: serializeRecord_DataRecord(const ActiveAsyncProducts_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + ActiveAsyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -154,20 +152,19 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -181,16 +178,15 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -207,20 +203,19 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp index 88fe650bb..78867c646 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp @@ -99,20 +99,19 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * ActiveGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -126,16 +125,15 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: serializeRecord_DataRecord(const ActiveGetProducts_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + ActiveGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -152,20 +150,19 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -179,16 +176,15 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -205,20 +201,19 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp index 6b79c7c2c..476880296 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp @@ -99,20 +99,19 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * ActiveGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -126,16 +125,15 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: serializeRecord_DataRecord(const ActiveGuardedProducts_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + ActiveGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -152,20 +150,19 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -179,16 +176,15 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -205,20 +201,19 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp index 2f23f7628..38cf3291b 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp @@ -99,20 +99,19 @@ Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * ActiveSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -126,16 +125,15 @@ Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: serializeRecord_DataRecord(const ActiveSyncProducts_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + ActiveSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -152,20 +150,19 @@ Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -179,16 +176,15 @@ Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -205,20 +201,19 @@ Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp index 5a13f9c37..d85baacb3 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp @@ -139,20 +139,19 @@ namespace M { ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * M::ActiveTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -166,16 +165,15 @@ namespace M { Fw::SerializeStatus ActiveTestComponentBase::DpContainer :: serializeRecord_DataRecord(const M::ActiveTest_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + M::ActiveTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -192,20 +190,19 @@ namespace M { ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -219,16 +216,15 @@ namespace M { Fw::SerializeStatus ActiveTestComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -245,20 +241,19 @@ namespace M { ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp index ae73847fe..b95493d94 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp @@ -43,20 +43,19 @@ Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * PassiveGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -70,16 +69,15 @@ Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: serializeRecord_DataRecord(const PassiveGetProducts_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + PassiveGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -96,20 +94,19 @@ Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -123,16 +120,15 @@ Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -149,20 +145,19 @@ Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp index 9c19effe4..d8ddf7c4e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp @@ -43,20 +43,19 @@ Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * PassiveGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -70,16 +69,15 @@ Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: serializeRecord_DataRecord(const PassiveGuardedProducts_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + PassiveGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -96,20 +94,19 @@ Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -123,16 +120,15 @@ Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -149,20 +145,19 @@ Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp index dacca8188..0247de840 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp @@ -43,20 +43,19 @@ Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * PassiveSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -70,16 +69,15 @@ Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: serializeRecord_DataRecord(const PassiveSyncProducts_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + PassiveSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -96,20 +94,19 @@ Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -123,16 +120,15 @@ Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -149,20 +145,19 @@ Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp index 588632671..07b39f742 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp @@ -43,20 +43,19 @@ Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * PassiveTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -70,16 +69,15 @@ Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: serializeRecord_DataRecord(const PassiveTest_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + PassiveTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -96,20 +94,19 @@ Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -123,16 +120,15 @@ Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -149,20 +145,19 @@ Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp index df78f30a3..9615059e6 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp @@ -101,20 +101,19 @@ Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * QueuedAsyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -128,16 +127,15 @@ Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: serializeRecord_DataRecord(const QueuedAsyncProducts_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + QueuedAsyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -154,20 +152,19 @@ Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -181,16 +178,15 @@ Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -207,20 +203,19 @@ Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp index eaae0e1b8..c3bcdf483 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp @@ -99,20 +99,19 @@ Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * QueuedGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -126,16 +125,15 @@ Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: serializeRecord_DataRecord(const QueuedGetProducts_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + QueuedGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -152,20 +150,19 @@ Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -179,16 +176,15 @@ Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -205,20 +201,19 @@ Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp index 3b95a9b62..4d08c074b 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp @@ -99,20 +99,19 @@ Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * QueuedGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -126,16 +125,15 @@ Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: serializeRecord_DataRecord(const QueuedGuardedProducts_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + QueuedGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -152,20 +150,19 @@ Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -179,16 +176,15 @@ Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -205,20 +201,19 @@ Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp index 31b6af063..12261d81d 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp @@ -99,20 +99,19 @@ Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * QueuedSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -126,16 +125,15 @@ Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: serializeRecord_DataRecord(const QueuedSyncProducts_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + QueuedSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -152,20 +150,19 @@ Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -179,16 +176,15 @@ Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -205,20 +201,19 @@ Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp index ea79d2bd0..12c17ba35 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp @@ -137,20 +137,19 @@ Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * QueuedTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -164,16 +163,15 @@ Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: serializeRecord_DataRecord(const QueuedTest_Data& elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + QueuedTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -190,20 +188,19 @@ Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = serializeRepr.serialize(array[i]); + status = this->dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } this->dataSize += sizeDelta; @@ -217,16 +214,15 @@ Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: serializeRecord_U32Record(U32 elt) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(elt); + status = this->dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } @@ -243,20 +239,19 @@ Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: ) { FW_ASSERT(array != nullptr); - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); const FwSizeType sizeDelta = sizeof(FwDpIdType) + sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (serializeRepr.getBuffLength() + sizeDelta <= serializeRepr.getBuffCapacity()) { + if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = serializeRepr.serialize(id); + status = this->dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = serializeRepr.serialize(size); + status = this->dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = serializeRepr.serialize(array, size, omitSerializedLength); + status = this->dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); this->dataSize += sizeDelta; } diff --git a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp index a41dc972e..e5a09f25a 100644 --- a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp +++ b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp @@ -17,14 +17,15 @@ namespace Fw { // ---------------------------------------------------------------------- DpContainer::DpContainer(FwDpIdType id, const Fw::Buffer& buffer) - : id(id), priority(0), procTypes(0), dpState(), dataSize(0), buffer() { + : id(id), priority(0), procTypes(0), dpState(), dataSize(0), buffer(), dataBuffer() { // Initialize the user data field this->initUserDataField(); - // Set the buffer + // Set the packet buffer + // This action also updates the data buffer this->setBuffer(buffer); } -DpContainer::DpContainer() : id(0), priority(0), procTypes(0), dataSize(0), buffer() { +DpContainer::DpContainer() : id(0), priority(0), procTypes(0), dataSize(0), buffer(), dataBuffer() { // Initialize the user data field this->initUserDataField(); } @@ -79,9 +80,16 @@ Fw::SerializeStatus DpContainer::serializeHeader() { void DpContainer::setBuffer(const Buffer& buffer) { this->buffer = buffer; + FW_ASSERT(buffer.getSize() >= MIN_PACKET_SIZE, buffer.getSize(), MIN_PACKET_SIZE); // Move the serialization index to the end of the header - const auto status = this->moveSerToOffset(DATA_OFFSET); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // FIXME: Use the data buffer instead + //const auto status = this->moveSerToOffset(DATA_OFFSET); + //FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Initialize the data buffer + U8 *const buffPtr = buffer.getData(); + U8 *const dataPtr = &buffPtr[DATA_OFFSET]; + const FwSizeType dataCapacity = buffer.getSize() - MIN_PACKET_SIZE; + this->dataBuffer.setExtBuffer(dataPtr, dataCapacity); } // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp index a0d83a3c5..c6f618036 100644 --- a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp +++ b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp @@ -50,8 +50,21 @@ class DpContainer { //! The header hash offset static constexpr FwSizeType HEADER_HASH_OFFSET = Header::SIZE; //! The data offset - //! FIXME: This should be HEADER_HASH_OFFSET + HASH_DIGEST_LENGTH - static constexpr FwSizeType DATA_OFFSET = HEADER_HASH_OFFSET; + static constexpr FwSizeType DATA_OFFSET = HEADER_HASH_OFFSET + 2 * + HASH_DIGEST_LENGTH; + // FIXME: The data offset should be HEADER_HASH_OFFSET + HASH_DIGEST_LENGTH + // The other hash digest length should go at the end. + // + // Right now, since everything is in one buffer, we have to put all the + // reserved space for hashes at the beginning. + // We will fix this by maintaining an external serialize buffer for the + // data. The capacity of that buffer is the max data size. + // The FPP code gen will need to be modified to serialize data into this + // buffer. + //! The data hash offset + static constexpr FwSizeType DATA_HASH_OFFSET = HEADER_HASH_OFFSET + HASH_DIGEST_LENGTH; + // FIXME: See above + //! The minimum packet size static constexpr FwSizeType MIN_PACKET_SIZE = Header::SIZE + 2 * HASH_DIGEST_LENGTH; @@ -86,8 +99,7 @@ class DpContainer { Fw::Buffer getBuffer() const { return this->buffer; } //! Get the packet size corresponding to the data size - // FIXME: This should be augmented by 2 * HASH_DIGEST_LENGTH - FwSizeType getPacketSize() const { return Header::SIZE + this->dataSize; } + FwSizeType getPacketSize() const { return getPacketSizeForDataSize(this->dataSize); } //! Get the priority //! \return The priority @@ -141,7 +153,7 @@ class DpContainer { } //! Set the packet buffer - void setBuffer(const Buffer& buffer //!< The buffer + void setBuffer(const Buffer& buffer //!< The packet buffer ); public: @@ -197,6 +209,9 @@ class DpContainer { //! The packet buffer Buffer buffer; + + //! The data buffer + Fw::ExternalSerializeBuffer dataBuffer; }; } // end namespace Fw From a3653fe0b88ae6e123152f5cf1bb475e1b1e04ed Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Wed, 13 Dec 2023 16:49:10 -0800 Subject: [PATCH 7/9] Revise dp code gen --- .../ComponentDataProducts.scala | 5 +- .../ActiveAsyncProductsComponentAc.ref.cpp | 5 +- .../base/ActiveGetProductsComponentAc.ref.cpp | 5 +- .../ActiveGuardedProductsComponentAc.ref.cpp | 5 +- .../ActiveSyncProductsComponentAc.ref.cpp | 5 +- .../base/ActiveTestComponentAc.ref.cpp | 5 +- .../PassiveGetProductsComponentAc.ref.cpp | 5 +- .../PassiveGuardedProductsComponentAc.ref.cpp | 5 +- .../PassiveSyncProductsComponentAc.ref.cpp | 5 +- .../base/PassiveTestComponentAc.ref.cpp | 5 +- .../QueuedAsyncProductsComponentAc.ref.cpp | 5 +- .../base/QueuedGetProductsComponentAc.ref.cpp | 5 +- .../QueuedGuardedProductsComponentAc.ref.cpp | 5 +- .../QueuedSyncProductsComponentAc.ref.cpp | 5 +- .../base/QueuedTestComponentAc.ref.cpp | 5 +- .../test/fprime/Fw/Dp/DpContainer.cpp | 105 +++++++++++------- .../test/fprime/Fw/Dp/DpContainer.hpp | 41 ++++--- 17 files changed, 131 insertions(+), 90 deletions(-) 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 61fba640e..15961c81d 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala @@ -88,8 +88,9 @@ case class ComponentDataProducts ( |} |container.setTimeTag(timeTag); |// Serialize the header into the packet - |Fw::SerializeStatus status = container.serializeHeader(); - |FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + |container.serializeHeader(); + |// Update the data hash + |container.updateDataHash(); |// Update the size of the buffer according to the data size |const FwSizeType packetSize = container.getPacketSize(); |Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp index 43a537d0e..92660d72c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveAsyncProductsComponentAc.ref.cpp @@ -2864,8 +2864,9 @@ void ActiveAsyncProductsComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp index 78867c646..f8abafe14 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGetProductsComponentAc.ref.cpp @@ -2711,8 +2711,9 @@ void ActiveGetProductsComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp index 476880296..c92792378 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveGuardedProductsComponentAc.ref.cpp @@ -2820,8 +2820,9 @@ void ActiveGuardedProductsComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp index 38cf3291b..67444d385 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveSyncProductsComponentAc.ref.cpp @@ -2814,8 +2814,9 @@ void ActiveSyncProductsComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp index d85baacb3..cd2a4532c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/ActiveTestComponentAc.ref.cpp @@ -5653,8 +5653,9 @@ namespace M { } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp index b95493d94..854828ef3 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGetProductsComponentAc.ref.cpp @@ -1881,8 +1881,9 @@ void PassiveGetProductsComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp index d8ddf7c4e..e74066a61 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveGuardedProductsComponentAc.ref.cpp @@ -1990,8 +1990,9 @@ void PassiveGuardedProductsComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp index 0247de840..7aab9e0df 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveSyncProductsComponentAc.ref.cpp @@ -1984,8 +1984,9 @@ void PassiveSyncProductsComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp index 07b39f742..2e98dca2c 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/PassiveTestComponentAc.ref.cpp @@ -4108,8 +4108,9 @@ void PassiveTestComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp index 9615059e6..50207414e 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedAsyncProductsComponentAc.ref.cpp @@ -2864,8 +2864,9 @@ void QueuedAsyncProductsComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp index c3bcdf483..d4f15980a 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGetProductsComponentAc.ref.cpp @@ -2711,8 +2711,9 @@ void QueuedGetProductsComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp index 4d08c074b..aedd5e02a 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedGuardedProductsComponentAc.ref.cpp @@ -2820,8 +2820,9 @@ void QueuedGuardedProductsComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp index 12261d81d..fd40022e9 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedSyncProductsComponentAc.ref.cpp @@ -2814,8 +2814,9 @@ void QueuedSyncProductsComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp index 12c17ba35..b150ece9a 100644 --- a/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp +++ b/compiler/tools/fpp-to-cpp/test/component/base/QueuedTestComponentAc.ref.cpp @@ -5651,8 +5651,9 @@ void QueuedTestComponentBase :: } container.setTimeTag(timeTag); // Serialize the header into the packet - Fw::SerializeStatus status = container.serializeHeader(); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + container.serializeHeader(); + // Update the data hash + container.updateDataHash(); // Update the size of the buffer according to the data size const FwSizeType packetSize = container.getPacketSize(); Fw::Buffer buffer = container.getBuffer(); diff --git a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp index e5a09f25a..2b4baa53f 100644 --- a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp +++ b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.cpp @@ -36,60 +36,81 @@ DpContainer::DpContainer() : id(0), priority(0), procTypes(0), dataSize(0), buff Fw::SerializeStatus DpContainer::moveSerToOffset(FwSizeType offset //!< The offset ) { - auto& serializeRepr = this->buffer.getSerializeRepr(); + Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); return serializeRepr.moveSerToOffset(offset); } -Fw::SerializeStatus DpContainer::serializeHeader() { - auto& serializeRepr = this->buffer.getSerializeRepr(); +void DpContainer::serializeHeader() { + Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); // Reset serialization serializeRepr.resetSer(); - // Serialize the header - Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (Header::SIZE <= serializeRepr.getBuffCapacity()) { - // Serialize the packet type - status = serializeRepr.serialize(static_cast(Fw::ComPacket::FW_PACKET_DP)); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - // Serialize the container id - status = serializeRepr.serialize(this->id); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - // Serialize the priority - status = serializeRepr.serialize(this->priority); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - // Serialize the time tag - status = serializeRepr.serialize(this->timeTag); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - // Serialize the processing types - status = serializeRepr.serialize(this->procTypes); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - // Serialize the user data - const bool omitLength = true; - status = serializeRepr.serialize(this->userData, sizeof userData, omitLength); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - // Serialize the data product state - status = serializeRepr.serialize(this->dpState); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - // Serialize the data size - status = serializeRepr.serialize(this->dataSize); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - } else { - status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; - } - return status; + // Serialize the packet type + Fw::SerializeStatus status = + serializeRepr.serialize(static_cast(Fw::ComPacket::FW_PACKET_DP)); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the container id + status = serializeRepr.serialize(this->id); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the priority + status = serializeRepr.serialize(this->priority); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the time tag + status = serializeRepr.serialize(this->timeTag); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the processing types + status = serializeRepr.serialize(this->procTypes); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the user data + const bool omitLength = true; + status = serializeRepr.serialize(this->userData, sizeof userData, omitLength); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the data product state + status = serializeRepr.serialize(this->dpState); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Serialize the data size + status = serializeRepr.serialize(this->dataSize); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + // Update the header hash + this->updateHeaderHash(); } void DpContainer::setBuffer(const Buffer& buffer) { + // Set the buffer this->buffer = buffer; + // Check that the buffer is large enough to hold a data product packet FW_ASSERT(buffer.getSize() >= MIN_PACKET_SIZE, buffer.getSize(), MIN_PACKET_SIZE); - // Move the serialization index to the end of the header - // FIXME: Use the data buffer instead - //const auto status = this->moveSerToOffset(DATA_OFFSET); - //FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); // Initialize the data buffer - U8 *const buffPtr = buffer.getData(); - U8 *const dataPtr = &buffPtr[DATA_OFFSET]; + U8* const buffAddr = buffer.getData(); const FwSizeType dataCapacity = buffer.getSize() - MIN_PACKET_SIZE; - this->dataBuffer.setExtBuffer(dataPtr, dataCapacity); + // Check that data buffer is in bounds for packet buffer + FW_ASSERT(DATA_OFFSET + dataCapacity <= buffer.getSize()); + U8* const dataAddr = &buffAddr[DATA_OFFSET]; + this->dataBuffer.setExtBuffer(dataAddr, dataCapacity); +} + +void DpContainer::updateHeaderHash() { + Utils::HashBuffer hashBuffer; + U8* const buffAddr = this->buffer.getData(); + Utils::Hash::hash(buffAddr, Header::SIZE, hashBuffer); + ExternalSerializeBuffer serialBuffer(&buffAddr[HEADER_HASH_OFFSET], HASH_DIGEST_LENGTH); + const Fw::SerializeStatus status = hashBuffer.copyRaw(serialBuffer, HASH_DIGEST_LENGTH); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); +} + +void DpContainer::updateDataHash() { + Utils::HashBuffer hashBuffer; + U8* const buffAddrBase = this->buffer.getData(); + const U8* const dataAddr = &buffAddrBase[DATA_OFFSET]; + const FwSizeType dataSize = this->getDataSize(); + const FwSizeType bufferSize = buffer.getSize(); + FW_ASSERT(DATA_OFFSET + dataSize <= bufferSize, DATA_OFFSET + dataSize, bufferSize); + Utils::Hash::hash(dataAddr, dataSize, hashBuffer); + const FwSizeType dataHashOffset = this->getDataHashOffset(); + U8* const dataHashAddr = &buffAddrBase[dataHashOffset]; + FW_ASSERT(dataHashOffset + HASH_DIGEST_LENGTH <= bufferSize, dataHashOffset + HASH_DIGEST_LENGTH, bufferSize); + ExternalSerializeBuffer serialBuffer(dataHashAddr, HASH_DIGEST_LENGTH); + const Fw::SerializeStatus status = hashBuffer.copyRaw(serialBuffer, HASH_DIGEST_LENGTH); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } // ---------------------------------------------------------------------- diff --git a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp index c6f618036..7a5a8f4b8 100644 --- a/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp +++ b/compiler/tools/fpp-to-cpp/test/fprime/Fw/Dp/DpContainer.hpp @@ -50,22 +50,10 @@ class DpContainer { //! The header hash offset static constexpr FwSizeType HEADER_HASH_OFFSET = Header::SIZE; //! The data offset - static constexpr FwSizeType DATA_OFFSET = HEADER_HASH_OFFSET + 2 * - HASH_DIGEST_LENGTH; - // FIXME: The data offset should be HEADER_HASH_OFFSET + HASH_DIGEST_LENGTH - // The other hash digest length should go at the end. - // - // Right now, since everything is in one buffer, we have to put all the - // reserved space for hashes at the beginning. - // We will fix this by maintaining an external serialize buffer for the - // data. The capacity of that buffer is the max data size. - // The FPP code gen will need to be modified to serialize data into this - // buffer. - //! The data hash offset - static constexpr FwSizeType DATA_HASH_OFFSET = HEADER_HASH_OFFSET + HASH_DIGEST_LENGTH; - // FIXME: See above - + static constexpr FwSizeType DATA_OFFSET = HEADER_HASH_OFFSET + HASH_DIGEST_LENGTH; //! The minimum packet size + //! Reserve space for the header, the header hash, and the data hash + //! This is also the number of non-data bytes in the packet static constexpr FwSizeType MIN_PACKET_SIZE = Header::SIZE + 2 * HASH_DIGEST_LENGTH; public: @@ -118,9 +106,8 @@ class DpContainer { Fw::SerializeStatus moveSerToOffset(FwSizeType offset //!< The offset ); - //! Serialize the header into the packet buffer - //! \return The serialize status - Fw::SerializeStatus serializeHeader(); + //! Serialize the header into the packet buffer and update the header hash + void serializeHeader(); //! Set the id void setId(FwDpIdType id //!< The id @@ -152,10 +139,28 @@ class DpContainer { this->dpState = dpState; } + //! Set the data size + void setDataSize(FwSizeType dataSize //!< The data size + ) { + this->dataSize = dataSize; + } + //! Set the packet buffer void setBuffer(const Buffer& buffer //!< The packet buffer ); + //! Update the header hash + void updateHeaderHash(); + + //! Get the data hash offset + FwSizeType getDataHashOffset() const { + // Data hash goes after the header, the header hash, and the data + return Header::SIZE + HASH_DIGEST_LENGTH + this->dataSize; + } + + //! Update the data hash + void updateDataHash(); + public: // ---------------------------------------------------------------------- // Public static functions From 327927161c8a4e75dbb32b68d9eff946424acc9b Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Wed, 3 Jan 2024 11:18:13 -0800 Subject: [PATCH 8/9] Work around CI issue Disable use of python3 when it's not available --- compiler/tools/fpp-to-json/test/run | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/tools/fpp-to-json/test/run b/compiler/tools/fpp-to-json/test/run index 5b83ae03c..63efafa04 100755 --- a/compiler/tools/fpp-to-json/test/run +++ b/compiler/tools/fpp-to-json/test/run @@ -25,7 +25,13 @@ run_test() } && \ { # Validate the location map - python3 python/locationMapValidator.py fpp-ast.json fpp-loc-map.json + if which python4 > /dev/null 2>&1 + then + python3 python/locationMapValidator.py fpp-ast.json fpp-loc-map.json + else + # Work around an issue in CI + echo "python3 is not available; skipping map validation" 1>&2 + fi } && \ { # Clean up From b53c665ba02edb5ee8bcd3c96e48909dabb1408d Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Wed, 3 Jan 2024 11:19:36 -0800 Subject: [PATCH 9/9] Fix typo --- compiler/tools/fpp-to-json/test/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/tools/fpp-to-json/test/run b/compiler/tools/fpp-to-json/test/run index 63efafa04..b0088aa05 100755 --- a/compiler/tools/fpp-to-json/test/run +++ b/compiler/tools/fpp-to-json/test/run @@ -25,7 +25,7 @@ run_test() } && \ { # Validate the location map - if which python4 > /dev/null 2>&1 + if which python3 > /dev/null 2>&1 then python3 python/locationMapValidator.py fpp-ast.json fpp-loc-map.json else