Class GXFOutputContext

class GXFOutputContext : public holoscan::OutputContext

Class to hold the output context for a GXF Operator.

This class provides the interface to send data to the output ports of the operator using GXF.

Public Functions

GXFOutputContext(gxf_context_t context, Operator *op)

Construct a new GXFOutputContext object.

Parameters
  • context – The pointer to the GXF context.

  • op – The pointer to the GXFOperator object.

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

Construct a new GXFOutputContext object.

Parameters
  • context – The pointer to the GXF context.

  • op – The pointer to the GXFOperator object.

  • outputs – outputs The references to the map of the output specs.

inline gxf_context_t gxf_context() const

Get GXF context.

Returns

The pointer to the GXF context.

Protected Functions

virtual void emit_impl(std::any data, const char *name = nullptr, OutputType out_type = OutputType::kSharedPointer) override

The implementation of the emit method.

Depending on the type of the data, this method wraps the data with a message and sends it to the output port with the given name.

Parameters
  • data – The data to send.

  • name – The name of the output port.

  • out_type – The type of the message data.

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