Skip to main content

execute

Function execute 

Source
pub fn execute(
    plc: &mut dyn Plc,
    chunks: &[Vec<Read>],
    between: &mut dyn FnMut(&mut dyn Plc, HashMap<String, TagResult>) -> Result<(), String>,
) -> Result<(HashMap<String, TagResult>, Vec<String>, usize), String>
Expand description

Runs a plan split in chunks, one plc.read per chunk; between(plc, partial results) runs after every chunk but the last (the worker publishes those results and runs queued writes there), and its results are left out of the returned ones. Returns (results by tag, names of failed group reads, read services sent). The members of failed group reads are read one by one after the last chunk, so no value is ever wrong. Err = a lost connection from plc.read, or an error from between.