1# Copyright: (c) 2025, Intel Corporation 2# Author: Arkadiusz Cholewinski <arkadiuszx.cholewinski@intel.com> 3from dataclasses import dataclass, field 4 5 6@dataclass 7class PowerShieldConf: 8 class PowerMode: 9 """ 10 Class representing power mode 11 """ 12 13 AUTO = "auto" # Power-on when acquisition start 14 ON = "on" # Power-on manually 15 OFF = "off" # Power-off manually 16 17 class MeasureUnit: 18 """ 19 Class representing measure units. 20 """ 21 22 VOLTAGE = "voltage" # Target Volatege 23 CURRENT_RMS = "current_rms" # Current RMS value 24 POWER = "power" # Total power consumption 25 RAW_DATA = "rawdata" # Get Raw Data (current probes) 26 27 class TemperatureUnit: 28 """ 29 Class representing temperature units. 30 """ 31 32 CELSIUS = "degc" # Celsius temperature unit 33 FAHRENHEIT = "degf" # Fahrenheit temperature unit 34 35 class FunctionMode: 36 """ 37 Class representing functional modes of a power monitor. 38 """ 39 40 OPTIM = "optim" # Optimized mode for lower power or efficiency 41 HIGH = "high" # High performance mode 42 43 class DataFormat: 44 """ 45 Class representing different data formats for representation. 46 """ 47 48 ASCII_DEC = "ascii_dec" # ASCII encoded decimal format 49 BIN_HEXA = "bin_hexa" # Binary/hexadecimal format 50 51 class SamplingFrequency: 52 """ 53 Class representing various sampling frequencies. 54 """ 55 56 FREQ_100K = "100k" # 100 kHz frequency 57 FREQ_50K = "50k" # 50 kHz frequency 58 FREQ_20K = "20k" # 20 kHz frequency 59 FREQ_10K = "10k" # 10 kHz frequency 60 FREQ_5K = "5k" # 5 kHz frequency 61 FREQ_2K = "2k" # 2 kHz frequency 62 FREQ_1K = "1k" # 1 kHz frequency 63 FREQ_500 = "500" # 500 Hz frequency 64 FREQ_200 = "200" # 200 Hz frequency 65 FREQ_100 = "100" # 100 Hz frequency 66 FREQ_50 = "50" # 50 Hz frequency 67 FREQ_20 = "20" # 20 Hz frequency 68 FREQ_10 = "10" # 10 Hz frequency 69 FREQ_5 = "5" # 5 Hz frequency 70 FREQ_2 = "2" # 2 Hz frequency 71 FREQ_1 = "1" # 1 Hz frequency 72 73 output_file: str = "rawData.csv" 74 sampling_frequency: str = SamplingFrequency.FREQ_1K 75 data_format: str = DataFormat.BIN_HEXA 76 function_mode: str = FunctionMode.HIGH 77 target_voltage: str = "3300m" 78 temperature_unit: str = TemperatureUnit.CELSIUS 79 acquisition_time: str = field(default=None, init=False) 80