NmManager

class mtf.network_port.nm_manager.NmManager

Network Management manager

__init__()
start_nm_controller(bus_name: str, node_id: int = 16, bus_type: BusType = BusType.CAN, cycle=0.01, frame_id: int = 0)

Start sending cyclically the NM frame.

Args:

bus_name (str): bus name node_id (int, optional): node identifier. Defaults to 0x10. bus_type (BusType, optional): bus type. It could be CAN, Ethernet, CANFD. Defaults to BusType.CAN. cycle (float, optional): sending cycle time. Defaults to 0.01. frame_id (int, optional): NM frame identifier. Defaults to 0x510.

Returns:

Boolean: True if the start cyclic send was started, else False.

stop_nm_controller(bus_name: str)

Stop sending the NM frame.

Args:

bus_name (str): the bus name

Returns:

Boolean: True if the send was stopped properly.Else False

stop_all()

Stop all the started NM controllers.

set_functional_pn(bus_name: str, payload: List[int])

Set Functional Partial Network

Args:

bus_name (str): bus name. payload (List[int]): signal value

Returns:

Boolean: True if signal value was set, else False

clean_up()

Clear all the created NM controllers.

Returns:

Boolean: True if cleanup done, else False

static __new__(cls, *args, **kwargs)

Initialize a new instance of the ControllerBase.

The instance will be automatically added to the list of controllers.

classmethod controllers_cleanup()

Clean up all controller instances.

Calls the clean_up() method for each instance.