Files
MacMonitor/Sources/Telemetry/Thermal/MMCPUThermalProvider.h
gronod b47ffd72ca
MacMonitor CI/CD Pipeline / Build & Test (Intel x86_64) (push) Canceled after 0s
feat(thermal): implement MMCPUThermalProvider with package, per-core temps, and throttling (Issue #3)
2026-09-08 12:21:26 +01:00

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 */