@@ -1246,44 +1246,10 @@ - (MTRBaseDevice *)baseDeviceForNodeID:(NSNumber *)nodeID
1246
1246
return [[MTRBaseDevice alloc ] initWithNodeID: nodeID controller: self ];
1247
1247
}
1248
1248
1249
- // If prefetchedClusterData is not provided, load attributes individually from controller data store
1250
1249
- (MTRDevice *)_setupDeviceForNodeID : (NSNumber *)nodeID prefetchedClusterData : (NSDictionary <MTRClusterPath *, MTRDeviceClusterData *> *)prefetchedClusterData
1251
1250
{
1252
- os_unfair_lock_assert_owner (self.deviceMapLock );
1253
-
1254
- MTRDevice * deviceToReturn = [[MTRDevice_Concrete alloc ] initWithNodeID: nodeID controller: self ];
1255
- // If we're not running, don't add the device to our map. That would
1256
- // create a cycle that nothing would break. Just return the device,
1257
- // which will be in exactly the state it would be in if it were created
1258
- // while we were running and then we got shut down.
1259
- if ([self isRunning ]) {
1260
- [_nodeIDToDeviceMap setObject: deviceToReturn forKey: nodeID];
1261
- }
1262
-
1263
- if (prefetchedClusterData) {
1264
- if (prefetchedClusterData.count ) {
1265
- [deviceToReturn setPersistedClusterData: prefetchedClusterData];
1266
- }
1267
- } else if (_controllerDataStore) {
1268
- // Load persisted cluster data if they exist.
1269
- NSDictionary * clusterData = [_controllerDataStore getStoredClusterDataForNodeID: nodeID];
1270
- MTR_LOG (" %@ Loaded %lu cluster data from storage for %@" , self, static_cast <unsigned long >(clusterData.count ), deviceToReturn);
1271
- if (clusterData.count ) {
1272
- [deviceToReturn setPersistedClusterData: clusterData];
1273
- }
1274
- }
1275
-
1276
- // TODO: Figure out how to get the device data as part of our bulk-read bits.
1277
- if (_controllerDataStore) {
1278
- auto * deviceData = [_controllerDataStore getStoredDeviceDataForNodeID: nodeID];
1279
- if (deviceData.count ) {
1280
- [deviceToReturn setPersistedDeviceData: deviceData];
1281
- }
1282
- }
1283
-
1284
- [deviceToReturn setStorageBehaviorConfiguration: _storageBehaviorConfiguration];
1285
-
1286
- return deviceToReturn;
1251
+ MTR_ABSTRACT_METHOD ();
1252
+ return nil ;
1287
1253
}
1288
1254
1289
1255
- (MTRDevice *)deviceForNodeID : (NSNumber *)nodeID
0 commit comments