BusTransmitterFactory

class mtf.network_port.bus_manager.BusTransmitterFactory

Factory class for creating bus transmitters based on bus type.

transmitters_factory: Dict[BusType, Type[CanFdTransmitter] | Type[CanTransmitter] | Type[LinTransmitter] | Type[FlexrayTransmitter] | Type[EthernetTransmitter]] = {BusType.CAN: <class 'mtf.network_port.bus_transmitter.CanTransmitter'>, BusType.CANFD: <class 'mtf.network_port.bus_transmitter.CanFdTransmitter'>, BusType.LIN: <class 'mtf.network_port.bus_transmitter.LinTransmitter'>, BusType.FLEXRAY: <class 'mtf.network_port.bus_transmitter.FlexrayTransmitter'>, BusType.ETHERNET: <class 'mtf.network_port.bus_transmitter.EthernetTransmitter'>}

Factory lookup table

classmethod get_transmitter(bus_type: BusType) Type[CanFdTransmitter] | Type[CanTransmitter] | Type[LinTransmitter] | Type[FlexrayTransmitter] | Type[EthernetTransmitter] | None

Get a bus transmitter class based on bus type.

Parameters:

bus_type – BusType enum value representing the type of the bus.