File: __init__.py

package info (click to toggle)
python-can 4.6.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,428 kB
  • sloc: python: 27,154; makefile: 32; sh: 16
file content (133 lines) | stat: -rw-r--r-- 2,951 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
"""
The ``can`` package provides controller area network support for
Python developers; providing common abstractions to
different hardware devices, and a suite of utilities for sending and receiving
messages on a can bus.
"""

import contextlib
import logging
from importlib.metadata import PackageNotFoundError, version
from typing import Any

__all__ = [
    "VALID_INTERFACES",
    "ASCReader",
    "ASCWriter",
    "AsyncBufferedReader",
    "BLFReader",
    "BLFWriter",
    "BitTiming",
    "BitTimingFd",
    "BufferedReader",
    "Bus",
    "BusABC",
    "BusState",
    "CSVReader",
    "CSVWriter",
    "CanError",
    "CanInitializationError",
    "CanInterfaceNotImplementedError",
    "CanOperationError",
    "CanProtocol",
    "CanTimeoutError",
    "CanutilsLogReader",
    "CanutilsLogWriter",
    "CyclicSendTaskABC",
    "LimitedDurationCyclicSendTaskABC",
    "Listener",
    "LogReader",
    "Logger",
    "MF4Reader",
    "MF4Writer",
    "Message",
    "MessageSync",
    "ModifiableCyclicTaskABC",
    "Notifier",
    "Printer",
    "RedirectReader",
    "RestartableCyclicTaskABC",
    "SizedRotatingLogger",
    "SqliteReader",
    "SqliteWriter",
    "TRCFileVersion",
    "TRCReader",
    "TRCWriter",
    "ThreadSafeBus",
    "bit_timing",
    "broadcastmanager",
    "bus",
    "ctypesutil",
    "detect_available_configs",
    "exceptions",
    "interface",
    "interfaces",
    "io",
    "listener",
    "log",
    "logconvert",
    "logger",
    "message",
    "notifier",
    "player",
    "set_logging_level",
    "thread_safe_bus",
    "typechecking",
    "util",
    "viewer",
]

from . import typechecking  # isort:skip
from . import util  # isort:skip
from . import broadcastmanager, interface
from .bit_timing import BitTiming, BitTimingFd
from .broadcastmanager import (
    CyclicSendTaskABC,
    LimitedDurationCyclicSendTaskABC,
    ModifiableCyclicTaskABC,
    RestartableCyclicTaskABC,
)
from .bus import BusABC, BusState, CanProtocol
from .exceptions import (
    CanError,
    CanInitializationError,
    CanInterfaceNotImplementedError,
    CanOperationError,
    CanTimeoutError,
)
from .interface import Bus, detect_available_configs
from .interfaces import VALID_INTERFACES
from .io import (
    ASCReader,
    ASCWriter,
    BLFReader,
    BLFWriter,
    CanutilsLogReader,
    CanutilsLogWriter,
    CSVReader,
    CSVWriter,
    Logger,
    LogReader,
    MessageSync,
    MF4Reader,
    MF4Writer,
    Printer,
    SizedRotatingLogger,
    SqliteReader,
    SqliteWriter,
    TRCFileVersion,
    TRCReader,
    TRCWriter,
)
from .listener import AsyncBufferedReader, BufferedReader, Listener, RedirectReader
from .message import Message
from .notifier import Notifier
from .thread_safe_bus import ThreadSafeBus
from .util import set_logging_level

with contextlib.suppress(PackageNotFoundError):
    __version__ = version("python-can")

log = logging.getLogger("can")

rc: dict[str, Any] = {}