Skip to content

Commit 64131db

Browse files
Update some docs
1 parent a28ef27 commit 64131db

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

doc/network.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ Call the :meth:`~canopen.Network.connect` method to start the communication, opt
2626
arguments passed to a the :class:`can.BusABC` constructor::
2727

2828
network.connect(channel='can0', bustype='socketcan')
29+
# network.connect(bustype='kvaser', channel=0, bitrate=250000)
30+
# network.connect(bustype='pcan', channel='PCAN_USBBUS1', bitrate=250000)
31+
# network.connect(bustype='ixxat', channel=0, bitrate=250000)
32+
# network.connect(bustype='nican', channel='CAN0', bitrate=250000)
2933

3034
Add nodes to the network using the :meth:`~canopen.Network.add_node` method::
3135

@@ -37,7 +41,7 @@ Nodes can also be accessed using the ``Network`` object as a Python dictionary::
3741
print(network[node_id])
3842

3943
To automatically detect which nodes are present on the network, there is the
40-
:attr:`canopen.Network.scanner` available for this purpose::
44+
:attr:`~canopen.Network.scanner` attribute available for this purpose::
4145

4246
# This will attempt to read an SDO from nodes 1 - 127
4347
network.scanner.search()
@@ -133,7 +137,6 @@ API
133137

134138

135139
.. autoclass:: canopen.network.NodeScanner
136-
:show-inheritance:
137140
:members:
138141

139142

doc/nmt.rst

+9-3
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,20 @@ Examples
2727
--------
2828

2929
Access the NMT functionality using the :attr:`canopen.Node.nmt` attribute.
30-
Changing state can be done using the ``.state`` attribute::
30+
Changing state can be done using the :attr:`~canopen.nmt.NmtMaster.state`
31+
attribute::
3132

3233
node.nmt.state = 'OPERATIONAL'
3334
# Same as sending NMT start
3435
node.nmt.send_command(0x1)
3536

36-
If the node transmits heartbeat messages, the ``.state`` attribute gets
37-
automatically updated with current state::
37+
You can also change state of all nodes simulaneously as a broadcast message::
38+
39+
network.nmt.state = 'OPERATIONAL'
40+
41+
If the node transmits heartbeat messages, the
42+
:attr:`~canopen.nmt.NmtMaster.state` attribute gets automatically updated with
43+
current state::
3844

3945
# Send NMT start to all nodes
4046
network.send_message(0x0, [0x1, 0])

0 commit comments

Comments
 (0)