For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Introduction
    • Overview
    • Relevant Technologies
    • Getting Started
  • Setup
    • SDK Installation
    • Additional Setup
    • Third Party Hardware Setup
  • Using the SDK
    • Holoscan Core
    • GPU Resident Execution
    • Holoscan by Example
    • Create an Application
    • Create a Distributed Application
    • Create an Operator
    • Create an Operator via Decorator
    • Create a Condition
    • Dynamic Flow Control
    • CUDA Stream Handling
    • Logging
    • Data Logging
    • Debugging
    • Python Operator Bindings
  • Operators
    • Operators and Extensions
    • Visualization
    • Inference
    • Testing
    • Video I/O Vendor Implementation Guide
  • Components
    • Schedulers
    • Conditions
    • Resources
    • Analytics
  • AI Skills
    • Ai Skills
  • API reference
          • Allocator
          • AnnotatedDoubleBufferReceiver
          • AnnotatedDoubleBufferTransmitter
          • AppDriver
          • Application
          • AppWorker
          • Arg
          • ArgList
          • ArgType
          • ArgumentSetter
          • AsyncBufferReceiver
          • AsyncBufferTransmitter
          • AsyncDataLoggerBackend
          • AsyncDataLoggerResource
          • AsynchronousCondition
          • BlockMemoryPool
          • BooleanCondition
          • CLIParser
          • Clock
          • ClockInterface
          • CodecRegistry
          • Component
          • ComponentBase
          • ComponentSpec
          • Condition
          • ConditionCombiner
          • Config
          • CountCondition
          • CPUResourceMonitor
          • CPUThread
          • CsvDataExporter
          • CudaAllocator
          • CudaBufferAvailableCondition
          • CudaContextScopedPush
          • CudaEventCondition
          • CudaFunctionLauncher
          • CudaGreenContext
          • CudaGreenContextPool
          • CudaObjectHandler
          • CudaStreamCondition
          • CudaStreamHandler
          • CudaStreamPool
          • DataExporter
          • DataFlowTracker
          • DataLogger
          • DataLoggerQueue
          • DataLoggerResource
          • DefaultFragmentService
          • DFFTCollector
          • DistributedAppService
          • DLManagedMemoryBufferVersioned
          • DoubleBufferReceiver
          • DoubleBufferTransmitter
          • DownstreamMessageAffordableCondition
          • Endpoint
          • EventBasedScheduler
          • ExecutionContext
          • Executor
          • ExpiringMessageAvailableCondition
          • ExtensionManager
          • FastDdsDiscovery
          • FastDdsEndpoint
          • FastDdsHoloscanEntityTypeSupport
          • FastDdsNativeBufferAdapter
          • FastDdsPubSubContext
          • FastDdsPubSubNetworkContext
          • FastDdsSerializer
          • FastDdsTransport
          • FileFIFOMutex
          • FirstFitAllocator
          • FirstFitAllocatorBase
          • FirstPixelOutCondition
          • FlowGraph
          • FlowGraphImpl
          • Fragment
          • FragmentAllocationStrategy
          • FragmentScheduler
          • FragmentService
          • FragmentServiceProvider
          • GPUDevice
          • GPUResidentDeck
          • GPUResidentExecutor
          • GPUResidentOperator
          • GPUResourceMonitor
          • GreedyFragmentAllocationStrategy
          • GreedyScheduler
          • GXFComponentResource
          • HoloEntitySerializerBase
          • HoloIpcCudaNativeBufferAdapterBase
          • HoloscanAsyncBufferReceiver
          • HoloscanAsyncBufferTransmitter
          • HoloscanLogger
          • HoloscanUcxReceiver
          • HoloscanUcxTransmitter
          • InMemoryPubSubNetworkContext
          • InMemoryPubSubSession
          • InputContext
          • IOSpec
          • LockFreeQueue
          • Logger
          • ManualClock
          • Map
          • MatXAllocator
          • MemoryAvailableCondition
          • Message
          • MessageAvailableCondition
          • MessageLabel
          • MetadataDictionary
          • MetaParameter
          • MultiMessageAvailableCondition
          • MultiMessageAvailableTimeoutCondition
          • MultiThreadScheduler
          • NativeBufferProtocolAdapter
          • NetworkContext
          • Nullable
          • Operator
          • OperatorSpec
          • OrConditionCombiner
          • OrderedQueue
          • OutputContext
          • ParameterWrapper
          • PathMetrics
          • PeriodicCondition
          • PoseTree
          • PoseTreeEdgeHistory
          • PoseTreeManager
          • PoseTreeUCXClient
          • PoseTreeUCXServer
          • PresentDoneCondition
          • PublisherAvailableCondition
          • PubSubContext
          • PubSubReceiver
          • PubSubTransmitter
          • RealtimeClock
          • Receiver
          • Resource
          • RMMAllocator
          • RuntimeError
          • Scheduler
          • ScopedFlock
          • ScopedWaitedFlock
          • SerializationBuffer
          • SessionDiscoveryFrontend
          • SessionTransportFrontend
          • SidecarDispatchQueue
          • SignalHandler
          • SO2
          • SO3
          • StdComponentSerializer
          • StdEntitySerializer
          • StdPubSubEntitySerializer
          • StreamOrderedAllocator
          • Subgraph
          • SubscriberAvailableCondition
          • SyntheticClock
          • SystemResourceManager
          • Tensor
          • TensorMap
          • ThreadPool
          • Timer
          • Topology
          • Transmitter
          • UcxComponentSerializer
          • UcxContext
          • UcxEntitySerializer
          • UcxHoloscanComponentSerializer
          • UcxReceiver
          • UcxSerializationBuffer
          • UcxTransmitter
          • UnboundedAllocator
  • Performance
    • Performance Considerations
    • Flow Tracking
    • GXF Job Statistics
    • Nsight Profiling
  • HoloHub
    • HoloHub Overview
  • FAQ
    • FAQ
NVIDIANVIDIA
Developer-friendly docs for your API
Privacy Policy | Your Privacy Choices | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA Corporation.

LogoLogoDocumentation
On this page
  • Constructors
  • CodecRegistry
  • Methods
  • get_codec
  • get_serializer
  • get_deserializer
  • name_to_index
  • index_to_name
  • add_codec
  • Static methods
  • get_instance
  • serialize
  • deserialize
  • Types
  • Typedefs
  • Member variables
API referenceC++ APIHoloscanClasses

holoscan::CodecRegistry

Beta
||View as Markdown|
Previous

holoscan::ClockInterface

Next

holoscan::Component

Class to set codecs for data types.

This class is used to set codecs (serializer + deserializer) for data types.

#include <holoscan/codec_registry.hpp>

Constructors

CodecRegistry

holoscan::CodecRegistry::CodecRegistry()holoscan::CodecRegistry::CodecRegistry()

Methods

get_codec

Get the codec function pair (with index)
Get the codec function pair (with codec name)
Codec & holoscan::CodecRegistry::get_codec(
const std::type_index &index
)

Get the codec function pair.

Returns: The reference to the Codec object.

Parameters

index
const std::type_index &

The type index of the parameter.

get_serializer

Get the serializer function (with codec name)
Get the serializer function (with index)
SerializeFunc & holoscan::CodecRegistry::get_serializer(
const std::string &codec_name
)

Get the serializer function.

Returns: The reference to the Serializer function.

Parameters

codec_name
const std::string &

The name of the codec.

get_deserializer

Get the deserializer function (with codec name)
Get the deserializer function (with index)
DeserializeFunc & holoscan::CodecRegistry::get_deserializer(
const std::string &codec_name
)

Get the deserializer function.

Returns: The reference to the Deserializer function.

Parameters

codec_name
const std::string &

The name of the codec.

name_to_index

expected<std::type_index, RuntimeError> holoscan::CodecRegistry::name_to_index(expected<std::type_index, RuntimeError> holoscan::CodecRegistry::name_to_index(
const std::string &codec_name
)

Get the std::type_index corresponding to a codec name.

Returns: The std::type_index corresponding to the name.

Parameters

codec_name
const std::string &

The name of the codec.

index_to_name

expected<std::string, RuntimeError> holoscan::CodecRegistry::index_to_name(expected<std::string, RuntimeError> holoscan::CodecRegistry::index_to_name(
const std::type_index &index
)

Get the codec name corresponding to a std::type_index.

Returns: The name of the codec.

Parameters

index
const std::type_index &

The std::type_index corresponding to the parameter.

add_codec

Add a codec for the type (with codec)
Add a codec for the type (with codec and index)
Add a codec for the type
template <typename typeT>
void holoscan::CodecRegistry::add_codec(
std::pair<SerializeFunc, DeserializeFunc> &codec,
const std::string &codec_name,
bool overwrite = true
)

Add a codec for the type.

Template parameters

typeT
typename

The type of the parameter.

Parameters

codec
std::pair<SerializeFunc, DeserializeFunc> &

A pair containing a serialization function and deserialization function.

codec_name
const std::string &

The name of the codec to add.

overwrite
boolDefaults to true

If true, any existing codec with matching codec_name will be overwritten.


Static methods

get_instance

static CodecRegistry & holoscan::CodecRegistry::get_instance()static CodecRegistry & holoscan::CodecRegistry::get_instance()

Get the instance object.

Returns: The reference to the CodecRegistry instance.

serialize

static expected<size_t, RuntimeError> holoscan::CodecRegistry::serialize(static expected<size_t, RuntimeError> holoscan::CodecRegistry::serialize(
const Message &message,
holoscan::Endpoint *endpoint
)

Serialize the message object.

Parameters

message
const Message &

The message to serialize.

endpoint
holoscan::Endpoint *

The serialization endpoint (buffer).

deserialize

template <typename typeT>
static expected<Message, RuntimeError> holoscan::CodecRegistry::deserialize(static expected<Message, RuntimeError> holoscan::CodecRegistry::deserialize(static expected<Message, RuntimeError> holoscan::CodecRegistry::deserialize(
holoscan::Endpoint *endpoint
)

Deserialize the message object.

Template parameters

typeT
typename

The data type within the message.

Parameters

endpoint
holoscan::Endpoint *

The serialization endpoint (buffer).


Types

Typedefs

NameDefinitionDescription
SerializeFuncstd::function< expected< size_t, RuntimeError >(const Message &, holoscan::Endpoint *)>Function type for serializing a data type.
DeserializeFuncstd::function< expected< Message, RuntimeError >(holoscan::Endpoint *)>Function type for deserializing a data type.
Codecstd::pair< SerializeFunc, DeserializeFunc >Function pair type for serialization and deserialization of a data type.

Member variables

NameTypeDescription
none_serialize staticSerializeFunc
none_deserialize staticDeserializeFunc
none_codec staticCodecDefault Codec for Arg.
index_to_name_map_std::unordered_map< std::type_index, std::string >Mapping from type_index to name.
name_to_index_map_std::unordered_map< std::string, std::type_index >Mapping from name to type_index.
codec_map_std::unordered_map< std::string, std::pair< SerializeFunc, DeserializeFunc > >Map of codec name to codec function pair.