@@ -780,44 +780,10 @@ - (MTRBaseDevice *)baseDeviceForNodeID:(NSNumber *)nodeID
780
780
return [[MTRBaseDevice alloc ] initWithNodeID: nodeID controller: self ];
781
781
}
782
782
783
- // If prefetchedClusterData is not provided, load attributes individually from controller data store
784
783
- (MTRDevice *)_setupDeviceForNodeID : (NSNumber *)nodeID prefetchedClusterData : (NSDictionary <MTRClusterPath *, MTRDeviceClusterData *> *)prefetchedClusterData
785
784
{
786
- os_unfair_lock_assert_owner (self.deviceMapLock );
787
-
788
- MTRDevice * deviceToReturn = [[MTRDevice_Concrete alloc ] initWithNodeID: nodeID controller: self ];
789
- // If we're not running, don't add the device to our map. That would
790
- // create a cycle that nothing would break. Just return the device,
791
- // which will be in exactly the state it would be in if it were created
792
- // while we were running and then we got shut down.
793
- if ([self isRunning ]) {
794
- [_nodeIDToDeviceMap setObject: deviceToReturn forKey: nodeID];
795
- }
796
-
797
- if (prefetchedClusterData) {
798
- if (prefetchedClusterData.count ) {
799
- [deviceToReturn setPersistedClusterData: prefetchedClusterData];
800
- }
801
- } else if (_controllerDataStore) {
802
- // Load persisted cluster data if they exist.
803
- NSDictionary * clusterData = [_controllerDataStore getStoredClusterDataForNodeID: nodeID];
804
- MTR_LOG (" %@ Loaded %lu cluster data from storage for %@" , self, static_cast <unsigned long >(clusterData.count ), deviceToReturn);
805
- if (clusterData.count ) {
806
- [deviceToReturn setPersistedClusterData: clusterData];
807
- }
808
- }
809
-
810
- // TODO: Figure out how to get the device data as part of our bulk-read bits.
811
- if (_controllerDataStore) {
812
- auto * deviceData = [_controllerDataStore getStoredDeviceDataForNodeID: nodeID];
813
- if (deviceData.count ) {
814
- [deviceToReturn setPersistedDeviceData: deviceData];
815
- }
816
- }
817
-
818
- [deviceToReturn setStorageBehaviorConfiguration: _storageBehaviorConfiguration];
819
-
820
- return deviceToReturn;
785
+ MTR_ABSTRACT_METHOD ();
786
+ return nil ;
821
787
}
822
788
823
789
- (MTRDevice *)deviceForNodeID : (NSNumber *)nodeID
0 commit comments