Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions can/interfaces/socketcan/socketcan.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# coding: utf-8

"""
The main module of the socketcan interface containing most user-facing classes and methods
along some internal methods.

At the end of the file the usage of the internal methods is shown.
"""

import logging
import ctypes
import ctypes.util
Expand Down Expand Up @@ -726,15 +733,14 @@ def _detect_available_configs():


if __name__ == "__main__":
# TODO move below to examples?

# Create two sockets on vcan0 to test send and receive
# This example demonstrates how to use the internal methods of this module.
# It creates two sockets on vcan0 to test sending and receiving.
#
# If you want to try it out you can do the following (possibly using sudo):
#
# modprobe vcan
# ip link add dev vcan0 type vcan
# ifconfig vcan0 up
# ip link set vcan0 up
#
log.setLevel(logging.DEBUG)

Expand Down