Jump to content

InterprocessSrcOp

From RidgeRun Developer Wiki

🚧 Documentation is under development

The Holoscan SDK guide is currently under active development. Some sections may be incomplete or change without notice.

Questions? Contact RidgeRun or email to support@ridgerun.com.

Contents Pin






Preliminary reference
This reference is preliminary. The set of available operators and HSDK applications, along with their APIs and documented behavior, may change in future releases.


InterprocessSrcOp

InterprocessSrcOp is a Holoscan graph source for CUDA Tensor samples published by an external HoloMQ endpoint. It reads a catalog, attaches a subscriber to one configured endpoint and can switch the active endpoint through a runtime-mutable parameter without rebuilding the graph.


Process integration
Contact RidgeRun for custom operators that connect Holoscan processes and integrate switching between compatible sources during a run.


Input arguments

The constructor receives a ChannelEndpointCatalog, an ordered list of endpoint names, a positive polling period, an end-of-stream signal and a receiver-ready signal. All configured endpoints must expose the same maximum Tensor rank and byte span.

The runtime-mutable parameter endpoint_index selects the active entry in the endpoint list. The default is index 0. An out-of-range index is rejected at startup or compute time.

Ports and data contract

Port Memory Queue Trigger Contract
output CUDA device, runtime pool N/A OnClock U8 rank-3 tensor copied from the selected external endpoint into a local runtime Tensor before emission.
TestPatternOp -> external Tensor endpoint -> InterprocessSrcOp -> X11DisplayOp

Endpoint selection

The operator polls on an OnClock contract. During start() it initializes CUDA, creates a ChannelRuntime, attaches the selected endpoint and warms the other configured subscribers. During compute, a changed endpoint_index requests a new attachment. Not-ready or backpressured attachment is retried on a later clock activation. A closed endpoint signals the configured end-of-stream callback.

Build

Follow Holoscan RidgeRun Build and Installation for the module build and installation. The operator-specific include, target, and runtime requirements are listed below.

Include interprocess_src/interprocess_src.hpp and link holoscan::interprocess_src.

Example

The endpoint catalog is created by the application or deployment configuration. Endpoint names passed to the operator must already exist in that catalog and must have identical maximum Tensor rank and byte-span bounds:

auto source = graph.op<InterprocessSrcOp>(
    "source", catalog,
    std::vector<std::string>{"camera_a", "camera_b"},
    std::chrono::milliseconds{5}, end_of_stream, receiver_ready);
auto display = graph.op<X11DisplayOp>("display", width, height, "Interprocess");
graph.add_flow(source->output, display->input);

The receiver warms one subscriber for every configured endpoint before signaling receiver_ready. Subscribers are kept for the lifetime of the operator, so switching back to an endpoint reuses its cached subscriber and avoids creating a new channel service. The runtime-mutable parameter can be changed only when the graph compile options admit runtime parameter updates.


External runtime requirements
The sender, endpoint catalog, HoloMQ discovery/transport state and shared runtime directory must be available. Catalog entries must have bounded Tensor contracts and compatible bounds.


Source reference
You can find the source code at InterprocessSrcOp.


Related pages


Cookies help us deliver our services. By using our services, you agree to our use of cookies.