pub(crate) struct FilteredChannelRows {
pub(crate) groups: Vec<Vec<FileSpan>>,
pub(crate) slices: VecDeque<(usize, i64, i64)>,
pub(crate) calibrations: Arc<Vec<(CalibrationSpec, String)>>,
pub(crate) filter: ExportFilter<FilterInputRow>,
pub(crate) start_ns: i64,
pub(crate) end_ns: i64,
pub(crate) finished: bool,
}Expand description
Reads one channel over the export range plus lead-in and settling margins and runs it through the zero-phase filter pipeline, one merge slice at a time.
Rows come out in time order through Self::next_batch, only those inside the
export range, each with its filtered calibrated value. Memory stays bounded by
one slice plus the filter’s backward-pass block (see filters::ExportFilter),
and the batch handed back.
Fields§
§groups: Vec<Vec<FileSpan>>File groups of the channel’s day folders, in time order.
slices: VecDeque<(usize, i64, i64)>(group index, from_ns, to_ns) slices still to read.
calibrations: Arc<Vec<(CalibrationSpec, String)>>Calibrations of the rows read so far. Rows refer to them by index rather than each holding a reference count, which the reader and CSV threads would otherwise update for every row.
filter: ExportFilter<FilterInputRow>§start_ns: i64§end_ns: i64§finished: boolImplementations§
Source§impl FilteredChannelRows
impl FilteredChannelRows
Sourcepub(crate) fn new(
root: &Path,
asset: u32,
channel: u8,
start: DateTime<Utc>,
end: DateTime<Utc>,
settings: &ChannelFilterSettings,
) -> Result<Self>
pub(crate) fn new( root: &Path, asset: u32, channel: u8, start: DateTime<Utc>, end: DateTime<Utc>, settings: &ChannelFilterSettings, ) -> Result<Self>
Sourcepub(crate) fn next_batch(
&mut self,
) -> Option<(Vec<FilteredRow<FilterInputRow>>, Arc<Vec<(CalibrationSpec, String)>>)>
pub(crate) fn next_batch( &mut self, ) -> Option<(Vec<FilteredRow<FilterInputRow>>, Arc<Vec<(CalibrationSpec, String)>>)>
Reads the next slice and returns the rows it completes; None when done.
§Returns
The rows, and the table their calibration indices refer to.