register_rm_system

passengersim.rm.systems.register_rm_system(rm_system: type[RmSys]) type[RmSys][source]

Register an RM system class.

This can be used as a decorator on an RmSys subclass. By default, the name used for registration is the class name, unless the class defines a class variable _name, in which case that is used instead. The registered RM system can then be retrieved by name using get_registered_rm_system(name). You can also use registered RM systems by name in configuration files, to attach them to carriers.

Parameters:
rm_system : type[RmSys]

The RM system class to register.

Returns:

type[RmSys] – The same RM system class that was registered. This makes it possible to use this function as a decorator to register RM system but otherwise act transparently.