Skip to content

Merge develop into master for release 2.2.0 #344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 181 commits into from
Jul 3, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
a43d322
Handle error frame messages in CanutilsLogWriter and CanutilsLogReader.
felixdivo Feb 11, 2018
7af1021
Fix issues in USB2CAN with Python3
hardbyte Feb 17, 2018
8e30e60
Support error frame messages in ASCWriter and ASCReader.
felixdivo Feb 11, 2018
d8942ce
Use configured bitrate in pcan. Closes #196
felixdivo Feb 11, 2018
e9579ce
Merge pull request #257 from hardbyte/release-2.1.0
hardbyte Feb 18, 2018
1cb8ebc
Update version to "2.1.1-dev"
hardbyte Feb 18, 2018
8fe1b5a
general cleanups of the main modules
felixdivo Feb 20, 2018
cdc88cb
general cleanup of the can/io/* modules
felixdivo Feb 20, 2018
102be0d
general cleanup of the can/interfaces/ modules (not yes the ones in c…
felixdivo Feb 20, 2018
23d928e
general cleanup of the can/interfaces/*/* modules
felixdivo Feb 20, 2018
78e4834
general cleanup of the tests
felixdivo Feb 20, 2018
fab6f23
general cleanup of the examples
felixdivo Feb 20, 2018
434aa04
general cleanup of misc files & closing opened file in setup.py
felixdivo Feb 20, 2018
1fbc398
removed unused file in kvaser interface
felixdivo Feb 21, 2018
ea8e107
better send_one example
felixdivo Feb 21, 2018
cd00388
Handle error frame messages in CanutilsLogWriter and CanutilsLogReader.
felixdivo Feb 11, 2018
0c5bfb8
Merge branch 'fix-217' of github.com:hardbyte/python-can into fix-217
felixdivo Feb 22, 2018
0127683
small changes in can/io/log.py
felixdivo Feb 22, 2018
40d63c9
make ASCWriter's output consistent with the other loggers
felixdivo Feb 22, 2018
0a6f9e5
more info about building the docs with Sphinx
felixdivo Feb 22, 2018
eb4f866
removed unnessesary call to abs() in SqliteReader
felixdivo Feb 22, 2018
4a17a5f
renamed example file
felixdivo Feb 23, 2018
b0b4a75
added small TODO in sqlite.py
felixdivo Feb 23, 2018
cc06901
Vector: Reduce CPU usage by using Win32 events
christiansandberg Nov 18, 2017
190f949
Add note in documentation about pywin32
christiansandberg Feb 20, 2018
782c2ab
simpler usage of abc.*
felixdivo Feb 23, 2018
0bdd978
fix inport in util.py
felixdivo Feb 23, 2018
72cc66c
structural changes to setup.py & added 'Deprecated' library
felixdivo Feb 22, 2018
a2127da
@deprecated the name SqlReader
felixdivo Feb 22, 2018
be39d1c
removed the version attribute from the deprecated decorator
felixdivo Feb 22, 2018
071152c
fix wrong method call
felixdivo Feb 22, 2018
67a71fc
try to enable useful tests with appveyor
felixdivo Feb 22, 2018
6f1d739
try simplifying .appveyor.yml
felixdivo Feb 22, 2018
e9aec8d
factored out common Travis skipping behaviour and replaced it with ge…
felixdivo Feb 23, 2018
5e0acf5
add appveyor badge to README.md
felixdivo Feb 23, 2018
347fb18
fix problem from another branch so we can test here
felixdivo Feb 23, 2018
4cdea04
fix absolute imports
felixdivo Feb 23, 2018
07be6b5
warn about usage of the old CAN module. fix #267
felixdivo Feb 23, 2018
e4569c4
completely remove SqlReader. closes #263
felixdivo Feb 24, 2018
1c6da93
various improvments (e.g. docs) and added CSVReader as a placeholder
felixdivo Feb 23, 2018
f6ba6b5
added CSVReader
felixdivo Feb 23, 2018
bcc6164
added tests for the CSVReader & CSVWriter pair
felixdivo Feb 23, 2018
2eae299
fix a rounding problem in CSVWriter
felixdivo Feb 23, 2018
bd09a72
described the CSV format
felixdivo Feb 23, 2018
6cb060a
removed problematic import of removed library
felixdivo Feb 24, 2018
fbaa310
Merge branch 'develop' of github.com:hardbyte/python-can into develop
felixdivo Feb 24, 2018
1a34e01
Update README.rst
felixdivo Feb 26, 2018
088423d
factored out some common import functionality
felixdivo Mar 2, 2018
828b10f
cleaning up interface.py
felixdivo Mar 6, 2018
405d569
make class Bus in interface.py extend BusABC (IDEs can now see the at…
felixdivo Mar 6, 2018
e3c5910
changed BusABC to allow for software filtering and added documentation
felixdivo Mar 6, 2018
a5208dd
fix proposed changes in PR
felixdivo Mar 8, 2018
d829915
allow older implementations of BusABC.revc() to continue working
felixdivo Mar 8, 2018
6a4aa5b
remove unused call to BusABC.flush_tx_buffer()
felixdivo Mar 8, 2018
288c8b1
add some unit testing for BusABC._matches_filters()
felixdivo Mar 10, 2018
76dd141
applied requested changes from code review
felixdivo Mar 15, 2018
f72f2ad
Handle error frame messages in CanutilsLogWriter and CanutilsLogReader.
felixdivo Feb 11, 2018
472b0c7
small changes in can/io/log.py
felixdivo Feb 22, 2018
53abda4
make ASCWriter's output consistent with the other loggers
felixdivo Feb 22, 2018
b4fed47
applied requested changes from code review
felixdivo Mar 15, 2018
48ad0fc
Merge branch 'fix-217' of github.com:hardbyte/python-can into fix-217
felixdivo Mar 15, 2018
1051f1e
Added proof-of-concept testing of SocketCAN on Travis CI & Smaller ch…
felixdivo Mar 16, 2018
9db2b27
can.Notifier enhancements (#266)
felixdivo Mar 16, 2018
db63418
Remove `load_default_settings` call in init
pierreluctg Mar 5, 2018
79d8d38
changed CanutilsLogWriter and ASCWriter to behave more similar
felixdivo Mar 17, 2018
d1a6b16
small fixes
felixdivo Mar 17, 2018
58e9f51
Support using the Windows IXXAT driver in Cygwin
Mar 22, 2018
f73f850
Adding bitrate settings for neoVI interface
pierreluctg Mar 23, 2018
deb50be
Updated PCAN interface
edobez Mar 16, 2018
a4f420d
adjusted the ASC test cases to check only rounded timestamps
felixdivo Apr 2, 2018
0b9be03
unified the code in and corrected the ASCWriter class
felixdivo Apr 2, 2018
8f526c5
small corrections
felixdivo Apr 2, 2018
73889eb
Merge pull request #255 from hardbyte/fix-217
felixdivo Apr 8, 2018
afcc678
BLF and ASC log file fixes (#291)
christiansandberg Apr 10, 2018
6dbf15b
ixxat & cygwin: Fix issue where exceptions in driver functions were i…
Mar 28, 2018
723a487
Fix opening ixxat by hardware id on x64 by being explicit about struc…
Mar 28, 2018
40f660c
Fix SocketCAN version selection, many crashes and re-enable tests (#293)
felixdivo Apr 17, 2018
cac8283
added file that are generated by tests to the ignore list
felixdivo Apr 10, 2018
9cccc61
removed the executable flag from test/listener_test.py
felixdivo Apr 10, 2018
d26e035
add nice error handler & tests & added IS_UNIX flag in conifg
felixdivo Apr 10, 2018
9c73316
patched the send/write methods of both socketcan interfaces, the now …
felixdivo Apr 10, 2018
b97a502
fix log levels of socketcan library loading errors
felixdivo Apr 27, 2018
a973d73
Merge branch 'develop' into software-filtering
felixdivo Apr 27, 2018
ddfac97
Feature: API for automatic configuration detection (#278)
felixdivo May 14, 2018
92037c4
Merge branch 'develop' into software-filtering
felixdivo May 14, 2018
f097d93
more docs
felixdivo May 14, 2018
90a823b
more docs
felixdivo May 14, 2018
3e12e3c
added very basic test for message filtering
felixdivo May 14, 2018
a831e48
fix import
felixdivo May 14, 2018
ed1ba8b
switch virtaul interface to new receive method
felixdivo May 14, 2018
805159f
added _recv_internal for kvaser interface
felixdivo May 14, 2018
20518c2
add _receive_internal to socketcan native & ctypes
felixdivo May 14, 2018
ba3d3cb
added _recv_internal for PCAN
felixdivo May 14, 2018
8c590a8
fix for test & better method signatures
felixdivo May 14, 2018
3abbdd7
add timeouts to CI tests
felixdivo May 15, 2018
f1e3c75
remove wrong config fom .appveyor.yml
felixdivo May 15, 2018
0a75a94
fix correct call to _apply_filters
felixdivo May 15, 2018
a7df72a
add fix for parameter name
felixdivo May 15, 2018
30b4157
docs
felixdivo May 15, 2018
e8c6711
docs
felixdivo May 15, 2018
73b3fac
change Vector backend to use new methods
felixdivo May 15, 2018
2f48950
docs
felixdivo May 15, 2018
567fb2e
added new bus methods for neovi interface
felixdivo May 15, 2018
b3df2d7
removed problemativ command line argument on AppVeyor
felixdivo May 16, 2018
f1d0a5e
better error handling in socketcan and correct filtering for native one
felixdivo May 16, 2018
43258be
fixes for PCAN
felixdivo May 16, 2018
2a71dfe
new methods for usb2can
felixdivo May 16, 2018
79f2c4c
added new mthods to slcan
felixdivo May 16, 2018
dec258e
small fixes
felixdivo May 16, 2018
d61c744
new methods for nican backend
felixdivo May 16, 2018
c7607df
better imports in IXXAT
felixdivo May 16, 2018
ab4b3a0
new methods for IXXAT interface
felixdivo May 16, 2018
0b6d3ca
new methods for iscan
felixdivo May 16, 2018
0bb21e6
bugfixes, simplifications, optimizations & new methods for serial can
felixdivo May 16, 2018
f5ea870
small fix for IXXAT import on Python 2
felixdivo May 16, 2018
64e8e66
Add a possibility to use LISTEN ONLY for the CAN Hardware. (#235)
mgiaco May 22, 2018
947363b
Merge branch 'develop' into software-filtering
felixdivo May 22, 2018
188a439
add initial version of CAN FD support for Vector
AntonioCohimbra May 18, 2018
f588b1b
add initial version of CAN FD support for Vector
AntonioCohimbra May 18, 2018
de59ce5
add review changes
AntonioCohimbra May 23, 2018
86aabcd
various cleanups an removed some rotten code
felixdivo May 27, 2018
e1e6931
small doc fixes
felixdivo May 27, 2018
51eae1c
added "Creating a new interface/backend" section to the documentation…
felixdivo May 27, 2018
b1d1f4f
better development docs
felixdivo May 27, 2018
3490c25
documented the removal of the functional API for send_periodic
felixdivo May 27, 2018
6a527fb
moved some docs of the BusABC to the development section
felixdivo May 27, 2018
9c4e10a
Merge branch 'develop' into software-filtering
felixdivo May 27, 2018
220bd28
fix some imports in can.io.*
felixdivo May 27, 2018
4ba482f
Merge pull request #277 from hardbyte/software-filtering
felixdivo May 28, 2018
6ebe610
cleanups, fixes & docs in Bus.__new__() and util.load_config() (#309)
felixdivo May 28, 2018
909a7d2
Merge branch 'develop' into code-cleanups
felixdivo May 28, 2018
e48ca4e
Merge pull request #312 from hardbyte/code-cleanups
felixdivo May 28, 2018
9f354d0
Add a general timeout for tests (#313)
felixdivo May 28, 2018
00f36d1
added a ThreadSafeBus based on the wrapt library
felixdivo May 28, 2018
e937083
add TheradSafeBus to root __init__.py
felixdivo May 28, 2018
62ecb4e
added tests for ThreadSafeBus
felixdivo May 28, 2018
cd147dc
try to fix constructor of ThreadSafeBus
felixdivo May 28, 2018
1b8414e
try to use metaclasses correctly
felixdivo May 28, 2018
7b1f5c2
explicitly require pytest
felixdivo May 28, 2018
b66c610
attempt to fix metaclass in ThreadSafeBus
felixdivo May 28, 2018
458e054
removed BusABC from ThreadSafeBus parent class
felixdivo May 28, 2018
b1761d5
doc
felixdivo May 28, 2018
bd6c5d6
added documentation
felixdivo May 30, 2018
7b1026d
Feature: Context manager (#283)
edobez Jun 4, 2018
3da5bd9
cleanups of context manager tests
felixdivo Jun 4, 2018
51e8c4f
Fix possible problems in Bus constructor (#319)
felixdivo Jun 4, 2018
6b8a9b4
Add support for new BLF files (#316)
christiansandberg Jun 5, 2018
09754ef
Build wheels compatible with py2 and py3
christiansandberg Jun 6, 2018
78368f3
fix proposed doc chnages
felixdivo Jun 6, 2018
c82eea6
remove setuptools dependency
felixdivo Jun 6, 2018
efa99dc
debugging commit for CI server
felixdivo Jun 6, 2018
b68afa4
removed the subprocess32 dependency
felixdivo Jun 6, 2018
fdd5d2a
fix typo in test file name
felixdivo Jun 6, 2018
976276f
debugging commit
felixdivo Jun 6, 2018
06bc2a1
undo last debugging commit
felixdivo Jun 6, 2018
2809518
Add support for Kvaser config detection (#321)
christiansandberg Jun 7, 2018
f3cae06
renamed socketcan helpers test
felixdivo Jun 8, 2018
26ffd06
documentation improvements
felixdivo Jun 8, 2018
db0b20c
corrected unit test
felixdivo Jun 8, 2018
3737bb3
fix unit test #2
felixdivo Jun 8, 2018
0142bb8
fix unit test #3
felixdivo Jun 8, 2018
fbf0594
Removed Python 3.3 CI testing (#322)
felixdivo Jun 9, 2018
3e4b93c
SocketCAN (native) cyclic improvements (#323)
christiansandberg Jun 12, 2018
bb3b117
Merge pull request #315 from hardbyte/feature-synchronized-bus
felixdivo Jun 13, 2018
e6d9e76
Setting _filters to None when filter Iterator is empty (#325)
pierreluctg Jun 13, 2018
022cb48
Adding detect_available_configs support to neovi (#327)
pierreluctg Jun 14, 2018
cc3f5f7
Adding proper bitrate and timestamp support for neovi (#324)
pierreluctg Jun 14, 2018
920a384
Adding NeoVi interface information in history (#329)
pierreluctg Jun 15, 2018
b865a93
Fix 328: Allow more than one filter for vector (#330)
AntonioCohimbra Jun 18, 2018
100ebca
Fix shadowing built-in name "filter"
pierreluctg Jun 20, 2018
dfae0bb
Fixing inconsistent indentation (use of a mixture of tabs and spaces)
pierreluctg Jun 20, 2018
60391e6
Fixing mismatched parameters in a docstring (#334)
pierreluctg Jun 22, 2018
1bdfc56
Stop raising accuracy error for NeoVi (#336)
pierreluctg Jun 25, 2018
b2c03b2
Make can importable without wrapt
christiansandberg Jun 24, 2018
c4752b2
Improved channel handling (#332)
christiansandberg Jun 25, 2018
405ca77
Exclude test package in distribution
christiansandberg Jun 25, 2018
614bb04
Bump version to 2.2.0-dev
christiansandberg Jun 25, 2018
66540e3
Merge socketcan_native and socketcan_ctypes into one (#326)
christiansandberg Jun 26, 2018
85e1274
Feature travis to build sphinx docs (#342)
hardbyte Jun 29, 2018
c61d5c7
Bump version to 2.2.0-rc.1
hardbyte Jun 29, 2018
49eb730
Add changelog highlights and set version to 2.2.0
hardbyte Jun 30, 2018
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
Prev Previous commit
Next Next commit
general cleanup of the can/interfaces/ modules (not yes the ones in c…
…hild folders)
  • Loading branch information
felixdivo committed Feb 22, 2018
commit 102be0d5e7877ee61f95b5cb323e6e9c3e432145
6 changes: 4 additions & 2 deletions can/interfaces/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# -*- coding: utf-8 -*-
#!/usr/bin/env python
# coding: utf-8

"""
Interfaces contain low level implementations that interact with CAN hardware.
"""

from pkg_resources import iter_entry_points

VALID_INTERFACES = set(['kvaser', 'serial', 'pcan', 'socketcan_native',
'socketcan_ctypes', 'socketcan', 'usb2can', 'ixxat',
'nican', 'iscan', 'vector', 'virtual', 'neovi',
'slcan'])


VALID_INTERFACES.update(set([
interface.name for interface in iter_entry_points('python_can.interface')
]))
Empty file removed can/interfaces/interface.py
Empty file.
12 changes: 8 additions & 4 deletions can/interfaces/iscan.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
#!/usr/bin/env python
# coding: utf-8

"""
Interface for isCAN from Thorsis Technologies GmbH, former ifak system GmbH.
"""

import ctypes
import time
import logging

from can import CanError, BusABC, Message


logger = logging.getLogger(__name__)

CanData = ctypes.c_ubyte * 8


class MessageExStruct(ctypes.Structure):
_fields_ = [
("message_id", ctypes.c_ulong),
Expand Down Expand Up @@ -148,11 +152,11 @@ class IscanError(CanError):

def __init__(self, function, error_code, arguments):
super(IscanError, self).__init__()
#: Status code
# Status code
self.error_code = error_code
#: Function that failed
# Function that failed
self.function = function
#: Arguments passed to function
# Arguments passed to function
self.arguments = arguments

def __str__(self):
Expand Down
48 changes: 26 additions & 22 deletions can/interfaces/nican.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/usr/bin/env python
# coding: utf-8

"""
NI-CAN interface module.

Implementation references:
* http://www.ni.com/pdf/manuals/370289c.pdf
* https://github.com/buendiya/NicanPython
"""

import ctypes
import logging
import sys
Expand All @@ -13,39 +17,39 @@

logger = logging.getLogger(__name__)

NC_SUCCESS = 0
NC_ERR_TIMEOUT = 1
TIMEOUT_ERROR_CODE = -1074388991
NC_SUCCESS = 0
NC_ERR_TIMEOUT = 1
TIMEOUT_ERROR_CODE = -1074388991

NC_DURATION_INFINITE = 0xFFFFFFFF
NC_DURATION_INFINITE = 0xFFFFFFFF

NC_OP_START = 0x80000001
NC_OP_STOP = 0x80000002
NC_OP_RESET = 0x80000003
NC_OP_START = 0x80000001
NC_OP_STOP = 0x80000002
NC_OP_RESET = 0x80000003

NC_FRMTYPE_REMOTE = 1
NC_FRMTYPE_COMM_ERR = 2
NC_FRMTYPE_REMOTE = 1
NC_FRMTYPE_COMM_ERR = 2

NC_ST_READ_AVAIL = 0x00000001
NC_ST_WRITE_SUCCESS = 0x00000002
NC_ST_ERROR = 0x00000010
NC_ST_WARNING = 0x00000020
NC_ST_READ_AVAIL = 0x00000001
NC_ST_WRITE_SUCCESS = 0x00000002
NC_ST_ERROR = 0x00000010
NC_ST_WARNING = 0x00000020

NC_ATTR_BAUD_RATE = 0x80000007
NC_ATTR_BAUD_RATE = 0x80000007
NC_ATTR_START_ON_OPEN = 0x80000006
NC_ATTR_READ_Q_LEN = 0x80000013
NC_ATTR_WRITE_Q_LEN = 0x80000014
NC_ATTR_CAN_COMP_STD = 0x80010001
NC_ATTR_CAN_MASK_STD = 0x80010002
NC_ATTR_CAN_COMP_XTD = 0x80010003
NC_ATTR_CAN_MASK_XTD = 0x80010004
NC_ATTR_READ_Q_LEN = 0x80000013
NC_ATTR_WRITE_Q_LEN = 0x80000014
NC_ATTR_CAN_COMP_STD = 0x80010001
NC_ATTR_CAN_MASK_STD = 0x80010002
NC_ATTR_CAN_COMP_XTD = 0x80010003
NC_ATTR_CAN_MASK_XTD = 0x80010004
NC_ATTR_LOG_COMM_ERRS = 0x8001000A

NC_FL_CAN_ARBID_XTD = 0x20000000

NC_FL_CAN_ARBID_XTD = 0x20000000

CanData = ctypes.c_ubyte * 8


class RxMessageStruct(ctypes.Structure):
_pack_ = 1
_fields_ = [
Expand Down
6 changes: 5 additions & 1 deletion can/interfaces/slcan.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
#!/usr/bin/env python
# coding: utf-8

"""
Interface for slcan compatible interfaces (win32/linux).

Note Linux users can use slcand/socketcan as well.
Note: Linux users can use slcand/socketcan as well.
"""

from __future__ import absolute_import
Expand Down Expand Up @@ -85,6 +88,7 @@ def __init__(self, channel, ttyBaudrate=115200, timeout=1, bitrate=None, **kwarg
raise ValueError("Invalid bitrate, choose one of " + (', '.join(self._BITRATES)) + '.')

self.open()

super(slcanBus, self).__init__(channel, **kwargs)

def recv(self, timeout=None):
Expand Down
8 changes: 4 additions & 4 deletions can/interfaces/virtual.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# -*- coding: utf-8 -*-
#!/usr/bin/env python
# coding: utf-8

"""
This module implements an OS and hardware independent
virtual CAN interface for testing purposes.

Any VirtualBus instances connecting to the same channel
will get the same messages.
and reside in the same process will receive the same messages.
"""

import logging
Expand All @@ -14,11 +15,10 @@
import queue
except ImportError:
import Queue as queue
from can.bus import BusABC

from can.bus import BusABC

logger = logging.getLogger(__name__)
#logger.setLevel(logging.DEBUG)


# Channels are lists of queues, one for each connection
Expand Down