Skip to main content

write_input

Function write_input 

Source
pub fn write_input(
    kernel: &mut dyn Kernel,
    index: usize,
    name: &str,
    value: Value,
) -> Result<(), HostWriteError>
Expand description

nmbrs’s one rule for writing a host value into a kernel input.

polydat 0.5 never converts at the write, so a value that may not be of the slot’s declared type is converted first through polydat::convert::to_port, the catalog a converter node uses, and then written with the typed set_input_at. A value already of the slot’s type passes through unconverted. index is name’s position in the kernel’s inputs; the name is taken too so the per-cycle callers, which already hold it, pay no index-to-name lookup.