@@ -568,27 +568,7 @@ namespace mtconnect {
568
568
LOG (error) << " Device does not have a name: " << *device->getUuid ();
569
569
return false ;
570
570
}
571
-
572
- // if different, and revise to new device leaving in place
573
- // the asset changed, removed, and availability data items
574
- ErrorList errors;
575
- if (auto odi = oldDev->getAssetChanged (), ndi = device->getAssetChanged (); odi && !ndi)
576
- device->addDataItem (odi, errors);
577
- if (auto odi = oldDev->getAssetRemoved (), ndi = device->getAssetRemoved (); odi && !ndi)
578
- device->addDataItem (odi, errors);
579
- if (auto odi = oldDev->getAvailability (), ndi = device->getAvailability (); odi && !ndi)
580
- device->addDataItem (odi, errors);
581
- if (auto odi = oldDev->getAssetCount (), ndi = device->getAssetCount (); odi && !ndi)
582
- device->addDataItem (odi, errors);
583
-
584
- if (errors.size () > 0 )
585
- {
586
- LOG (error) << " Error adding device required data items for " << *device->getUuid () << ' :' ;
587
- for (const auto &e : errors)
588
- LOG (error) << " " << e->what ();
589
- return false ;
590
- }
591
-
571
+
592
572
verifyDevice (device);
593
573
createUniqueIds (device);
594
574
@@ -929,9 +909,6 @@ namespace mtconnect {
929
909
{
930
910
NAMED_SCOPE (" Agent::initializeDataItems" );
931
911
932
- // Grab data from configuration
933
- string time = getCurrentTime (GMT_UV_SEC);
934
-
935
912
// Initialize the id mapping for the devices and set all data items to UNAVAILABLE
936
913
for (auto item : device->getDeviceDataItems ())
937
914
{
0 commit comments