Ravn::Bluez::State::

Scanning class

Manage active device scanning modes.

FIXME: Ruby::DBus is not thread safe. The scanning -> pairing state is not fully implemented currently until this can be resolved.

Public Instance Methods

on_start()

Entering the state. Begin searching for devices.

# File lib/ravn/bluez/state/scanning.rb, line 21
def on_start
        self.device.start_scanning
end
on_stop()

Exiting the state. Stop searching for devices.

# File lib/ravn/bluez/state/scanning.rb, line 27
def on_stop
        self.device.stop_scanning
end
update( * )

If the scanner has timed out, restart it.

# File lib/ravn/bluez/state/scanning.rb, line 33
def update( * )
        self.device.start_scanning unless Ravn::Bluez.scanning?

        self.log.warn "Scanning currently unimplemented.  You'll want to add " +
                "a watch macaddress in your configuration."
        # TODO: scanning -> pairing on device "selection"
end