addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrosseditemptyheartfacebookfolderfullheartglobegmailgoogleimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

Re: [ruby-81] Low-level serial output from Ruby...

From: user 5.
Sent on: Thursday, October 22, 2009 11:45 AM
Nokogiri for XML.

You can get the serial library I use at��http://github.com/heisters/ruby-serialport. I patched it for Ruby 1.9 compatibility, so you may want to look into another version if you're using 1.8. Github has a few forks:��http://github.com/search?langOverride=&q=ruby+serialport&repo=&start_value=1&type=Repositories

I'd strongly recommend using Ruby 1.9 for this kind of stuff--fibers are helpful in dealing with Ruby's blocking IO. However, even 1.9 isn't going to allow you to deal with many of the timing issues inherent in serial communication, so you might want to use C or Java to read the serial port and give the data to your Ruby process using some kind of IPC (sockets, REST, OSC, Protobuf come to mind). I think it largely depends on your serial driver--I wouldn't recommend actually trying to do the driver itself in Ruby, but if your device has a terminal interface or the like you should be fine.

HTH,
Ian

On Thu, Oct 22, 2009 at 11:25 AM, Aaron Blohowiak <[address removed]> wrote:
Possibly. after some googling, this win/mac/linux ��ruby lib popped up:��http://ruby-serialport.rubyforge.org/ and was recommended by Peter Cooper ��here:��http://www.rubyinside.com/cross-platform-ruby-serial-port-library-328.html

On Thu, Oct 22, 2009 at 11:22 AM, Adrien Lamothe <[address removed]> wrote:
For the serial output, you'll likely have to write that in C and refer to it from your Ruby code.


--- On Thu, 10/22/09, Jon Seidel <[address removed]> wrote:

From: Jon Seidel <[address removed]>
Subject: [ruby-81] Low-level serial output from Ruby...
To: [address removed]
Date: Thursday, October 22, 2009, 10:15 AM


I've got a possible gig to transform XML data to RFID/Wiegand data streams for a new client and I'd like to script it with Ruby.��Couple of questions:
��
1. What XML parser have you used/recommend?
2. What would you recommend for the serial output? This thing is literally a 2-wire device with a 26-byte serial payload (I'm still looking for detailed specs on the device, but I've got sample basic and C++ writers).
��
Thanks...jon
��

Jon Seidel, CMC��

EDP Consulting, Inc. / www.edpci.com / www.4mypasswords.com





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jon Seidel ([address removed]) from The East Bay Ruby Meetup Group.
To learn more about Jon Seidel, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup Inc. PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Adrien Lamothe ([address removed]) from The East Bay Ruby Meetup Group.
To learn more about Adrien Lamothe, visit his/her member profile

To unsubscribe or to update your mailing list settings, click here

Meetup Inc. PO Box 4668 #37895 New York, New York[masked] | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Aaron Blohowiak ([address removed]) from The East Bay Ruby Meetup Group.
To learn more about Aaron Blohowiak, visit his/her member profile

To unsubscribe or to update your mailing list settings, click here

Meetup Inc. PO Box 4668 #37895 New York, New York[masked] | [address removed]

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy