From 86f098d74fdcc082a1a76e48b4f5ec12a7f26b1a Mon Sep 17 00:00:00 2001 From: Will Sobel Date: Sun, 22 Sep 2024 16:57:28 -0400 Subject: [PATCH 1/4] Do not migrate old required data items to new device, not necessary --- src/mtconnect/agent.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/mtconnect/agent.cpp b/src/mtconnect/agent.cpp index 870b8cb8..e2406a62 100644 --- a/src/mtconnect/agent.cpp +++ b/src/mtconnect/agent.cpp @@ -568,27 +568,7 @@ namespace mtconnect { LOG(error) << "Device does not have a name: " << *device->getUuid(); return false; } - - // if different, and revise to new device leaving in place - // the asset changed, removed, and availability data items - ErrorList errors; - if (auto odi = oldDev->getAssetChanged(), ndi = device->getAssetChanged(); odi && !ndi) - device->addDataItem(odi, errors); - if (auto odi = oldDev->getAssetRemoved(), ndi = device->getAssetRemoved(); odi && !ndi) - device->addDataItem(odi, errors); - if (auto odi = oldDev->getAvailability(), ndi = device->getAvailability(); odi && !ndi) - device->addDataItem(odi, errors); - if (auto odi = oldDev->getAssetCount(), ndi = device->getAssetCount(); odi && !ndi) - device->addDataItem(odi, errors); - - if (errors.size() > 0) - { - LOG(error) << "Error adding device required data items for " << *device->getUuid() << ':'; - for (const auto &e : errors) - LOG(error) << " " << e->what(); - return false; - } - + verifyDevice(device); createUniqueIds(device); From 39da3d60df463097db5c140fc7c3287d6fc395a2 Mon Sep 17 00:00:00 2001 From: Will Sobel Date: Sun, 22 Sep 2024 17:12:57 -0400 Subject: [PATCH 2/4] upgraded windows workflow to VS 2022 and removed unused variable --- .github/workflows/build.yml | 4 ++-- conan/profiles/vs32 | 1 + conan/profiles/vs32debug | 1 + conan/profiles/vs32shared | 1 + conan/profiles/vs64 | 3 ++- conan/profiles/vs64debug | 2 +- conan/profiles/vs64shared | 1 + src/mtconnect/agent.cpp | 3 --- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af4e8e07..8e2a48b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,8 +28,8 @@ on: jobs: build_windows: - runs-on: windows-2019 - name: "Windows 2019 Arch: ${{ matrix.arch }}, Shared: ${{ matrix.shared }}" + runs-on: windows-2022 + name: "Windows 2022 Arch: ${{ matrix.arch }}, Shared: ${{ matrix.shared }}" strategy: matrix: arch: ["x86", "amd64"] diff --git a/conan/profiles/vs32 b/conan/profiles/vs32 index f78b6c43..40e4f802 100644 --- a/conan/profiles/vs32 +++ b/conan/profiles/vs32 @@ -7,4 +7,5 @@ arch=x86 compiler.runtime=static compiler.runtime_type=Release build_type=Release +compiler.version=194 diff --git a/conan/profiles/vs32debug b/conan/profiles/vs32debug index 44563790..61a7bec6 100644 --- a/conan/profiles/vs32debug +++ b/conan/profiles/vs32debug @@ -7,3 +7,4 @@ arch=x86 compiler.runtime=static compiler.runtime_type=Debug build_type=Debug +compiler.version=194 diff --git a/conan/profiles/vs32shared b/conan/profiles/vs32shared index cac3622e..d573daba 100644 --- a/conan/profiles/vs32shared +++ b/conan/profiles/vs32shared @@ -7,6 +7,7 @@ arch=x86 compiler.runtime=dynamic compiler.runtime_type=Release build_type=Release +compiler.version=194 [options] shared=True diff --git a/conan/profiles/vs64 b/conan/profiles/vs64 index b383dfae..4e1e91c4 100644 --- a/conan/profiles/vs64 +++ b/conan/profiles/vs64 @@ -6,4 +6,5 @@ compiler.cppstd=17 arch=x86_64 compiler.runtime=static compiler.runtime_type=Release -build_type=Release \ No newline at end of file +build_type=Release +compiler.version=194 diff --git a/conan/profiles/vs64debug b/conan/profiles/vs64debug index e72e4f7f..2a0cec25 100644 --- a/conan/profiles/vs64debug +++ b/conan/profiles/vs64debug @@ -7,4 +7,4 @@ arch=x86_64 compiler.runtime=static compiler.runtime_type=Debug build_type=Debug - +compiler.version=194 diff --git a/conan/profiles/vs64shared b/conan/profiles/vs64shared index ebea4cd9..3ddb5bd3 100644 --- a/conan/profiles/vs64shared +++ b/conan/profiles/vs64shared @@ -7,6 +7,7 @@ arch=x86_64 compiler.runtime=dynamic compiler.runtime_type=Release build_type=Release +compiler.version=194 [options] shared=True diff --git a/src/mtconnect/agent.cpp b/src/mtconnect/agent.cpp index e2406a62..d350f92c 100644 --- a/src/mtconnect/agent.cpp +++ b/src/mtconnect/agent.cpp @@ -909,9 +909,6 @@ namespace mtconnect { { NAMED_SCOPE("Agent::initializeDataItems"); - // Grab data from configuration - string time = getCurrentTime(GMT_UV_SEC); - // Initialize the id mapping for the devices and set all data items to UNAVAILABLE for (auto item : device->getDeviceDataItems()) { From 4a72288af35c80acef574577f53555f165ee0dc9 Mon Sep 17 00:00:00 2001 From: Will Sobel Date: Sun, 22 Sep 2024 23:54:45 -0400 Subject: [PATCH 3/4] reverted back to 2019 --- .github/workflows/build.yml | 4 ++-- conan/profiles/vs32 | 2 +- conan/profiles/vs32debug | 2 +- conan/profiles/vs32shared | 2 +- conan/profiles/vs64 | 1 - conan/profiles/vs64debug | 1 - conan/profiles/vs64shared | 1 - 7 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8e2a48b1..af4e8e07 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,8 +28,8 @@ on: jobs: build_windows: - runs-on: windows-2022 - name: "Windows 2022 Arch: ${{ matrix.arch }}, Shared: ${{ matrix.shared }}" + runs-on: windows-2019 + name: "Windows 2019 Arch: ${{ matrix.arch }}, Shared: ${{ matrix.shared }}" strategy: matrix: arch: ["x86", "amd64"] diff --git a/conan/profiles/vs32 b/conan/profiles/vs32 index 40e4f802..8b20a3bf 100644 --- a/conan/profiles/vs32 +++ b/conan/profiles/vs32 @@ -7,5 +7,5 @@ arch=x86 compiler.runtime=static compiler.runtime_type=Release build_type=Release -compiler.version=194 + diff --git a/conan/profiles/vs32debug b/conan/profiles/vs32debug index 61a7bec6..505fc71b 100644 --- a/conan/profiles/vs32debug +++ b/conan/profiles/vs32debug @@ -7,4 +7,4 @@ arch=x86 compiler.runtime=static compiler.runtime_type=Debug build_type=Debug -compiler.version=194 + diff --git a/conan/profiles/vs32shared b/conan/profiles/vs32shared index d573daba..52ac0b1e 100644 --- a/conan/profiles/vs32shared +++ b/conan/profiles/vs32shared @@ -7,7 +7,7 @@ arch=x86 compiler.runtime=dynamic compiler.runtime_type=Release build_type=Release -compiler.version=194 + [options] shared=True diff --git a/conan/profiles/vs64 b/conan/profiles/vs64 index 4e1e91c4..729464e4 100644 --- a/conan/profiles/vs64 +++ b/conan/profiles/vs64 @@ -7,4 +7,3 @@ arch=x86_64 compiler.runtime=static compiler.runtime_type=Release build_type=Release -compiler.version=194 diff --git a/conan/profiles/vs64debug b/conan/profiles/vs64debug index 2a0cec25..226a6a3f 100644 --- a/conan/profiles/vs64debug +++ b/conan/profiles/vs64debug @@ -7,4 +7,3 @@ arch=x86_64 compiler.runtime=static compiler.runtime_type=Debug build_type=Debug -compiler.version=194 diff --git a/conan/profiles/vs64shared b/conan/profiles/vs64shared index 3ddb5bd3..ebea4cd9 100644 --- a/conan/profiles/vs64shared +++ b/conan/profiles/vs64shared @@ -7,7 +7,6 @@ arch=x86_64 compiler.runtime=dynamic compiler.runtime_type=Release build_type=Release -compiler.version=194 [options] shared=True From 1efb81b1da58ac4d50c1817456f5011cc8e4b6f3 Mon Sep 17 00:00:00 2001 From: Will Sobel Date: Mon, 23 Sep 2024 10:07:33 -0400 Subject: [PATCH 4/4] Version 2.4.0.2 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a6862f7..3f12fed4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ set(AGENT_VERSION_MAJOR 2) set(AGENT_VERSION_MINOR 4) set(AGENT_VERSION_PATCH 0) -set(AGENT_VERSION_BUILD 1) +set(AGENT_VERSION_BUILD 2) set(AGENT_VERSION_RC "") # This minimum version is to support Visual Studio 2019 and C++ feature checking and FetchContent