From 31fb60b07dc75e4d3dec873b677110310b32cb20 Mon Sep 17 00:00:00 2001 From: Sacheta-NI Date: Sat, 8 Mar 2025 02:56:31 +0530 Subject: [PATCH 1/8] updating grpc version to 62 Signed-off-by: Sacheta-NI --- .github/workflows/build_on_rt.yml | 6 +++--- .github/workflows/windows_x64_build.yml | 8 ++++++-- .github/workflows/windows_x86_build.yml | 8 ++++++-- CMakeLists.txt | 11 +++++++++-- nilrt-x86_64.cmake | 2 +- src/cluster_copier.cc | 6 +++--- src/lv_message.cc | 6 +++--- src/lv_message.h | 6 +++--- src/lv_message_efficient.cc | 8 ++++---- src/lv_message_efficient.h | 8 ++++---- src/lv_message_value.cc | 17 +++++++++++------ src/message_value.h | 15 +++++++++++++++ src/proto_parser.cc | 4 ++-- src/well_known_messages.cc | 6 +++--- src/well_known_messages.h | 13 ++++++++++++- third_party/grpc | 2 +- 16 files changed, 86 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build_on_rt.yml b/.github/workflows/build_on_rt.yml index 55da50979..942d3ba0a 100644 --- a/.github/workflows/build_on_rt.yml +++ b/.github/workflows/build_on_rt.yml @@ -26,9 +26,9 @@ jobs: # improvements to hosting and exports of the NILRT toolchain are made. - name: Install NI Linux RT CC Toolchain run: | - wget -nv https://download.ni.com/support/softlib/labview/labview_rt/2018/Linux%20Toolchains/linux/oecore-x86_64-core2-64-toolchain-6.0.sh - sudo chmod a+x ./oecore-x86_64-core2-64-toolchain-6.0.sh - sudo ./oecore-x86_64-core2-64-toolchain-6.0.sh -y -d ${GITHUB_WORKSPACE}/nilrt-toolchain/ + wget -nv https://download.ni.com/support/softlib/labview/labview_rt/2023Q4/LinuxToolchains/linux/oecore-x86_64-core2-64-toolchain-10.0.sh + sudo chmod a+x ./oecore-x86_64-core2-64-toolchain-10.0.sh + sudo ./oecore-x86_64-core2-64-toolchain-10.0.sh -y -d ${GITHUB_WORKSPACE}/nilrt-toolchain/ echo "${GITHUB_WORKSPACE}/nilrt-toolchain/sysroots/x86_64-nilrtsdk-linux/usr/bin/x86_64-nilrt-linux" >> ${GITHUB_PATH} - name: Update Submodules diff --git a/.github/workflows/windows_x64_build.yml b/.github/workflows/windows_x64_build.yml index eaa4ba9ff..645ccbde7 100644 --- a/.github/workflows/windows_x64_build.yml +++ b/.github/workflows/windows_x64_build.yml @@ -14,13 +14,17 @@ jobs: # well on Windows or Mac. You can convert this to a matrix build if you need # cross-platform coverage. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: windows-2019 + runs-on: windows-latest steps: - uses: actions/checkout@v4 - uses: ilammy/msvc-dev-cmd@v1 - uses: ilammy/setup-nasm@v1.5.1 + - name: Install Visual Studio 2022 Build Tools + run: | + choco install visualstudio2022-workload-vctools --yes || throw "Installation failed" + - name: Update Submodules working-directory: ${{runner.workspace}}/grpc-labview run: git submodule update --init --recursive @@ -32,7 +36,7 @@ jobs: - name: Configure CMake working-directory: ${{runner.workspace}}\grpc-labview\build - run: cmake -G "Visual Studio 16 2019" .. + run: cmake -G "Visual Studio 17 2022" -A x64 .. - name: Build working-directory: ${{runner.workspace}}\grpc-labview\build diff --git a/.github/workflows/windows_x86_build.yml b/.github/workflows/windows_x86_build.yml index c6ae0676a..58d96f3ed 100644 --- a/.github/workflows/windows_x86_build.yml +++ b/.github/workflows/windows_x86_build.yml @@ -9,7 +9,7 @@ env: jobs: build: - runs-on: windows-2019 + runs-on: windows-latest steps: - uses: actions/checkout@v4 @@ -18,6 +18,10 @@ jobs: arch: x86 - uses: ilammy/setup-nasm@v1.5.1 + - name: Install Visual Studio 2022 Build Tools + run: | + choco install visualstudio2022-workload-vctools --yes || throw "Installation failed" + - name: Update Submodules working-directory: ${{runner.workspace}}/grpc-labview run: git submodule update --init --recursive @@ -27,7 +31,7 @@ jobs: - name: Configure CMake working-directory: ${{runner.workspace}}\grpc-labview\build - run: cmake -G "Visual Studio 16 2019" -A Win32 .. + run: cmake -G "Visual Studio 17 2022" -A Win32 .. - name: Build working-directory: ${{runner.workspace}}\grpc-labview\build diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d7086458..586104d09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,14 +5,21 @@ cmake_minimum_required(VERSION 3.5.1) cmake_policy(SET CMP0091 NEW) project(labview-grpc C CXX) +set(ABSL_ENABLE_INSTALL ON) if(NOT MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") # Set default visibility to hidden, only export LIBRARY_EXPORT symbols from the shared library add_compile_options(-fvisibility=hidden) else() add_definitions(-D_WIN32_WINNT=0x600) - set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>" CACHE STRING "Use static runtime" FORCE) + set(CMAKE_MSVC_RUNTIME_LIBRARY_DEFAULT "MultiThreaded$<$:Debug>" CACHE STRING "Default MSVC runtime library to use static runtime") + set(gRPC_MSVC_STATIC_RUNTIME ON CACHE BOOL "Use static runtime for gRPC" FORCE) + set(protobuf_MSVC_STATIC_RUNTIME ON CACHE BOOL "Use static runtime for protobuf" FORCE) + set(ABSL_MSVC_STATIC_RUNTIME ON CACHE BOOL "Use static runtime for Abseil") + set(CARES_MSVC_STATIC_RUNTIME ON CACHE BOOL "Use static runtime for c-ares") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4244") add_compile_options("$<$>:/Zi>") add_link_options("$<$>:/DEBUG>") diff --git a/nilrt-x86_64.cmake b/nilrt-x86_64.cmake index 2b3714a93..3477c2856 100644 --- a/nilrt-x86_64.cmake +++ b/nilrt-x86_64.cmake @@ -10,7 +10,7 @@ set(_GRPC_DEVICE_NILRT_LEGACY_TOOLCHAIN TRUE) #---------------------------------------------------------------------- find_program(COMPILER_PATH x86_64-nilrt-linux-gcc) get_filename_component(toolchain_path ${COMPILER_PATH}/../../../../.. REALPATH DIRECTORY) -set(include_path core2-64-nilrt-linux/usr/include/c++/6.3.0) +set(include_path core2-64-nilrt-linux/usr/include/c++/10.0) #---------------------------------------------------------------------- # Compilers diff --git a/src/cluster_copier.cc b/src/cluster_copier.cc index 01a134a41..92931b918 100644 --- a/src/cluster_copier.cc +++ b/src/cluster_copier.cc @@ -255,7 +255,7 @@ namespace grpc_labview { { if (metadata->isRepeated) { - auto repeatedString = static_cast&>(*value); + auto repeatedString = static_cast(*value); if (repeatedString._value.size() != 0) { NumericArrayResize(GetTypeCodeForSize(sizeof(LStrHandle)), 1, start, repeatedString._value.size()); @@ -670,14 +670,14 @@ namespace grpc_labview { auto arraySize = (*array)->cnt; if (array && *array && (arraySize != 0)) { - auto repeatedStringValue = std::make_shared>(metadata->protobufIndex); + auto repeatedStringValue = std::make_shared(metadata->protobufIndex); message._values.emplace(metadata->protobufIndex, repeatedStringValue); auto lvStr = (*array)->bytes(); repeatedStringValue->_value.Reserve(arraySize); for (int x = 0; x < arraySize; ++x) { auto str = GetLVString(*lvStr); - repeatedStringValue->_value.AddAlreadyReserved(std::move(str)); + repeatedStringValue->_value.Add(std::move(str)); lvStr += 1; } } diff --git a/src/lv_message.cc b/src/lv_message.cc index 4910bdccf..b376ea545 100644 --- a/src/lv_message.cc +++ b/src/lv_message.cc @@ -354,16 +354,16 @@ namespace grpc_labview { if (fieldInfo.isRepeated) { - std::shared_ptr> v; + std::shared_ptr v; auto it = _values.find(index); if (it == _values.end()) { - v = std::make_shared>(index); + v = std::make_shared(index); _values.emplace(index, v); } else { - v = std::static_pointer_cast>((*it).second); + v = std::static_pointer_cast((*it).second); } auto tagSize = CalculateTagWireSize(tag); diff --git a/src/lv_message.h b/src/lv_message.h index 7e9c18775..6e9f235e5 100644 --- a/src/lv_message.h +++ b/src/lv_message.h @@ -33,14 +33,14 @@ namespace grpc_labview const char* _InternalParse(const char* ptr, google::protobuf::internal::ParseContext* ctx) override final; google::protobuf::uint8* _InternalSerialize(google::protobuf::uint8* target, google::protobuf::io::EpsCopyOutputStream* stream) const override final; - void SetCachedSize(int size) const final; - int GetCachedSize(void) const final; + void SetCachedSize(int size) const ; + int GetCachedSize(void) const ; size_t ByteSizeLong() const final; virtual void PostInteralParseAction() {}; void MergeFrom(const google::protobuf::Message &from) final; void MergeFrom(const LVMessage &from); - void CopyFrom(const google::protobuf::Message &from) final; + void CopyFrom(const google::protobuf::Message &from) ; void CopyFrom(const LVMessage &from); void CopyOneofIndicesToCluster(int8_t* cluster) const; void InternalSwap(LVMessage *other); diff --git a/src/lv_message_efficient.cc b/src/lv_message_efficient.cc index a0814b9e2..6ce0d28e1 100644 --- a/src/lv_message_efficient.cc +++ b/src/lv_message_efficient.cc @@ -172,9 +172,9 @@ namespace grpc_labview auto repeatedMessageValuesIt = _repeatedMessageValuesMap.find(fieldInfo.fieldName); if (repeatedMessageValuesIt == _repeatedMessageValuesMap.end()) { - auto m_val = std::make_shared(fieldInfo, google::protobuf::RepeatedField()); + auto m_val = std::make_shared(fieldInfo, google::protobuf::RepeatedPtrField()); repeatedMessageValuesIt = _repeatedMessageValuesMap.emplace(fieldInfo.fieldName, m_val).first; - repeatedMessageValuesIt->second.get()->_buffer.Resize(arraySize, _fillData); + repeatedMessageValuesIt->second.get()->_buffer.Reserve(numElements); } else { @@ -196,10 +196,10 @@ namespace grpc_labview { numElements *= 2; arraySize = numElements * clusterSize; - repeatedMessageValuesIt->second.get()->_buffer.Resize(arraySize, _fillData); + repeatedMessageValuesIt->second.get()->_buffer.Reserve(numElements); } - auto nestedMessageCluster = reinterpret_cast(const_cast(repeatedMessageValuesIt->second.get()->_buffer.data())); + auto nestedMessageCluster = const_cast(reinterpret_cast(repeatedMessageValuesIt->second.get()->_buffer.data())); nestedMessageCluster = nestedMessageCluster + (elementIndex * clusterSize); LVMessageEfficient nestedMessage(metadata, nestedMessageCluster); protobuf_ptr = ctx->ParseMessage(&nestedMessage, protobuf_ptr); diff --git a/src/lv_message_efficient.h b/src/lv_message_efficient.h index aa4577cda..3657f49f8 100644 --- a/src/lv_message_efficient.h +++ b/src/lv_message_efficient.h @@ -29,19 +29,19 @@ namespace grpc_labview protected: struct RepeatedMessageValue { const MessageElementMetadata& _fieldInfo; - google::protobuf::RepeatedField _buffer; + google::protobuf::RepeatedPtrField _buffer; uint64_t _numElements = 0; - RepeatedMessageValue(const MessageElementMetadata& fieldInfo, google::protobuf::RepeatedField buffer) : + RepeatedMessageValue(const MessageElementMetadata& fieldInfo, google::protobuf::RepeatedPtrField buffer) : _fieldInfo(fieldInfo), _buffer(buffer) {} }; struct RepeatedStringValue { const MessageElementMetadata& _fieldInfo; - google::protobuf::RepeatedField _repeatedString; + google::protobuf::RepeatedPtrField _repeatedString; RepeatedStringValue(const MessageElementMetadata& fieldInfo) : - _fieldInfo(fieldInfo), _repeatedString(google::protobuf::RepeatedField()) {} + _fieldInfo(fieldInfo), _repeatedString(google::protobuf::RepeatedPtrField()) {} }; public: diff --git a/src/lv_message_value.cc b/src/lv_message_value.cc index 5fa386131..486fc7f1b 100644 --- a/src/lv_message_value.cc +++ b/src/lv_message_value.cc @@ -37,7 +37,7 @@ namespace grpc_labview google::protobuf::uint8* LVNestedMessageMessageValue::Serialize(google::protobuf::uint8* target, google::protobuf::io::EpsCopyOutputStream* stream) const { target = stream->EnsureSpace(target); - return WireFormatLite::InternalWriteMessage(_protobufId, *_value, target, stream); + return WireFormatLite::InternalWriteMessage(_protobufId, *_value, _value->GetCachedSize(), target, stream); } //--------------------------------------------------------------------- @@ -67,7 +67,7 @@ namespace grpc_labview for (unsigned int i = 0, n = static_cast(_value.size()); i < n; i++) { target = stream->EnsureSpace(target); - target = WireFormatLite::InternalWriteMessage(_protobufId, *_value[i], target, stream); + target = WireFormatLite::InternalWriteMessage(_protobufId, *_value[i], _value[i]->GetCachedSize(), target, stream); } return target; } @@ -97,8 +97,13 @@ namespace grpc_labview //--------------------------------------------------------------------- //--------------------------------------------------------------------- - template <> - size_t LVRepeatedMessageValue::ByteSizeLong() + + LVRepeatedStringMessageValue::LVRepeatedStringMessageValue(int protobufId) : + LVMessageValue(protobufId) + { + } + + size_t LVRepeatedStringMessageValue::ByteSizeLong() { size_t totalSize = 0; totalSize += WireFormatLite::TagSize(_protobufId, WireFormatLite::TYPE_STRING) * static_cast(_value.size()); @@ -111,8 +116,8 @@ namespace grpc_labview //--------------------------------------------------------------------- //--------------------------------------------------------------------- - template <> - google::protobuf::uint8* LVRepeatedMessageValue::Serialize(google::protobuf::uint8* target, google::protobuf::io::EpsCopyOutputStream* stream) const + + google::protobuf::uint8* LVRepeatedStringMessageValue::Serialize(google::protobuf::uint8* target, google::protobuf::io::EpsCopyOutputStream* stream) const { for (int i = 0, n = _value.size(); i < n; i++) { diff --git a/src/message_value.h b/src/message_value.h index e8b5d959e..e13a953a4 100644 --- a/src/message_value.h +++ b/src/message_value.h @@ -105,6 +105,7 @@ namespace grpc_labview google::protobuf::uint8* Serialize(google::protobuf::uint8* target, google::protobuf::io::EpsCopyOutputStream* stream) const override; }; + //--------------------------------------------------------------------- //--------------------------------------------------------------------- class LVRepeatedNestedMessageMessageValue : public LVMessageValue, public gRPCid @@ -137,6 +138,20 @@ namespace grpc_labview google::protobuf::uint8* Serialize(google::protobuf::uint8* target, google::protobuf::io::EpsCopyOutputStream* stream) const override; }; + class LVRepeatedStringMessageValue : public LVMessageValue + { + public: + LVRepeatedStringMessageValue(int protobufId); + + public: + google::protobuf::RepeatedPtrField _value; + + public: + void* RawValue() override { return &_value; }; + size_t ByteSizeLong() override; + google::protobuf::uint8* Serialize(google::protobuf::uint8* target, google::protobuf::io::EpsCopyOutputStream* stream) const override; + }; + //--------------------------------------------------------------------- //--------------------------------------------------------------------- diff --git a/src/proto_parser.cc b/src/proto_parser.cc index e63a0ba5a..e6eacaee7 100644 --- a/src/proto_parser.cc +++ b/src/proto_parser.cc @@ -49,7 +49,7 @@ namespace grpc_labview std::string GetLVErrorMessage(); private: - std::list _errors; + std::list _errors; }; //--------------------------------------------------------------------- @@ -140,7 +140,7 @@ namespace grpc_labview //--------------------------------------------------------------------- //--------------------------------------------------------------------- - void AddFieldError(FieldDescriptor* field, string message) + void AddFieldError(FieldDescriptor* field, std::string message) { grpc_labview::LVProtoParser::s_Parser->m_ErrorCollector.AddError("", 0, 0, message); } diff --git a/src/well_known_messages.cc b/src/well_known_messages.cc index 17279f4e8..49fbd5df8 100644 --- a/src/well_known_messages.cc +++ b/src/well_known_messages.cc @@ -113,7 +113,7 @@ namespace grpc_labview // Protect against a malformed message where the amount of data sent doesn't match the dimension sizes. // LV will automatically pad/handle writing less data than was allocated to the array so we just need // to make sure we don't write more data than was allocated to the array. - auto dataValue = std::static_pointer_cast>(dataFieldValue); + auto dataValue = std::static_pointer_cast(dataFieldValue); auto stringElements = dataValue->_value.size(); auto stringsToCopy = std::min(elementCount, stringElements); auto lvString = (*array)->bytes(); @@ -128,12 +128,12 @@ namespace grpc_labview void String2DArray::CopyArrayFromClusterToMessage(int totalElements, LV2DArrayHandle array, const std::shared_ptr& dataFieldValue) { auto lvStr = (*array)->bytes(); - auto dataValue = std::static_pointer_cast>(dataFieldValue); + auto dataValue = std::static_pointer_cast(dataFieldValue); dataValue->_value.Reserve(totalElements); for (int i = 0; i < totalElements; i++) { auto str = GetLVString(*lvStr); - dataValue->_value.AddAlreadyReserved(std::move(str)); + dataValue->_value.Add(std::move(str)); lvStr += 1; } } diff --git a/src/well_known_messages.h b/src/well_known_messages.h index 6828997f3..da23f90f1 100644 --- a/src/well_known_messages.h +++ b/src/well_known_messages.h @@ -126,7 +126,18 @@ namespace grpc_labview arrayMessage->_values.emplace(_rowsIndex, rowsValue); auto columnsValue = std::make_shared>(_columnsIndex, columns); arrayMessage->_values.emplace(_columnsIndex, columnsValue); - auto dataValue = std::make_shared>(_dataIndex); + //auto dataValue = std::make_shared>(_dataIndex); + + std::shared_ptr dataValue; + if constexpr (std::is_same::value) + { + dataValue = std::make_shared(_dataIndex); + } + else + { + dataValue = std::make_shared>(_dataIndex); + } + arrayMessage->_values.emplace(_dataIndex, dataValue); CopyArrayFromClusterToMessage(rows * columns, array, dataValue); diff --git a/third_party/grpc b/third_party/grpc index 591d56e13..f78a54c5a 160000 --- a/third_party/grpc +++ b/third_party/grpc @@ -1 +1 @@ -Subproject commit 591d56e1300b6d11948e1b821efac785a295989c +Subproject commit f78a54c5ad4e058734aa9b2beb9459940e4de342 From 9430c7c3bbc8564fb1b9f57a022f30bbf49c7117 Mon Sep 17 00:00:00 2001 From: Sacheta-NI Date: Sat, 8 Mar 2025 13:15:57 +0530 Subject: [PATCH 2/8] updating cmake min version and a few changes for apis Signed-off-by: Sacheta-NI --- CMakeLists.txt | 2 +- src/lv_message_efficient.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 586104d09..5c9cd9b24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ #---------------------------------------------------------------------- #---------------------------------------------------------------------- -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.15) cmake_policy(SET CMP0091 NEW) diff --git a/src/lv_message_efficient.h b/src/lv_message_efficient.h index 3657f49f8..2c6b07f6e 100644 --- a/src/lv_message_efficient.h +++ b/src/lv_message_efficient.h @@ -91,7 +91,7 @@ namespace grpc_labview const char* ParseAndCopyRepeatedMessage(const char* ptr, ParseContext* ctx, RepeatedMessageValuePointer v) { uint64_t numElements; - ptr = PackedMessageType(ptr, ctx, reinterpret_cast*>(&(v->_value))); + ptr = PackedMessageType(ptr, ctx, reinterpret_cast*>(&(v->_value))); numElements = v->_value.size(); // get the LVClusterHandle @@ -112,7 +112,7 @@ namespace grpc_labview return ptr; } - const char* PackedMessageType(const char* ptr, ParseContext* ctx, google::protobuf::RepeatedField* value) + const char* PackedMessageType(const char* ptr, ParseContext* ctx, google::protobuf::RepeatedPtrField* value) { return PackedFunc(value, ptr, ctx); } From b90e2a0d17dead3082cc591316474b3f635c0d2c Mon Sep 17 00:00:00 2001 From: "Sacheta ." Date: Thu, 24 Apr 2025 02:35:00 +0530 Subject: [PATCH 3/8] code review feedbacks Signed-off-by: Sacheta . --- .github/workflows/windows_x64_build.yml | 2 +- .github/workflows/windows_x86_build.yml | 2 +- src/well_known_messages.h | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows_x64_build.yml b/.github/workflows/windows_x64_build.yml index 645ccbde7..9ad04cf33 100644 --- a/.github/workflows/windows_x64_build.yml +++ b/.github/workflows/windows_x64_build.yml @@ -14,7 +14,7 @@ jobs: # well on Windows or Mac. You can convert this to a matrix build if you need # cross-platform coverage. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: windows-latest + runs-on: windows-2022 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/windows_x86_build.yml b/.github/workflows/windows_x86_build.yml index 58d96f3ed..07f03baf4 100644 --- a/.github/workflows/windows_x86_build.yml +++ b/.github/workflows/windows_x86_build.yml @@ -9,7 +9,7 @@ env: jobs: build: - runs-on: windows-latest + runs-on: windows-2022 steps: - uses: actions/checkout@v4 diff --git a/src/well_known_messages.h b/src/well_known_messages.h index da23f90f1..1d869aca6 100644 --- a/src/well_known_messages.h +++ b/src/well_known_messages.h @@ -126,7 +126,6 @@ namespace grpc_labview arrayMessage->_values.emplace(_rowsIndex, rowsValue); auto columnsValue = std::make_shared>(_columnsIndex, columns); arrayMessage->_values.emplace(_columnsIndex, columnsValue); - //auto dataValue = std::make_shared>(_dataIndex); std::shared_ptr dataValue; if constexpr (std::is_same::value) From c7c6e02347423889bb44ae72ab1feaa5ff698f39 Mon Sep 17 00:00:00 2001 From: Sacheta-NI Date: Thu, 24 Apr 2025 14:29:25 +0530 Subject: [PATCH 4/8] disabling LVEfficient until it is good to go for upgrade Signed-off-by: Sacheta-NI --- src/feature_toggles.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/feature_toggles.h b/src/feature_toggles.h index 62a20068c..cd848f64e 100644 --- a/src/feature_toggles.h +++ b/src/feature_toggles.h @@ -11,7 +11,7 @@ namespace grpc_labview { // Constructor to initialize with default values FeatureConfig() { featureFlags["gRPC"] = true; // Enable gRPC by default as an example, this will never be overridden by config file - featureFlags["data_EfficientMessageCopy"] = true; + featureFlags["data_EfficientMessageCopy"] = false; featureFlags["data_useOccurrence"] = true; } From 70a0b79030e01e4d55a83d5b8b183a9422e94576 Mon Sep 17 00:00:00 2001 From: Sacheta-NI Date: Mon, 28 Apr 2025 03:55:23 +0530 Subject: [PATCH 5/8] Overwriting value for LVMessageEfficient toggle to false to keep it disabled Signed-off-by: Sacheta-NI --- src/feature_toggles.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/feature_toggles.cc b/src/feature_toggles.cc index 4dd58c036..471d6d894 100644 --- a/src/feature_toggles.cc +++ b/src/feature_toggles.cc @@ -46,6 +46,8 @@ namespace grpc_labview { } configFile.close(); + if (featureFlags.find("data_EfficientMessageCopy") != featureFlags.end()) + featureFlags["data_EfficientMessageCopy"] = false; } // Function to check if a feature is enabled From b30312bfa88fd5503a0a9a2caab49da308c33d5c Mon Sep 17 00:00:00 2001 From: Sacheta-NI Date: Mon, 28 Apr 2025 17:15:30 +0530 Subject: [PATCH 6/8] Adding comment Signed-off-by: Sacheta-NI --- src/feature_toggles.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/feature_toggles.cc b/src/feature_toggles.cc index 471d6d894..84ad3de95 100644 --- a/src/feature_toggles.cc +++ b/src/feature_toggles.cc @@ -46,6 +46,7 @@ namespace grpc_labview { } configFile.close(); + //TODO: remove this post fixing LVMessageEfficient to let enable feature if (featureFlags.find("data_EfficientMessageCopy") != featureFlags.end()) featureFlags["data_EfficientMessageCopy"] = false; } From 7a0c5940bf076f63e4498da2fd41132fa24d925b Mon Sep 17 00:00:00 2001 From: "Sacheta ." Date: Wed, 30 Apr 2025 01:46:58 +0530 Subject: [PATCH 7/8] adding issue ref for LVMessageEfficient disable tracking Signed-off-by: Sacheta . --- src/feature_toggles.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/feature_toggles.cc b/src/feature_toggles.cc index 84ad3de95..7a67809d7 100644 --- a/src/feature_toggles.cc +++ b/src/feature_toggles.cc @@ -46,7 +46,7 @@ namespace grpc_labview { } configFile.close(); - //TODO: remove this post fixing LVMessageEfficient to let enable feature + //TODO: remove this post fixing LVMessageEfficient to let enable feature. See issue: #433 if (featureFlags.find("data_EfficientMessageCopy") != featureFlags.end()) featureFlags["data_EfficientMessageCopy"] = false; } From 06d29cb11eff088d9b2e8bb53d898a9179de02e4 Mon Sep 17 00:00:00 2001 From: Sacheta-NI Date: Wed, 30 Apr 2025 12:29:47 +0530 Subject: [PATCH 8/8] adding a few methods to ExportedFunctionList.json Signed-off-by: Sacheta-NI --- .../testcases/ExportedFunctionList.json | 135 ++++++++++-------- 1 file changed, 77 insertions(+), 58 deletions(-) diff --git a/tests/CMakeTests/testcases/ExportedFunctionList.json b/tests/CMakeTests/testcases/ExportedFunctionList.json index 58b005d87..2812f0795 100644 --- a/tests/CMakeTests/testcases/ExportedFunctionList.json +++ b/tests/CMakeTests/testcases/ExportedFunctionList.json @@ -1,5 +1,5 @@ { - "size": 85, + "size": 87, "signatures": [ { "id": 0, @@ -284,15 +284,18 @@ }, { "id": 27, - "function_name": "CreateClientContext", + "function_name": "CreateClient2", "return_type": "int32_t", "parameter_list": [ + "const char*", + "const char*", + "grpc_labview::LVBoolean", "grpc_labview::gRPCid**" ] }, { "id": 28, - "function_name": "CreateSerializationSession", + "function_name": "CreateClientContext", "return_type": "int32_t", "parameter_list": [ "grpc_labview::gRPCid**" @@ -300,6 +303,14 @@ }, { "id": 29, + "function_name": "CreateSerializationSession", + "return_type": "int32_t", + "parameter_list": [ + "grpc_labview::gRPCid**" + ] + }, + { + "id": 30, "function_name": "DeserializeReflectionInfo", "return_type": "void", "parameter_list": [ @@ -307,7 +318,7 @@ ] }, { - "id": 30, + "id": 31, "function_name": "FinishClientCompleteClientStreamingCall", "return_type": "int32_t", "parameter_list": [ @@ -318,7 +329,7 @@ ] }, { - "id": 31, + "id": 32, "function_name": "FreeSerializationSession", "return_type": "int32_t", "parameter_list": [ @@ -326,7 +337,7 @@ ] }, { - "id": 32, + "id": 33, "function_name": "FreeUnpackedFields", "return_type": "int32_t", "parameter_list": [ @@ -334,7 +345,7 @@ ] }, { - "id": 33, + "id": 34, "function_name": "GetEnumInfo", "return_type": "int", "parameter_list": [ @@ -343,7 +354,7 @@ ] }, { - "id": 34, + "id": 35, "function_name": "GetLVEnumValueFromProtoValue", "return_type": "uint32_t", "parameter_list": [ @@ -354,7 +365,7 @@ ] }, { - "id": 35, + "id": 36, "function_name": "GetProtoValueFromLVEnumValue", "return_type": "int32_t", "parameter_list": [ @@ -365,7 +376,7 @@ ] }, { - "id": 36, + "id": 37, "function_name": "GetRequestData", "return_type": "int32_t", "parameter_list": [ @@ -374,7 +385,7 @@ ] }, { - "id": 37, + "id": 38, "function_name": "GetUnpackedField", "return_type": "int32_t", "parameter_list": [ @@ -386,7 +397,7 @@ ] }, { - "id": 38, + "id": 39, "function_name": "GetUnpackedMessageField", "return_type": "int32_t", "parameter_list": [ @@ -396,7 +407,7 @@ ] }, { - "id": 39, + "id": 40, "function_name": "IsAnyOfType", "return_type": "int32_t", "parameter_list": [ @@ -406,7 +417,7 @@ ] }, { - "id": 40, + "id": 41, "function_name": "IsCancelled", "return_type": "int32_t", "parameter_list": [ @@ -414,7 +425,7 @@ ] }, { - "id": 41, + "id": 42, "function_name": "LVAddParserSearchPath", "return_type": "int", "parameter_list": [ @@ -423,7 +434,7 @@ ] }, { - "id": 42, + "id": 43, "function_name": "LVCreateParser", "return_type": "int", "parameter_list": [ @@ -431,7 +442,7 @@ ] }, { - "id": 43, + "id": 44, "function_name": "LVCreateServer", "return_type": "int32_t", "parameter_list": [ @@ -439,7 +450,7 @@ ] }, { - "id": 44, + "id": 45, "function_name": "LVEnumName", "return_type": "int", "parameter_list": [ @@ -448,7 +459,7 @@ ] }, { - "id": 45, + "id": 46, "function_name": "LVEnumTypeUrl", "return_type": "int", "parameter_list": [ @@ -457,7 +468,7 @@ ] }, { - "id": 46, + "id": 47, "function_name": "LVFieldInfo", "return_type": "int", "parameter_list": [ @@ -466,7 +477,7 @@ ] }, { - "id": 47, + "id": 48, "function_name": "LVGetEnums", "return_type": "int", "parameter_list": [ @@ -476,7 +487,7 @@ ] }, { - "id": 48, + "id": 49, "function_name": "LVGetErrorString", "return_type": "int", "parameter_list": [ @@ -485,7 +496,7 @@ ] }, { - "id": 49, + "id": 50, "function_name": "LVGetFields", "return_type": "int", "parameter_list": [ @@ -494,7 +505,7 @@ ] }, { - "id": 50, + "id": 51, "function_name": "LVGetMessages", "return_type": "int", "parameter_list": [ @@ -503,7 +514,7 @@ ] }, { - "id": 51, + "id": 52, "function_name": "LVGetMethodFullName", "return_type": "int", "parameter_list": [ @@ -512,7 +523,7 @@ ] }, { - "id": 52, + "id": 53, "function_name": "LVGetMethodInput", "return_type": "int", "parameter_list": [ @@ -521,7 +532,7 @@ ] }, { - "id": 53, + "id": 54, "function_name": "LVGetMethodName", "return_type": "int", "parameter_list": [ @@ -530,7 +541,7 @@ ] }, { - "id": 54, + "id": 55, "function_name": "LVGetMethodOutput", "return_type": "int", "parameter_list": [ @@ -539,7 +550,7 @@ ] }, { - "id": 55, + "id": 56, "function_name": "LVGetServerListeningPort", "return_type": "int32_t", "parameter_list": [ @@ -548,7 +559,7 @@ ] }, { - "id": 56, + "id": 57, "function_name": "LVGetServiceMethods", "return_type": "int", "parameter_list": [ @@ -557,7 +568,7 @@ ] }, { - "id": 57, + "id": 58, "function_name": "LVGetServiceName", "return_type": "int", "parameter_list": [ @@ -566,7 +577,7 @@ ] }, { - "id": 58, + "id": 59, "function_name": "LVGetServices", "return_type": "int", "parameter_list": [ @@ -575,7 +586,7 @@ ] }, { - "id": 59, + "id": 60, "function_name": "LVGetgRPCAPIVersion", "return_type": "int", "parameter_list": [ @@ -583,7 +594,7 @@ ] }, { - "id": 60, + "id": 61, "function_name": "LVImportProto", "return_type": "int", "parameter_list": [ @@ -593,7 +604,7 @@ ] }, { - "id": 61, + "id": 62, "function_name": "LVImportProto2", "return_type": "int", "parameter_list": [ @@ -603,7 +614,7 @@ ] }, { - "id": 62, + "id": 63, "function_name": "LVIsMethodClientStreaming", "return_type": "int", "parameter_list": [ @@ -612,7 +623,7 @@ ] }, { - "id": 63, + "id": 64, "function_name": "LVIsMethodServerStreaming", "return_type": "int", "parameter_list": [ @@ -621,7 +632,7 @@ ] }, { - "id": 64, + "id": 65, "function_name": "LVMessageHasOneof", "return_type": "int", "parameter_list": [ @@ -630,7 +641,7 @@ ] }, { - "id": 65, + "id": 66, "function_name": "LVMessageName", "return_type": "int", "parameter_list": [ @@ -639,7 +650,7 @@ ] }, { - "id": 66, + "id": 67, "function_name": "LVMessageTypeUrl", "return_type": "int", "parameter_list": [ @@ -648,7 +659,7 @@ ] }, { - "id": 67, + "id": 68, "function_name": "LVStartServer", "return_type": "int32_t", "parameter_list": [ @@ -659,7 +670,7 @@ ] }, { - "id": 68, + "id": 69, "function_name": "LVStopServer", "return_type": "int32_t", "parameter_list": [ @@ -667,7 +678,7 @@ ] }, { - "id": 69, + "id": 70, "function_name": "PackToAny", "return_type": "int32_t", "parameter_list": [ @@ -678,7 +689,7 @@ ] }, { - "id": 70, + "id": 71, "function_name": "PackToBuffer", "return_type": "int32_t", "parameter_list": [ @@ -689,7 +700,7 @@ ] }, { - "id": 71, + "id": 72, "function_name": "RegisterEnumMetadata2", "return_type": "int32_t", "parameter_list": [ @@ -698,7 +709,7 @@ ] }, { - "id": 72, + "id": 73, "function_name": "RegisterGenericMethodServerEvent", "return_type": "int32_t", "parameter_list": [ @@ -707,7 +718,7 @@ ] }, { - "id": 73, + "id": 74, "function_name": "RegisterMessageMetadata", "return_type": "int32_t", "parameter_list": [ @@ -716,7 +727,7 @@ ] }, { - "id": 74, + "id": 75, "function_name": "RegisterMessageMetadata2", "return_type": "int32_t", "parameter_list": [ @@ -725,7 +736,7 @@ ] }, { - "id": 75, + "id": 76, "function_name": "RegisterServerEvent", "return_type": "int32_t", "parameter_list": [ @@ -737,7 +748,7 @@ ] }, { - "id": 76, + "id": 77, "function_name": "SerializeReflectionInfo", "return_type": "void", "parameter_list": [ @@ -746,7 +757,7 @@ ] }, { - "id": 77, + "id": 78, "function_name": "SetCallStatus", "return_type": "int32_t", "parameter_list": [ @@ -756,7 +767,7 @@ ] }, { - "id": 78, + "id": 79, "function_name": "SetLVRTModulePath", "return_type": "int32_t", "parameter_list": [ @@ -764,7 +775,7 @@ ] }, { - "id": 79, + "id": 80, "function_name": "SetResponseData", "return_type": "int32_t", "parameter_list": [ @@ -773,7 +784,7 @@ ] }, { - "id": 80, + "id": 81, "function_name": "TryUnpackFromAny", "return_type": "int32_t", "parameter_list": [ @@ -784,7 +795,7 @@ ] }, { - "id": 81, + "id": 82, "function_name": "UnpackFieldsFromAny", "return_type": "int32_t", "parameter_list": [ @@ -793,7 +804,7 @@ ] }, { - "id": 82, + "id": 83, "function_name": "UnpackFieldsFromBuffer", "return_type": "int32_t", "parameter_list": [ @@ -802,7 +813,7 @@ ] }, { - "id": 83, + "id": 84, "function_name": "UnpackFromAny", "return_type": "int32_t", "parameter_list": [ @@ -813,7 +824,7 @@ ] }, { - "id": 84, + "id": 85, "function_name": "UnpackFromBuffer", "return_type": "int32_t", "parameter_list": [ @@ -822,6 +833,14 @@ "const char*", "int8_t*" ] + }, + { + "id": 86, + "function_name": "readIniFile", + "return_type": "void", + "parameter_list": [ + "const char*" + ] } ] } \ No newline at end of file