@@ -1190,44 +1190,10 @@ - (MTRBaseDevice *)baseDeviceForNodeID:(NSNumber *)nodeID
1190
1190
return [[MTRBaseDevice alloc ] initWithNodeID: nodeID controller: self ];
1191
1191
}
1192
1192
1193
- // If prefetchedClusterData is not provided, load attributes individually from controller data store
1194
1193
- (MTRDevice *)_setupDeviceForNodeID : (NSNumber *)nodeID prefetchedClusterData : (NSDictionary <MTRClusterPath *, MTRDeviceClusterData *> *)prefetchedClusterData
1195
1194
{
1196
- os_unfair_lock_assert_owner (self.deviceMapLock );
1197
-
1198
- MTRDevice * deviceToReturn = [[MTRDevice_Concrete alloc ] initWithNodeID: nodeID controller: self ];
1199
- // If we're not running, don't add the device to our map. That would
1200
- // create a cycle that nothing would break. Just return the device,
1201
- // which will be in exactly the state it would be in if it were created
1202
- // while we were running and then we got shut down.
1203
- if ([self isRunning ]) {
1204
- [_nodeIDToDeviceMap setObject: deviceToReturn forKey: nodeID];
1205
- }
1206
-
1207
- if (prefetchedClusterData) {
1208
- if (prefetchedClusterData.count ) {
1209
- [deviceToReturn setPersistedClusterData: prefetchedClusterData];
1210
- }
1211
- } else if (_controllerDataStore) {
1212
- // Load persisted cluster data if they exist.
1213
- NSDictionary * clusterData = [_controllerDataStore getStoredClusterDataForNodeID: nodeID];
1214
- MTR_LOG (" %@ Loaded %lu cluster data from storage for %@" , self, static_cast <unsigned long >(clusterData.count ), deviceToReturn);
1215
- if (clusterData.count ) {
1216
- [deviceToReturn setPersistedClusterData: clusterData];
1217
- }
1218
- }
1219
-
1220
- // TODO: Figure out how to get the device data as part of our bulk-read bits.
1221
- if (_controllerDataStore) {
1222
- auto * deviceData = [_controllerDataStore getStoredDeviceDataForNodeID: nodeID];
1223
- if (deviceData.count ) {
1224
- [deviceToReturn setPersistedDeviceData: deviceData];
1225
- }
1226
- }
1227
-
1228
- [deviceToReturn setStorageBehaviorConfiguration: _storageBehaviorConfiguration];
1229
-
1230
- return deviceToReturn;
1195
+ MTR_ABSTRACT_METHOD ();
1196
+ return nil ;
1231
1197
}
1232
1198
1233
1199
- (MTRDevice *)deviceForNodeID : (NSNumber *)nodeID
0 commit comments