NVIDIA Holoscan SDK v0.4.0
Clara Holoscan v0.4.0

Class GXFInputContext

class GXFInputContext : public holoscan::InputContext

Class to hold the input context for a GXF Operator.

This class provides the interface to receive the input data from the operator using GXF.

Public Functions

GXFInputContext(gxf_context_t context, Operator *op)

Construct a new GXFInputContext object.

Parameters
  • context – The pointer to the GXF context.

  • op – The pointer to the GXFOperator object.

inline GXFInputContext(gxf_context_t context, Operator *op, std::unordered_map<std::string, std::unique_ptr<IOSpec>> &inputs)

Construct a new GXFInputContext object.

Parameters
  • context – The pointer to the GXF context.

  • op – The pointer to the GXFOperator object.

  • inputs – inputs The references to the map of the input specs.

inline gxf_context_t gxf_context() const

Get GXF context.

Returns

The pointer to the GXF context.

Protected Functions

virtual std::any receive_impl(const char *name = nullptr, bool no_error_message = false) override

The implementation of the receive method.

Depending on the type of the data, this method receives a message from the input port with the given name.

Parameters
  • name – The name of the input port.

  • no_error_message – Whether to print an error message when the input port is not found.

Returns

The data received from the input port.

© Copyright 2022, NVIDIA. Last updated on Jun 28, 2023.