Ekahau::Events - Event-driven interface to Ekahau location sensing system
Ekahau::Events class provides an event-driven interface to the Ekahau location sensing system's YAX protocol.
This class implements methods for registering event handlers to receive particular Ekahau responses, and dispatching events based on responses received from Ekahau. Requests can be sent using methods available from Ekahau::Base.
This class uses Ekahau::Base::new as its constructor.
Registers an event handling sub for the given tag and event.
$event should be strings representing the tag and event to be handled,
$handler is a subroutine reference.
Both the tag and event must match for the handler to be called.
If one or the other is
events with any value for that property will be handled by
$handler; if both are
any event will be handled by the given
When dispatchone is looking for an event handler,
it will first look for a registered handler matching both
then matching just
then matching just
and finally the "default handler" registered with both
$event set to
If none of these match,
the event is ignored.
If an event matches,
$handler will be called with an Ekahau::Response object as the first parameter,
followed by the tag,
followed by the event.
Each handler takes up a small amount of memory, so make sure you call unregister_handler when you no longer need to handle the event. If you're just handling a single event one time, consider using register_handler_once, which automatically unregisters the event afterwards.
Registers an event handling sub for the given tag and event, just like register_handler, but when the event completes automatically unregisters the handler.
This is useful for simple requests with simple responses, to avoid leaking memory.
Unregister the handler for the given
Read pending events from the Ekahau server, and call the registered handler for each of them. This call will block; to avoid that, you should first use the Ekahau::Base::can_read method or select on the filehandles returned by Ekahau::Base::select_handles.
Dispatch a single event to the appropriate handler. Generally you won't call this yourself, relying on dispatch to do it for you.
Scott Gifford <email@example.com>, <firstname.lastname@example.org>
Copyright (C) 2005 The Regents of the University of Michigan.
See the file LICENSE included with the distribution for license information.