Ravn::Bluez::State::
Connected
class
Manage a connected client socket.
Route actor messages to the device.
def on_event( event, data )
case event
when :write
self.device.write( data )
end
end
Pushdown hook – called when this state first enters the stack.
def on_start
self.device.send_startup_message
end
Transition if a connection is lost.
def update( * )
self.device.check_broker
unless self.device.socket
self.log.warn "Lost connection to device."
return :lost_connection
end
end