43 lines
1.2 KiB
Objective-C
43 lines
1.2 KiB
Objective-C
#ifndef MMComponentThermalProvider_h
|
|
#define MMComponentThermalProvider_h
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "MMTelemetryProvider.h"
|
|
#import "MMAppleSMCClient.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/**
|
|
* MMComponentThermalProvider
|
|
* Samples motherboard, PCH chipset, heatsink, memory, and enclosure ambient temperatures
|
|
* via AppleSMC.
|
|
*/
|
|
@interface MMComponentThermalProvider : NSObject <MMTelemetryProvider>
|
|
|
|
@property (nonatomic, strong, readonly) MMAppleSMCClient *smcClient;
|
|
@property (nonatomic, readonly) NSArray<NSString *> *discoveredKeys;
|
|
|
|
- (instancetype)init;
|
|
- (instancetype)initWithSMCClient:(MMAppleSMCClient *)client;
|
|
|
|
/**
|
|
* Categorize SMC temperature key into component domain (e.g., PCH / Chipset, Heatsink, Memory, etc.)
|
|
*/
|
|
+ (NSString *)categoryForKey:(NSString *)key;
|
|
|
|
/**
|
|
* Human-readable friendly name for known component SMC keys.
|
|
*/
|
|
+ (NSString *)humanReadableNameForKey:(NSString *)key;
|
|
|
|
/**
|
|
* Static calculator method for deterministic unit testing.
|
|
*/
|
|
+ (NSDictionary<NSString *, id> *)calculateComponentMetricsFromDictionary:(NSDictionary<NSString *, NSNumber *> *)readings;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|
|
|
|
#endif /* MMComponentThermalProvider_h */
|