GroupBase.get_next_idx#

GroupBase.get_next_idx(idx=None, model_name=None)[source]#

Get a no-conflict idx for a new device. Use the provided idx if no conflict. Generate a new one otherwise.

Parameters:
idxstr or None

Proposed idx. If None, assign a new one.

model_namestr or None

Model name. If not, prepend the group name.

Returns:
str

New device name.