From 0cef7beac7f920eb013fd613b91045024cf0fbc7 Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Fri, 26 Jan 2024 14:40:45 -0800 Subject: [PATCH 1/2] Revise container member names Use m_ prefix --- .../ComponentDataProducts.scala | 20 ++++---- .../ActiveAsyncProductsComponentAc.ref.cpp | 46 +++++++++---------- .../base/ActiveGetProductsComponentAc.ref.cpp | 46 +++++++++---------- .../ActiveGuardedProductsComponentAc.ref.cpp | 46 +++++++++---------- .../ActiveSyncProductsComponentAc.ref.cpp | 46 +++++++++---------- .../base/ActiveTestComponentAc.ref.cpp | 46 +++++++++---------- .../PassiveGetProductsComponentAc.ref.cpp | 46 +++++++++---------- .../PassiveGuardedProductsComponentAc.ref.cpp | 46 +++++++++---------- .../PassiveSyncProductsComponentAc.ref.cpp | 46 +++++++++---------- .../base/PassiveTestComponentAc.ref.cpp | 46 +++++++++---------- .../QueuedAsyncProductsComponentAc.ref.cpp | 46 +++++++++---------- .../base/QueuedGetProductsComponentAc.ref.cpp | 46 +++++++++---------- .../QueuedGuardedProductsComponentAc.ref.cpp | 46 +++++++++---------- .../QueuedSyncProductsComponentAc.ref.cpp | 46 +++++++++---------- .../base/QueuedTestComponentAc.ref.cpp | 46 +++++++++---------- 15 files changed, 332 insertions(+), 332 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 15961c81d..606de3205 100644 --- a/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala +++ b/compiler/lib/src/main/scala/codegen/CppWriter/ComponentCppWriter/ComponentDataProducts.scala @@ -382,13 +382,13 @@ case class ComponentDataProducts ( | sizeof(FwDpIdType) + | $typeSize; |Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - |if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + |if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { | const FwDpIdType id = this->baseId + RecordId::$name; - | status = this->dataBuffer.serialize(id); + | status = this->m_dataBuffer.serialize(id); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - | status = this->dataBuffer.serialize(elt); + | status = this->m_dataBuffer.serialize(elt); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - | this->dataSize += sizeDelta; + | this->m_dataSize += sizeDelta; |} |else { | status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -425,11 +425,11 @@ case class ComponentDataProducts ( // Optimize the U8 case case Type.U8 => """| const bool omitSerializedLength = true; - | status = this->dataBuffer.serialize(array, size, omitSerializedLength); + | status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status);""" case _ => """| for (FwSizeType i = 0; i < size; i++) { - | status = this->dataBuffer.serialize(array[i]); + | status = this->m_dataBuffer.serialize(array[i]); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); | }""" }).stripMargin @@ -440,14 +440,14 @@ case class ComponentDataProducts ( | sizeof(FwSizeType) + | size * $eltSize; |Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - |if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + |if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { | const FwDpIdType id = this->baseId + RecordId::$name; - | status = this->dataBuffer.serialize(id); + | status = this->m_dataBuffer.serialize(id); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - | status = this->dataBuffer.serialize(size); + | status = this->m_dataBuffer.serialize(size); | FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); |$serializeElts - | this->dataSize += sizeDelta; + | this->m_dataSize += sizeDelta; |} |else { | status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 f020dcf4e..d9a7c7f42 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 @@ -105,17 +105,17 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * ActiveAsyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -130,13 +130,13 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + ActiveAsyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -156,17 +156,17 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -181,13 +181,13 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -207,16 +207,16 @@ Fw::SerializeStatus ActiveAsyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 18d7420ff..bdfc809c7 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 @@ -103,17 +103,17 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * ActiveGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -128,13 +128,13 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + ActiveGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -154,17 +154,17 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -179,13 +179,13 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -205,16 +205,16 @@ Fw::SerializeStatus ActiveGetProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 24c1747ce..7c1f6129f 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 @@ -103,17 +103,17 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * ActiveGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -128,13 +128,13 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + ActiveGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -154,17 +154,17 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -179,13 +179,13 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -205,16 +205,16 @@ Fw::SerializeStatus ActiveGuardedProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 f4e4dd373..989c1431a 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 @@ -103,17 +103,17 @@ Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * ActiveSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -128,13 +128,13 @@ Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + ActiveSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -154,17 +154,17 @@ Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -179,13 +179,13 @@ Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -205,16 +205,16 @@ Fw::SerializeStatus ActiveSyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 79ba68f53..371f283d8 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 @@ -141,17 +141,17 @@ namespace M { sizeof(FwSizeType) + size * M::ActiveTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -166,13 +166,13 @@ namespace M { sizeof(FwDpIdType) + M::ActiveTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -192,17 +192,17 @@ namespace M { sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -217,13 +217,13 @@ namespace M { sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -243,16 +243,16 @@ namespace M { sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 802367a87..8535ed6b5 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 @@ -48,17 +48,17 @@ Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * PassiveGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -73,13 +73,13 @@ Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + PassiveGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -99,17 +99,17 @@ Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -124,13 +124,13 @@ Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -150,16 +150,16 @@ Fw::SerializeStatus PassiveGetProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 bacd933ed..05b931fe2 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 @@ -48,17 +48,17 @@ Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * PassiveGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -73,13 +73,13 @@ Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + PassiveGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -99,17 +99,17 @@ Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -124,13 +124,13 @@ Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -150,16 +150,16 @@ Fw::SerializeStatus PassiveGuardedProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 81da2b6f3..c1b86d2d1 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 @@ -48,17 +48,17 @@ Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * PassiveSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -73,13 +73,13 @@ Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + PassiveSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -99,17 +99,17 @@ Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -124,13 +124,13 @@ Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -150,16 +150,16 @@ Fw::SerializeStatus PassiveSyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 79d7ca714..44e65da1c 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 @@ -48,17 +48,17 @@ Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: sizeof(FwSizeType) + size * PassiveTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -73,13 +73,13 @@ Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: sizeof(FwDpIdType) + PassiveTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -99,17 +99,17 @@ Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -124,13 +124,13 @@ Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -150,16 +150,16 @@ Fw::SerializeStatus PassiveTestComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 3ea824d47..2742ea0b5 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 @@ -105,17 +105,17 @@ Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * QueuedAsyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -130,13 +130,13 @@ Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + QueuedAsyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -156,17 +156,17 @@ Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -181,13 +181,13 @@ Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -207,16 +207,16 @@ Fw::SerializeStatus QueuedAsyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 cee0f2f1b..78cb5aa94 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 @@ -103,17 +103,17 @@ Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * QueuedGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -128,13 +128,13 @@ Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + QueuedGetProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -154,17 +154,17 @@ Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -179,13 +179,13 @@ Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -205,16 +205,16 @@ Fw::SerializeStatus QueuedGetProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 31739372b..7c6a1f3ae 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 @@ -103,17 +103,17 @@ Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * QueuedGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -128,13 +128,13 @@ Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + QueuedGuardedProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -154,17 +154,17 @@ Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -179,13 +179,13 @@ Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -205,16 +205,16 @@ Fw::SerializeStatus QueuedGuardedProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 2bc0446fd..f1d30f2af 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 @@ -103,17 +103,17 @@ Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * QueuedSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -128,13 +128,13 @@ Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + QueuedSyncProducts_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -154,17 +154,17 @@ Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -179,13 +179,13 @@ Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -205,16 +205,16 @@ Fw::SerializeStatus QueuedSyncProductsComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; 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 c9f196a08..debd7e9a1 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 @@ -139,17 +139,17 @@ Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: sizeof(FwSizeType) + size * QueuedTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -164,13 +164,13 @@ Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: sizeof(FwDpIdType) + QueuedTest_Data::SERIALIZED_SIZE; Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::DataRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -190,17 +190,17 @@ Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); for (FwSizeType i = 0; i < size; i++) { - status = this->dataBuffer.serialize(array[i]); + status = this->m_dataBuffer.serialize(array[i]); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); } - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -215,13 +215,13 @@ Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: sizeof(FwDpIdType) + sizeof(U32); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U32Record; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(elt); + status = this->m_dataBuffer.serialize(elt); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; @@ -241,16 +241,16 @@ Fw::SerializeStatus QueuedTestComponentBase::DpContainer :: sizeof(FwSizeType) + size * sizeof(U8); Fw::SerializeStatus status = Fw::FW_SERIALIZE_OK; - if (this->dataBuffer.getBuffLength() + sizeDelta <= this->dataBuffer.getBuffCapacity()) { + if (this->m_dataBuffer.getBuffLength() + sizeDelta <= this->m_dataBuffer.getBuffCapacity()) { const FwDpIdType id = this->baseId + RecordId::U8ArrayRecord; - status = this->dataBuffer.serialize(id); + status = this->m_dataBuffer.serialize(id); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - status = this->dataBuffer.serialize(size); + status = this->m_dataBuffer.serialize(size); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); const bool omitSerializedLength = true; - status = this->dataBuffer.serialize(array, size, omitSerializedLength); + status = this->m_dataBuffer.serialize(array, size, omitSerializedLength); FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); - this->dataSize += sizeDelta; + this->m_dataSize += sizeDelta; } else { status = Fw::FW_SERIALIZE_NO_ROOM_LEFT; From 152a21f990b8957f2ce0ef0997850bc5e339ab91 Mon Sep 17 00:00:00 2001 From: "Robert L. Bocchino Jr" Date: Fri, 26 Jan 2024 14:47:21 -0800 Subject: [PATCH 2/2] Update DpContainer --- .../test/fprime/Fw/Dp/DpContainer.cpp | 91 +++++++++++++------ .../test/fprime/Fw/Dp/DpContainer.hpp | 56 ++++++------ 2 files changed, 89 insertions(+), 58 deletions(-) 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 2b4baa53f..44ac252a7 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,7 +17,7 @@ namespace Fw { // ---------------------------------------------------------------------- DpContainer::DpContainer(FwDpIdType id, const Fw::Buffer& buffer) - : id(id), priority(0), procTypes(0), dpState(), dataSize(0), buffer(), dataBuffer() { + : m_id(id), m_priority(0), m_timeTag(), m_procTypes(0), m_dpState(), m_dataSize(0), m_buffer(), m_dataBuffer() { // Initialize the user data field this->initUserDataField(); // Set the packet buffer @@ -25,7 +25,8 @@ DpContainer::DpContainer(FwDpIdType id, const Fw::Buffer& buffer) this->setBuffer(buffer); } -DpContainer::DpContainer() : id(0), priority(0), procTypes(0), dataSize(0), buffer(), dataBuffer() { +DpContainer::DpContainer() + : m_id(0), m_priority(0), m_timeTag(), m_procTypes(0), m_dataSize(0), m_buffer(), m_dataBuffer() { // Initialize the user data field this->initUserDataField(); } @@ -34,49 +35,79 @@ DpContainer::DpContainer() : id(0), priority(0), procTypes(0), dataSize(0), buff // Public member functions // ---------------------------------------------------------------------- -Fw::SerializeStatus DpContainer::moveSerToOffset(FwSizeType offset //!< The offset -) { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); - return serializeRepr.moveSerToOffset(offset); +void DpContainer::deserializeHeader() { + FW_ASSERT(this->m_buffer.isValid()); + Fw::SerializeBufferBase& serializeRepr = this->m_buffer.getSerializeRepr(); + // Reset deserialization + serializeRepr.setBuffLen(this->m_buffer.getSize()); + Fw::SerializeStatus status = serializeRepr.moveDeserToOffset(Header::ID_OFFSET); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); + // Deserialize the container id + status = serializeRepr.deserialize(this->m_id); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); + // Deserialize the priority + status = serializeRepr.deserialize(this->m_priority); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); + // Deserialize the time tag + status = serializeRepr.deserialize(this->m_timeTag); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); + // Deserialize the processing types + status = serializeRepr.deserialize(this->m_procTypes); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); + // Deserialize the user data + const bool omitLength = true; + const FwSizeType requestedSize = sizeof this->m_userData; + FwSizeType receivedSize = requestedSize; + status = serializeRepr.deserialize(this->m_userData, receivedSize, omitLength); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); + FW_ASSERT(receivedSize == requestedSize, static_cast(requestedSize), + static_cast(receivedSize)); + // Deserialize the data product state + status = serializeRepr.deserialize(this->m_dpState); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); + // Deserialize the data size + status = serializeRepr.deserialize(this->m_dataSize); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); } void DpContainer::serializeHeader() { - Fw::SerializeBufferBase& serializeRepr = this->buffer.getSerializeRepr(); + FW_ASSERT(this->m_buffer.isValid()); + Fw::SerializeBufferBase& serializeRepr = this->m_buffer.getSerializeRepr(); // Reset serialization serializeRepr.resetSer(); // Serialize the packet type Fw::SerializeStatus status = serializeRepr.serialize(static_cast(Fw::ComPacket::FW_PACKET_DP)); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Serialize the container id - status = serializeRepr.serialize(this->id); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + status = serializeRepr.serialize(this->m_id); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Serialize the priority - status = serializeRepr.serialize(this->priority); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + status = serializeRepr.serialize(this->m_priority); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Serialize the time tag - status = serializeRepr.serialize(this->timeTag); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + status = serializeRepr.serialize(this->m_timeTag); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Serialize the processing types - status = serializeRepr.serialize(this->procTypes); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + status = serializeRepr.serialize(this->m_procTypes); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(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); + status = serializeRepr.serialize(this->m_userData, sizeof this->m_userData, omitLength); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Serialize the data product state - status = serializeRepr.serialize(this->dpState); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + status = serializeRepr.serialize(this->m_dpState); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Serialize the data size - status = serializeRepr.serialize(this->dataSize); - FW_ASSERT(status == Fw::FW_SERIALIZE_OK, status); + status = serializeRepr.serialize(this->m_dataSize); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); // Update the header hash this->updateHeaderHash(); } void DpContainer::setBuffer(const Buffer& buffer) { // Set the buffer - this->buffer = buffer; + this->m_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); // Initialize the data buffer @@ -85,24 +116,24 @@ void DpContainer::setBuffer(const Buffer& buffer) { // 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); + this->m_dataBuffer.setExtBuffer(dataAddr, dataCapacity); } void DpContainer::updateHeaderHash() { Utils::HashBuffer hashBuffer; - U8* const buffAddr = this->buffer.getData(); + U8* const buffAddr = this->m_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); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); } void DpContainer::updateDataHash() { Utils::HashBuffer hashBuffer; - U8* const buffAddrBase = this->buffer.getData(); + U8* const buffAddrBase = this->m_buffer.getData(); const U8* const dataAddr = &buffAddrBase[DATA_OFFSET]; const FwSizeType dataSize = this->getDataSize(); - const FwSizeType bufferSize = buffer.getSize(); + const FwSizeType bufferSize = this->m_buffer.getSize(); FW_ASSERT(DATA_OFFSET + dataSize <= bufferSize, DATA_OFFSET + dataSize, bufferSize); Utils::Hash::hash(dataAddr, dataSize, hashBuffer); const FwSizeType dataHashOffset = this->getDataHashOffset(); @@ -110,7 +141,7 @@ void DpContainer::updateDataHash() { 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); + FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast(status)); } // ---------------------------------------------------------------------- @@ -118,7 +149,7 @@ void DpContainer::updateDataHash() { // ---------------------------------------------------------------------- void DpContainer::initUserDataField() { - (void)::memset(this->userData, 0, sizeof this->userData); + (void)::memset(this->m_userData, 0, sizeof this->m_userData); } } // namespace Fw 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 7a5a8f4b8..2b5352be0 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 @@ -76,73 +76,73 @@ class DpContainer { //! Get the container id //! \return The id - FwDpIdType getId() const { return this->id; } + FwDpIdType getId() const { return this->m_id; } //! Get the data size //! \return The data size - FwSizeType getDataSize() const { return this->dataSize; } + FwSizeType getDataSize() const { return this->m_dataSize; } //! Get the packet buffer //! \return The buffer - Fw::Buffer getBuffer() const { return this->buffer; } + Fw::Buffer getBuffer() const { return this->m_buffer; } //! Get the packet size corresponding to the data size - FwSizeType getPacketSize() const { return getPacketSizeForDataSize(this->dataSize); } + FwSizeType getPacketSize() const { return getPacketSizeForDataSize(this->m_dataSize); } //! Get the priority //! \return The priority - FwDpPriorityType getPriority() const { return this->priority; } + FwDpPriorityType getPriority() const { return this->m_priority; } //! Get the time tag //! \return The time tag - Fw::Time getTimeTag() const { return this->timeTag; } + Fw::Time getTimeTag() const { return this->m_timeTag; } //! Get the processing types //! \return The processing types - DpCfg::ProcType::SerialType getProcTypes() const { return this->procTypes; } + DpCfg::ProcType::SerialType getProcTypes() const { return this->m_procTypes; } - //! Move the packet serialization to the specified offset - //! \return The serialize status - Fw::SerializeStatus moveSerToOffset(FwSizeType offset //!< The offset - ); + //! Deserialize the header from the packet buffer + //! Buffer must be valid and large enough to hold a DP container packet + void deserializeHeader(); //! Serialize the header into the packet buffer and update the header hash + //! Buffer must be valid and large enough to hold a DP container packet void serializeHeader(); //! Set the id void setId(FwDpIdType id //!< The id ) { - this->id = id; + this->m_id = id; } //! Set the priority void setPriority(FwDpPriorityType priority //!< The priority ) { - this->priority = priority; + this->m_priority = priority; } //! Set the time tag void setTimeTag(Fw::Time timeTag //!< The time tag ) { - this->timeTag = timeTag; + this->m_timeTag = timeTag; } //! Set the processing types bit mask void setProcTypes(DpCfg::ProcType::SerialType procTypes //!< The processing types ) { - this->procTypes = procTypes; + this->m_procTypes = procTypes; } //! Set the data product state void setDpState(DpState dpState //!< The data product state ) { - this->dpState = dpState; + this->m_dpState = dpState; } //! Set the data size - void setDataSize(FwSizeType dataSize //!< The data size + void setDataSize(FwSizeType dataSize //!< The data size ) { - this->dataSize = dataSize; + this->m_dataSize = dataSize; } //! Set the packet buffer @@ -155,7 +155,7 @@ class DpContainer { //! 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; + return Header::SIZE + HASH_DIGEST_LENGTH + this->m_dataSize; } //! Update the data hash @@ -186,7 +186,7 @@ class DpContainer { // ---------------------------------------------------------------------- //! The user data - Header::UserData userData; + Header::UserData m_userData; PROTECTED: // ---------------------------------------------------------------------- @@ -195,28 +195,28 @@ class DpContainer { //! The container id //! This is a system-global id (component-local id + component base id) - FwDpIdType id; + FwDpIdType m_id; //! The priority - FwDpPriorityType priority; + FwDpPriorityType m_priority; //! The time tag - Time timeTag; + Time m_timeTag; //! The processing types - DpCfg::ProcType::SerialType procTypes; + DpCfg::ProcType::SerialType m_procTypes; //! The data product state - DpState dpState; + DpState m_dpState; //! The data size - FwSizeType dataSize; + FwSizeType m_dataSize; //! The packet buffer - Buffer buffer; + Buffer m_buffer; //! The data buffer - Fw::ExternalSerializeBuffer dataBuffer; + Fw::ExternalSerializeBuffer m_dataBuffer; }; } // end namespace Fw