Converter Module
- mtf.utils.converter.to_integer(_string: str) int
Convert string contains 0x or decimal value to int
- mtf.utils.converter.compute_msgID(flex_msgid: str) int
compute msgid flexray from string to int eg 55.3.4 -> 67305527
- mtf.utils.converter.ip_to_int(ip) int
Converts an IPv4 address to an integer.
- Args:
ip (str): IP address in string format.
- Returns:
int: Integer representation of the IP address.
- mtf.utils.converter.int_to_mac(mac_int) str
Converts an integer to a MAC address string.
- Args:
mac_int (int): Integer representation of the MAC address.
- Returns:
str: MAC address in string format.
- mtf.utils.converter.convert_frame_id(frame_id: str | int) int
Converts a frame ID from either a string or integer format to an integer.
- Args:
frame_id (Union[str, int]): The frame ID to convert. It can be provided as a string or an integer.
- Returns:
int: The converted frame ID as an integer.
- Raises:
ValueError: If the frame ID is invalid or cannot be converted.
- mtf.utils.converter.list_to_queue(input_list)