caran / can4python Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Hi,
Currently I have a project where I go thru large BLF files using python-can then parse each frame with kcd database from can4python. One database / can channel. For each frame i'm extracting the definition for each signal i fetch the signalvalue and store to a file all the values that changed form previous frame.
For my example blf file ~88mb it takes me around 1400seconds to run thru. At about 10miljon measurmentpoints.
Hi fellow CAN Python project! Over at python-can#80 we're discussing a nicer api for transmitting periodic messages for lots of can backends (not just socketcan). What we have so far is based on socketcan's broadcast manager - which I see you have used too.
In any case I wondered if you'd be interested in adding your 2 cents?
Cheers!
Hi,
I'm just developing a can database package for python (pure python).
Maybe you could use this package for supporting several can-formats natively.
As far as I can understand the bcm sockets are useful to handle cyclic reception on the Kernel level and thus avoid any additional overhead from doing that from code.
Is cyclic reception not possible with the current can4python library,
I've only found this possibility for sending with bcm sockets.
64 bits signals like do not work as the signal sent will be truncated. For example, 0x0102030405060708
becomes 0x0102030405060700.
Message 0xFFFFFFFFFFFFFFFF even creates an assertion error: "Trying to set too large signal value to frame"
Issue is located in canframe.py
scaled_value = float((physical_value - signaldefinition.valueoffset) / signaldefinition.scalingfactor)
Converting a 64 bit int (physical value) to float creates a rounding issue that is clearly seen when offset=0 and scalingfactor=1
Proposal is to use Decimal lib to fix it (see patch attached)
Provided also a small Python test file + kcd to highlight the issue
Other information
Tested on ubuntu 17.04 with can4python 0.2.1 and Python 3.5.3 with both vcan and real can (Microchip USB device)
Ran make test without any error
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.