EthListenerFactory

class mtf.network_port.bus_manager.EthListenerFactory

Factory class for creating Ethernet bus listeners based on Ethernet protocol type.

eth_listeners_factory: Dict[EthProtocolType | int, Type[ArpListener] | Type[DhcpListener] | Type[IgmpListener] | Type[EthNmController] | Type[PtpListener] | Type[SomeipListener] | Type[DoipListener] | Type[SomeipSDWatcher] | Type[EthBusListener]] = {144115188075855872: <class 'mtf.network_port.dhcp_listener.DhcpListener'>, <mtf_eth_protocol_type.ARP: 262144>: <class 'mtf.network_port.arp_listener.ArpListener'>, <mtf_eth_protocol_type.DOIP: 288230376151711744>: <class 'mtf.network_port.doip_listener.DoipListener'>, <mtf_eth_protocol_type.EthernetII: 1>: <class 'mtf.network_port.eth_bus_listener.EthBusListener'>, <mtf_eth_protocol_type.IGMP: 17179869184>: <class 'mtf.network_port.igmp_listener.IgmpListener'>, <mtf_eth_protocol_type.NM: 281474976710656>: <class 'mtf.network_port.nm_controller.EthNmController'>, <mtf_eth_protocol_type.PTP: 64>: <class 'mtf.network_port.ptp_listener.PtpListener'>, <mtf_eth_protocol_type.SOME_IP: 2251799813685248>: <class 'mtf.network_port.someip_controller.SomeipListener'>, <mtf_eth_protocol_type.SOME_IP_SD: 4503599627370496>: <class 'mtf.network_port.someip_sd_watcher.SomeipSDWatcher'>}

Factory lookup table.

classmethod get_eth_listener(protocol: EthProtocolType) Type[ArpListener] | Type[DhcpListener] | Type[IgmpListener] | Type[EthNmController] | Type[PtpListener] | Type[SomeipListener] | Type[DoipListener] | Type[SomeipSDWatcher] | Type[EthBusListener] | None

Get an Ethernet bus listener class based on Ethernet protocol type.

Parameters:

protocol – Enum value representing the Ethernet protocol type.