LinSlavesManager
- class mtf.network_port.lin_slaves_manager.LinSlavesManager
LIN master slave simulation manager
- __init__()
- slave(channel_name, nad) LinSlaveSimulation
Creates a slave object for each couple channel_name, NAD
- Args:
channel_name (str): LIN channel name nad (int): master Node Address
- Returns:
LinSlaveSimulation: class object
- clean_up_simulation(channel_name, nad)
- clean_up()
Cleans up the controller instance.
This method should be overridden to provide the specific cleanup logic. If an instance does not override it,a default message is shown to indicate that no cleanup logic is implemented.
- Returns:
bool: True on success, False otherwise.
Note:
Important
This method must be overridden to implement the proper clean-up process for the respective instance/subclass.
- static __new__(cls, *args, **kwargs)
Creates a new instance.
- Args:
*args: The variable arguments list. **wargs: The keyword arguments list.
- Returns:
ControllersBase: The newly created instance.
Note:
Note
The instance will be automatically added to the list of controllers to be cleaned up later. It guarantees that all the controller instances are followed up and cleaned up when the associate method ‘controllers_cleanup(cls)’ is called.
Important
Do not override this method in subclasses to maintain this functionality.
- classmethod controllers_cleanup()
Cleans up all controller instances.
It calls clean_up() for each controller in the list. If a cleanup fails, an error is raised, but the method continues processing the remaining controllers.
- Returns:
- bool: True indicating that all controllers were cleaned up successfully.
Otherwise, False is returned when an error occurs during the cleanup process.