Skip to main content

MAX_WINDOW_SAMPLES

Constant MAX_WINDOW_SAMPLES 

Source
pub const MAX_WINDOW_SAMPLES: u32 = 1_440;
Expand description

Largest Window_Samples an Averaging object accepts.

Clause 12.5.15 sets a floor of 15 samples per window but no ceiling, while the window keeps one slot per sample, so the buffer needs a bound. 1,440 slots hold one sample a minute for a whole day, the longest window building automation commonly averages over, at about 11 KiB per object (eight bytes a slot). A write or setter above it fails with PROPERTY / VALUE_OUT_OF_RANGE.