App::RPi::EnvUI::Event - Asynchronous events for the Perl portion of App::RPi::EnvUI
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; my $env_action_event = $events->env_action; $env_to_db_event->start; $env_action_event->start;
This is a helper module for App::RPi::EnvUI, which contains the scheduled asynchronous Perl events on the server side of the webapp.
These events are objects of the Async::Event::Interval class, and run in a separate process than the rest of the application.
Returns a new App::RPi::EnvUI::Event object. The parameters are passed in within a hash format.
App::RPi::EnvUI::Event
Parameters:
testing
Optional, Bool: 0 disables testing mode, 1 enables it.
0
1
Returns the event that polls the environment sensors, and updates the stats environment database table.
stats
Returns the event that enables/disables the GPIO pins associated with the environment.
Async::Event::Interval
Steve Bertrand, <steveb@cpan.org<gt>
Copyright 2017 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.
To install App::RPi::EnvUI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::RPi::EnvUI
CPAN shell
perl -MCPAN -e shell install App::RPi::EnvUI
For more information on module installation, please visit the detailed CPAN module installation guide.