Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Perl and Can Bus

by BrowserUk (Patriarch)
on Dec 12, 2014 at 14:18 UTC ( [id://1110166]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl and Can Bus
in thread Perl and Can Bus

./receivetest a pcan linux driver script

So that's an executable you have to run and it writes the data stream to stdout?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^4: Perl and Can Bus
by Jalcock501 (Sexton) on Dec 12, 2014 at 14:20 UTC
    Yes, the stream comes through as stdout which I can redirect as input to the perl script.

      The your simplest approach would be to use a piped open. Something like this:

      #! perl -w use strict; open STREAM, './receivetest |' or die $!; while( my $line = <STREAM> ) { print $line; }

      That should get you started. Come back with questions arising.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1110166]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-26 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found