From fec4ce497e6f2ea7848188f3b3f8a74072d8f62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danijel=20Tomi=C4=87?= Date: Fri, 14 Aug 2026 14:15:50 +0200 Subject: [PATCH] Make default values static --- modules/asam_cmp_capture_module/src/interface_fb.cpp | 3 ++- .../include/asam_cmp_common_lib/stream_common_fb_impl.h | 3 ++- .../libraries/asam_cmp_common_lib/src/interface_common_fb.cpp | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/asam_cmp_capture_module/src/interface_fb.cpp b/modules/asam_cmp_capture_module/src/interface_fb.cpp index 211f5da..999f743 100644 --- a/modules/asam_cmp_capture_module/src/interface_fb.cpp +++ b/modules/asam_cmp_capture_module/src/interface_fb.cpp @@ -56,8 +56,9 @@ void InterfaceFb::removeStreamInternal(size_t nInd) void InterfaceFb::initProperties() { auto propName = "VendorData"; - auto prop = StringPropertyBuilder(propName, vendorDataAsString).build(); + auto prop = StringPropertyBuilder(propName, "").build(); objPtr.addProperty(prop); + objPtr.setPropertyValue(propName, vendorDataAsString); objPtr.getOnPropertyValueWrite(propName) += [this](PropertyObjectPtr& obj, PropertyValueEventArgsPtr& args) { propertyChangedIfNotUpdating(); }; } diff --git a/shared/libraries/asam_cmp_common_lib/include/asam_cmp_common_lib/stream_common_fb_impl.h b/shared/libraries/asam_cmp_common_lib/include/asam_cmp_common_lib/stream_common_fb_impl.h index 1acb587..a8ec979 100644 --- a/shared/libraries/asam_cmp_common_lib/include/asam_cmp_common_lib/stream_common_fb_impl.h +++ b/shared/libraries/asam_cmp_common_lib/include/asam_cmp_common_lib/stream_common_fb_impl.h @@ -102,11 +102,12 @@ template void StreamCommonFbImpl::initProperties() { StringPtr propName = "StreamId"; - auto prop = IntPropertyBuilder(propName, streamId) + auto prop = IntPropertyBuilder(propName, 0) .setMinValue(static_cast(std::numeric_limits::min())) .setMaxValue(static_cast(std::numeric_limits::max())) .build(); this->objPtr.addProperty(prop); + this->objPtr.setPropertyValue(propName, static_cast(streamId)); this->objPtr.getOnPropertyValueWrite(propName) += [this](PropertyObjectPtr& obj, PropertyValueEventArgsPtr& args) { updateStreamIdInternal(); }; } diff --git a/shared/libraries/asam_cmp_common_lib/src/interface_common_fb.cpp b/shared/libraries/asam_cmp_common_lib/src/interface_common_fb.cpp index c277835..ad13aa1 100644 --- a/shared/libraries/asam_cmp_common_lib/src/interface_common_fb.cpp +++ b/shared/libraries/asam_cmp_common_lib/src/interface_common_fb.cpp @@ -37,11 +37,12 @@ FunctionBlockTypePtr InterfaceCommonFb::CreateType(const ModuleInfoPtr& moduleIn void InterfaceCommonFb::initProperties() { StringPtr propName = "InterfaceId"; - auto prop = IntPropertyBuilder(propName, interfaceId) + auto prop = IntPropertyBuilder(propName, 0) .setMinValue(static_cast(std::numeric_limits::min())) .setMaxValue(static_cast(std::numeric_limits::max())) .build(); objPtr.addProperty(prop); + objPtr.setPropertyValue(propName, static_cast(interfaceId)); objPtr.getOnPropertyValueWrite(propName) += [this](PropertyObjectPtr& obj, PropertyValueEventArgsPtr& args) { propertyChangedIfNotUpdating(); };