CAN to MySQL logger complete

Code to run on Linux for CAN interfaces.
User avatar
linuxkidd
Site Admin
Posts: 345
Joined: 2005 Jul 22 15:48
Location: Anywhere, USA
Contact:

Post by linuxkidd » 2005 Aug 04 11:54

TonyB wrote:It would probably speed things up a lot if you just set the terminal to cbreak mode at the start of the program (either with stty or Term::Readkey::Readmode()), or better yet, just use Readkey() from Term::Readkey in non-blocking mode.
Ya.. I agree completely! This is a throw back from my Route66 coding days.. :) Not as useful on higher speed apps...
TonyB wrote:I'm going to try to write a new version of the program that splits the reading and saving to separate processes. Should I try to keep to as few non-default modules as possible, or would it be OK to use some more complicated ones like Event and Expect?
Hell, use the entire CPAN archive if ya like! :) As long as the modules are stable, and will compile / install w/o tons of tweaking, I don't see a problem with it.

Please... keep me posted.. ( I was just look'n at threading my script out... but if you've done this type of thing before, You'll probably have something quicker! ) :)
If you can read this, the light is still red.

05MagnumRT
What's hacking?
Posts: 23
Joined: 2005 Jul 28 16:03
Location: Dallas (Frisco), TX

Post by 05MagnumRT » 2005 Aug 04 11:56

I'll be glad to help with the C/C++ code.

User avatar
linuxkidd
Site Admin
Posts: 345
Joined: 2005 Jul 22 15:48
Location: Anywhere, USA
Contact:

Post by linuxkidd » 2005 Aug 04 12:02

05MagnumRT wrote:I'll be glad to help with the C/C++ code.
Well, I highly recommend taking a look at the canpoll.c program from the Prius site. If we can modify the logging thread of that program to use MySQL, I think we're in...

Otherwise, i can easily rip apart his log file w/ Perl and throw it into the DB..

( Or make a PHP web app that you can select the file on your local PC, and it'll upload and tear it apart )
If you can read this, the light is still red.

05MagnumRT
What's hacking?
Posts: 23
Joined: 2005 Jul 28 16:03
Location: Dallas (Frisco), TX

Post by 05MagnumRT » 2005 Aug 04 12:11

linuxkidd - I'm sorry, could you give me a link to the Prius site? Close to this canpoll.c if you can. I'm not familiar with that site...

If you can do it in Perl quickly, then that's fine with me too. I'm here to learn, and help if / when I can.

User avatar
Mad Max
Yes, we CAN hack!
Posts: 77
Joined: 2005 Jul 25 20:14
Location: Virginia Beach, VA
Contact:

Post by Mad Max » 2005 Aug 04 12:25

05MagnumRT wrote:linuxkidd - I'm sorry, could you give me a link to the Prius site? Close to this canpoll.c if you can. I'm not familiar with that site...
It is a little over a page down ... in the middle you will see it.

http://www.vassfamily.net/ToyotaPrius/C ... index.html

05MagnumRT
What's hacking?
Posts: 23
Joined: 2005 Jul 28 16:03
Location: Dallas (Frisco), TX

Post by 05MagnumRT » 2005 Aug 04 12:28

Got it. Thanks Mad Max.

05MagnumRT
What's hacking?
Posts: 23
Joined: 2005 Jul 28 16:03
Location: Dallas (Frisco), TX

Post by 05MagnumRT » 2005 Aug 04 12:37

Looks pretty straight forward, I'll look into it more when I'm not at work.

Post Reply