NAME

App::RPi::EnvUI::Event - Asynchronous events for the Perl portion of App::RPi::EnvUI

SYNOPSIS

use App::RPi::EnvUI::API;
use App::RPi::EnvUI::Event;

my $api = App::RPi::EnvUI::API->new;
my $events = App::RPi::EnvUI::Event->new;

my $env_to_db_event  = $events->env_to_db($api);
my $env_action_event = $events->env_action($api);

$env_to_db_event->start;
$env_action_event->start;

DESCRIPTION

This is a helper module for App::RPi::EnvUI, which contains the scheduled asynchronous Perl events on the server side of the webapp.

METHODS

new

Returns a new App::RPi::EnvUI::Event object.

env_to_db($api)

Parameter:

$api

Mandatory. An instance of the App::RPi::EnvUI::API class.

Returns the event that updates the 'stats' environment database table.

env_action($api)

Parameter:

$api

Mandatory. An instance of the App::RPi::EnvUI::API class.

Returns the event that enables/disables the GPIO pins associated with the environment.

SEE ALSO

Async::Event::Interval

AUTHOR

Steve Bertrand, <steveb@cpan.org<gt>

LICENSE AND COPYRIGHT

Copyright 2016 Steve Bertrand.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.