8
8
9
9
10
10
class Message :
11
- """A class representing a CANbus data frame"""
11
+ """A class representing a CANbus data frame
12
+
13
+ :param int id: The numeric ID of the message
14
+ :param bytes data: The content of the message, from 0 to 8 bytes of data
15
+ :param bool extended: True if the message has an extended identifier,
16
+ False if it has a standard identifier
17
+ """
12
18
13
19
# pylint:disable=too-many-arguments,invalid-name,redefined-builtin
14
20
def __init__ (self , id , data , extended = False ):
15
- """Create a `Message` to send
16
-
17
- :param int id: The numeric ID of the message
18
- :param bytes data: The content of the message, from 0 to 8 bytes of data
19
- :param bool extended: True if the message has an extended identifier,
20
- False if it has a standard identifier
21
- """
22
-
23
21
self ._data = None
24
22
self .id = id
25
23
self .data = data
@@ -53,17 +51,15 @@ def data(self, new_data):
53
51
54
52
55
53
class RemoteTransmissionRequest :
56
- """A class representing a CANbus remote frame"""
54
+ """A class representing a CANbus remote frame
57
55
58
- def __init__ (self , id : int , length : int , * , extended : bool = False ):
59
- """Construct a RemoteTransmissionRequest to send on a CAN bus
56
+ :param int id: The numeric ID of the message
57
+ :param length int: The length of the requested message
58
+ :param bool extended: True if the message has an extended identifier,
59
+ False if it has a standard identifier
60
+ """
60
61
61
- Args:
62
- :param int id: The numeric ID of the message
63
- :param length int: The length of the requested message
64
- :param bool extended: True if the message has an extended identifier,
65
- False if it has a standard identifier
66
- """
62
+ def __init__ (self , id : int , length : int , * , extended : bool = False ):
67
63
self .id = id
68
64
self .length = length
69
65
self .extended = extended
@@ -88,8 +84,8 @@ def __init__(self, id: int, length: int, *, extended: bool = False):
88
84
class Listener :
89
85
"""Listens for a CAN message
90
86
91
- canio.Listener is not constructed directly, but instead by calling the `listen` method of a \
92
- canio.CAN object.
87
+ canio.Listener is not constructed directly, but instead by calling the
88
+ ``listen`` method of a canio.CAN object.
93
89
"""
94
90
95
91
def __init__ (self , can_bus_obj , timeout = 1.0 ):
0 commit comments