# Autogenerated constants for Sensor Aggregator service
from enum import IntEnum
from jacdac.constants import *
from jacdac.system.constants import *
JD_SERVICE_CLASS_SENSOR_AGGREGATOR = const(0x1d90e1c5)


class SensorAggregatorSampleType(IntEnum):
    U8 = const(0x8)
    I8 = const(0x88)
    U16 = const(0x10)
    I16 = const(0x90)
    U32 = const(0x20)
    I32 = const(0xa0)


JD_SENSOR_AGGREGATOR_REG_INPUTS = const(0x80)
JD_SENSOR_AGGREGATOR_REG_NUM_SAMPLES = const(0x180)
JD_SENSOR_AGGREGATOR_REG_SAMPLE_SIZE = const(0x181)
JD_SENSOR_AGGREGATOR_REG_STREAMING_SAMPLES = const(0x81)
JD_SENSOR_AGGREGATOR_REG_CURRENT_SAMPLE = const(JD_REG_READING)
JD_SENSOR_AGGREGATOR_PACK_FORMATS = {
    JD_SENSOR_AGGREGATOR_REG_INPUTS: "u16 u16 u32 r: b[8] u32 u8 u8 u8 i8",
    JD_SENSOR_AGGREGATOR_REG_NUM_SAMPLES: "u32",
    JD_SENSOR_AGGREGATOR_REG_SAMPLE_SIZE: "u8",
    JD_SENSOR_AGGREGATOR_REG_STREAMING_SAMPLES: "u32",
    JD_SENSOR_AGGREGATOR_REG_CURRENT_SAMPLE: "b"
}
