Lines Matching +full:- +full:optional
3 # SPDX-License-Identifier: Apache-2.0
6 Zephyr CAN shell module support for providing a python-can bus interface for testing.
11 from typing import Optional, Tuple
21 class CanShellBus(BusABC): # pylint: disable=abstract-method
27 can_filters: Optional[CanFilters] = None, **kwargs) -> None:
52 def _get_capabilities(self) -> list[str]:
64 def _set_mode(self, mode: str) -> None:
79 def send(self, msg: Message, timeout: Optional[float] = None) -> None:
83 cmd += ' -e' if msg.is_extended_id else ''
84 cmd += ' -r' if msg.is_remote_frame else ''
85 cmd += ' -f' if msg.is_fd else ''
86 cmd += ' -b' if msg.bitrate_switch else ''
111 def _add_filter(self, can_id: int, can_mask: int, extended: bool) -> None:
114 cmd += ' -e' if extended else ''
134 def _remove_filter(self, filter_id: int) -> None:
144 def _remove_all_filters(self) -> None:
149 def _apply_filters(self, filters: Optional[CanFilters]) -> None:
168 def _recv_internal(self, timeout: Optional[float]) -> Tuple[Optional[Message], bool]:
170 r'\s+(?P<brs>\S)(?P<esi>\S)\s+(?P<can_id>\d+)\s+\[(?P<dlc>\d+)\]\s*(?P<data>[a-z0-9 ]*)'
193 def shutdown(self) -> None: