Mtf Busses Module
mtf_busses is a submodule of ‘mtf_pybinder’
- class mtf.libs.mtf_pybinder.mtf_busses.PlaybackConfig
- __init__(self: mtf.libs.mtf_pybinder.mtf_busses.PlaybackConfig) None
- __new__(**kwargs)
- property default_max_events_after_trigger_per_interface
Default post-trigger event limit per interface (0 = unlimited)
- property include_trigger_frame
true = inject trigger frame, false = skip it
- property interfaces_id_channel_name_mapping
Dict[int, str]: Mapping from TECMP Interface ID to channel name
- property io_relative_change_threshold_percent
Only emit IO value if it changed by at least this percentage
- property max_events_after_trigger_per_interface
Dict[int, int]: post-trigger event limits per TECMP Interface ID
- property max_seconds_after_trigger
If > 0, stop injecting after this many seconds from trigger
- property realtime
If true, respect timestamps. If false, play as fast as possible
- property trigger_can_id
optional: CAN ID to wait for
- property trigger_channel
optional: 0 = any channel
- property trigger_payload
payload pattern
- property trigger_payload_mask
optional: 1 bits = compare, 0 bits = don’t care
- property use_trigger
- property use_trigger_payload
if true, also check payload for trigger
- class mtf.libs.mtf_pybinder.mtf_busses.TracePlayback
- __init__(self: mtf.libs.mtf_pybinder.mtf_busses.TracePlayback) None
- __new__(**kwargs)
- configure(self: mtf.libs.mtf_pybinder.mtf_busses.TracePlayback, pcap_file_path: list[str], config: mtf::pybinder::PlaybackConfig) bool
Configure the trace playback.
Parameters
- pcap_file_pathstr
Path to the PCAP file.
- configPlaybackConfig
Playback configuration (e.g. realtime or fast-as-possible).
- is_finished(self: mtf.libs.mtf_pybinder.mtf_busses.TracePlayback) bool
Return True if file replay has finished (end-of-file or stopped)
- is_running(self: mtf.libs.mtf_pybinder.mtf_busses.TracePlayback) bool
Return True if playback is currently running
- start(self: mtf.libs.mtf_pybinder.mtf_busses.TracePlayback) None
Start playback from the beginning
- stop(self: mtf.libs.mtf_pybinder.mtf_busses.TracePlayback) None
Stop playback and reset to beginning
- wait_until_done(self: mtf.libs.mtf_pybinder.mtf_busses.TracePlayback) None
Block until file replay has finished
- wait_until_trigger(self: mtf.libs.mtf_pybinder.mtf_busses.TracePlayback, timeout_seconds: float) bool
Block until the configured trigger frame is observed or the timeout elapses. Returns True if the trigger was observed, False on timeout or if playback finishes first.
- mtf.libs.mtf_pybinder.mtf_busses.check_if_bus_is_available(channel_name: str) bool
Check If Bus Is Available
- mtf.libs.mtf_pybinder.mtf_busses.get_all_available_busses() list[str]
Get All Available Busses
- mtf.libs.mtf_pybinder.mtf_busses.get_all_available_busses_with_properties() dict[str, dict[str, list[str | int | float]]]
Get List of All Available Buses with propreties
- mtf.libs.mtf_pybinder.mtf_busses.get_all_available_channels_with_properties() dict[str, dict[str, list[str | int | float]]]
Get List of All Available Channels with propreties
- mtf.libs.mtf_pybinder.mtf_busses.get_eth_channel_interface_name(arg0: str) str
Get the interface name associated with the given ethernet channel
- mtf.libs.mtf_pybinder.mtf_busses.get_tracer_properties(arg0: str) dict[str, str]
Get List of tracer propreties
- mtf.libs.mtf_pybinder.mtf_busses.replay_pcap_file(arg0: str, arg1: str) bool
Replay pcap file over the specified channel