# ElectricalPowerMeasurementTrait.MeasurementRangeStruct


```
class ElectricalPowerMeasurementTrait.MeasurementRangeStruct : ClusterStruct
```

<br />

*** ** * ** ***

The maximum and minimum values of a given measurement type during a measurement period, along with the observation times of these values.

## Summary

| ### Nested types |
|---|
| `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct.StructFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this struct's fields. |

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#MeasurementRangeStruct(com.google.home.matter.standard.ElectricalPowerMeasurementTrait.MeasurementTypeEnum,kotlin.Long,kotlin.Long,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue,com.google.home.matter.serialization.OptionalValue)( measurementType: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementTypeEnum, min: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html, max: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html, startTimestamp: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>, endTimestamp: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>, minTimestamp: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>, maxTimestamp: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>, startSystime: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html>, endSystime: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html>, minSystime: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html>, maxSystime: https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html> )` Creates the MeasurementRangeStruct class. |

| ### Public functions |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#getDescriptor()()` Returns the descriptor for the struct. |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?` | `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#getFieldValueById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)` Returns the value of the field for the given tag ID. |

| ### Public properties |
|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endSystime()` The time, in milliseconds, since boot at the end of the measurement period. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endTimestamp()` The timestamp in UTC of the end of the measurement period. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#max()` The largest measured value for the associated measurement over the period between either `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startTimestamp()` and `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endTimestamp()` or the period between `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startSystime()` and `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endSystime()`, or both. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#maxSystime()` The measurement time, in milliseconds, since boot of the value in the `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/index.html` field. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#maxTimestamp()` The most recent timestamp in UTC of the value in the `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/index.html` field. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementTypeEnum` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#measurementType()` The measurement type for the range provided. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#min()` The smallest measured value for the associated measurement over the period between either `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startTimestamp()` and `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endTimestamp()` or the period between `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startSystime()` and `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endSystime()`, or both. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#minSystime()` The measurement time, in milliseconds, since boot of the value in the `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/index.html` field. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#minTimestamp()` The most recent timestamp in UTC of the value in the `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/index.html` field. greater than or equal to the value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startTimestamp()` field, and less than or equal to the value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endTimestamp()` field. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startSystime()` The time since boot at the start of the measurement period. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/serialization/OptionalValue<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startTimestamp()` The timestamp in UTC of the start of the measurement period. |

## Public constructors

### MeasurementRangeStruct

```
MeasurementRangeStruct(
    measurementType: ElectricalPowerMeasurementTrait.MeasurementTypeEnum = MeasurementTypeEnum.Unspecified,
    min: Long = 0,
    max: Long = 0,
    startTimestamp: OptionalValue<UInt> = OptionalValue.absent(),
    endTimestamp: OptionalValue<UInt> = OptionalValue.absent(),
    minTimestamp: OptionalValue<UInt> = OptionalValue.absent(),
    maxTimestamp: OptionalValue<UInt> = OptionalValue.absent(),
    startSystime: OptionalValue<ULong> = OptionalValue.absent(),
    endSystime: OptionalValue<ULong> = OptionalValue.absent(),
    minSystime: OptionalValue<ULong> = OptionalValue.absent(),
    maxSystime: OptionalValue<ULong> = OptionalValue.absent()
)
```

Creates the MeasurementRangeStruct class.

## Public functions

### getDescriptor

```
@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor
```

Returns the descriptor for the struct.

### getFieldValueById

```
@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?
```

Returns the value of the field for the given tag ID.

## Public properties

### endSystime

```
val endSystime: OptionalValue<ULong>
```

The time, in milliseconds, since boot at the end of the measurement period.

### endTimestamp

```
val endTimestamp: OptionalValue<UInt>
```

The timestamp in UTC of the end of the measurement period.

### max

```
val max: Long
```

The largest measured value for the associated measurement over the period between either `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startTimestamp()` and `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endTimestamp()` or the period between `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startSystime()` and `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endSystime()`, or both.

### maxSystime

```
val maxSystime: OptionalValue<ULong>
```

The measurement time, in milliseconds, since boot of the value in the `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/index.html` field. The value is greater than or equal to the value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startSystime()` field and less than or equal to the value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endSystime()` field.

### maxTimestamp

```
val maxTimestamp: OptionalValue<UInt>
```

The most recent timestamp in UTC of the value in the `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/index.html` field. The value is greater than or equal to the value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startTimestamp()` field, and less than or equal to the value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endTimestamp()` field.

### measurementType

```
val measurementType: ElectricalPowerMeasurementTrait.MeasurementTypeEnum
```

The measurement type for the range provided.

### min

```
val min: Long
```

The smallest measured value for the associated measurement over the period between either `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startTimestamp()` and `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endTimestamp()` or the period between `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startSystime()` and `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endSystime()`, or both.

### minSystime

```
val minSystime: OptionalValue<ULong>
```

The measurement time, in milliseconds, since boot of the value in the `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/index.html` field. The value is greater than or equal to the value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startSystime()` field andless than or equal to the value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endSystime()` field.

### minTimestamp

```
val minTimestamp: OptionalValue<UInt>
```

The most recent timestamp in UTC of the value in the `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/index.html` field. greater than or equal to the value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#startTimestamp()` field, and less than or equal to the value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ElectricalPowerMeasurementTrait.MeasurementRangeStruct#endTimestamp()` field.

### startSystime

```
val startSystime: OptionalValue<ULong>
```

The time since boot at the start of the measurement period.

### startTimestamp

```
val startTimestamp: OptionalValue<UInt>
```

The timestamp in UTC of the start of the measurement period.