libtcspc.Param¶
- class libtcspc.Param(name, default_value=None)[source]¶
Bases:
Generic[T]Typed placeholder for a run-time parameter of a processing graph.
Processing nodes, input streams, bucket sources, and acquisition readers accept
Paraminstances in place of concrete values at graph-build time. At that point aParamonly declares a named, typed slot to be filled in later; codegen substitutes a reference to a generated parameter struct. At execution timeExecutionContextbinds each name to a concrete value supplied by the caller, falling back todefault_valuewhen the caller did not provide one.The generic parameter
Tis the Python-side type of the value (for example,intorstr). The C++ type used in the generated source is determined separately by the processor that declares the parameter.- Parameters:
name (str) – Name used to bind the parameter at run time. Must be unique within a graph.
default_value (T or None) – Value used when no argument is supplied at execution time.
None(the default) makes the parameter required.
See also
ExecutionContextBinds
Paramplaceholders to concrete values at run time.