holoscan::InputSpecBuilder
Configure one typed input declaration during cold Operator setup.
Builder references remain valid for the lifetime of their OperatorSpec. Configuration records metadata only; it does not allocate runtime queues or bind backend endpoints.
Methods
optional
Permit this input to be intentionally unwired.
The contract must use the single-sample Exact selector and explicit SafeDefault. Selector cardinality does not restrict the admitted payload family. Trigger-guaranteed inputs, window selectors/anchors, and predicate evaluation inputs remain required. Ordinary compute-only side inputs preserve their existing selection phases. Connected inputs retain ordinary selection. An unwired input supplies no payload or fallback value; the Operator handles kSafeDefault with reason kNotConnected.
Returns: This builder for fluent declaration; repeated calls have no further effect.
queue_depth
Set the finite input history capacity requested by this declaration.
Returns: This builder for fluent cold-path configuration.
Parameters
Positive number of retained sample slots.
expected_rate
Declare an advisory expected nominal input rate.
Returns: This builder after retaining the normalized declaration or first error.
Parameters
Exact positive rational samples per second.
diagnostic_alias
Record an alternate diagnostic display name.
An alias does not change canonical port identity or repair a declaration-name mismatch.
Returns: This builder for fluent cold-path configuration.
Throws: std::bad_alloc if storage for the copied alias cannot be allocated.
Throws: std::length_error if alias exceeds the implementation’s maximum string size.
Parameters
Display-only name copied into cold metadata.
expects_tensor
Record one normalized consumer Tensor spec carried by this input.
Returns: This builder for fluent cold-path configuration.
Parameters
Representation, finite bounds, and optional conversion requirements.
accepts_projected_tensor
Admit a Tensor projected out of a producer’s descriptor-backed schema.
Projection supports bounded same-process fanout and inter-process schema transport. Each consumer selects its own field and retains its own sample lease. Same-process delivery shares storage; inter-process delivery requires the producer’s bounded transfer policy and may stage a copy. Projection preserves sample identity without representation conversion.
Returns: This builder for fluent cold-path configuration.
payload_options
Record schema identity and payload options carried by this input.
Returns: This builder for fluent cold-path configuration.
Parameters
Complete payload options copied into this builder.
tensor_field
Overload 1
Overload 2
Select one Tensor member for field-scoped input declarations.
The returned non-owning builder must not outlive this parent builder.
Returns: Field-scoped builder for logical and materialization requirements.
Template parameters
Owning generated descriptor-backed schema type.
Parameters
Generated schema-typed field token.
tensor_fields
Overload 1
Overload 2
Apply one input spec to a statically listed set of Tensor fields.
Returns: This input builder.
Throws: std::bad_alloc if field-record storage cannot be allocated.
Template parameters
Owning generated descriptor-backed schema type.
Number of listed selectors.
Parameters
Generated schema-typed field tokens.
Shared logical and conversion requirements.