35 lines
1.1 KiB
Objective-C
35 lines
1.1 KiB
Objective-C
#ifndef MMCPUThermalProvider_h
|
|
#define MMCPUThermalProvider_h
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "MMTelemetryProvider.h"
|
|
#import "MMAppleSMCClient.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
/**
|
|
* MMCPUThermalProvider
|
|
* Samples real-time CPU die, proximity, and per-core temperature sensors from AppleSMC
|
|
* alongside OS thermal pressure states.
|
|
*/
|
|
@interface MMCPUThermalProvider : NSObject <MMTelemetryProvider>
|
|
|
|
@property (nonatomic, strong, readonly) MMAppleSMCClient *smcClient;
|
|
@property (nonatomic, readonly) NSArray<NSString *> *discoveredCoreKeys;
|
|
@property (nonatomic, readonly, nullable) NSString *packageKey;
|
|
|
|
- (instancetype)initWithSMCClient:(MMAppleSMCClient *)client;
|
|
|
|
/**
|
|
* Static calculator method for deterministic unit testing.
|
|
*/
|
|
+ (NSDictionary<NSString *, id> *)calculateThermalMetricsWithPackageTemp:(nullable NSNumber *)pkgTemp
|
|
coreTemps:(NSDictionary<NSString *, NSNumber *> *)coreDict
|
|
thermalState:(NSProcessInfoThermalState)state;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|
|
|
|
#endif /* MMCPUThermalProvider_h */
|