libera_utils.packet_configs.register_packet_config#

libera_utils.packet_configs.register_packet_config(cls: type[PacketConfiguration]) type[PacketConfiguration]#

Class decorator to register a PacketConfiguration subclass.

Instantiates the class and registers it in the global registry.

Parameters:

cls (type[PacketConfiguration]) – The PacketConfiguration subclass to register

Returns:

The same class (unchanged)

Return type:

type[PacketConfiguration]

Raises:

ValueError – If a configuration with the same APID is already registered