Displaying 1 result from an estimated 1 matches for "evmaserialport".
2008 Jan 14
10
Using EventMachine to listen from non-network
...alPort library. It turned out to be simpler
than I thought it would be:
require ''serialport''
$eventmachine_library = :pure_ruby
require ''eventmachine''
module EventMachine
class << self
def connect_serial(dev, baud, databits, stopbits, parity)
EvmaSerialPort.open(dev, baud, databits, stopbits, parity).uuid
end
end
def EventMachine::open_serial(dev, baud, databits, stopbits,
parity, handler=nil)
klass = if (handler and handler.is_a?(Class))
handler
else
Class.new( Conne...