diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a6862f79..3f12fed4d 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 diff --git a/conan/profiles/vs32 b/conan/profiles/vs32 index f78b6c433..8b20a3bfe 100644 --- a/conan/profiles/vs32 +++ b/conan/profiles/vs32 @@ -8,3 +8,4 @@ compiler.runtime=static compiler.runtime_type=Release build_type=Release + diff --git a/conan/profiles/vs32debug b/conan/profiles/vs32debug index 445637905..505fc71bc 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 + diff --git a/conan/profiles/vs32shared b/conan/profiles/vs32shared index cac3622ed..52ac0b1e4 100644 --- a/conan/profiles/vs32shared +++ b/conan/profiles/vs32shared @@ -8,5 +8,6 @@ compiler.runtime=dynamic compiler.runtime_type=Release build_type=Release + [options] shared=True diff --git a/conan/profiles/vs64 b/conan/profiles/vs64 index b383dfaeb..729464e42 100644 --- a/conan/profiles/vs64 +++ b/conan/profiles/vs64 @@ -6,4 +6,4 @@ 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 diff --git a/conan/profiles/vs64debug b/conan/profiles/vs64debug index e72e4f7f8..226a6a3fe 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 - diff --git a/src/mtconnect/agent.cpp b/src/mtconnect/agent.cpp index 870b8cb87..d350f92ca 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); @@ -929,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()) {