Acme-FishFarm
view release on metacpan or search on metacpan
docs/Acme-FishFarm-1.01.html view on Meta::CPAN
sleep(3);
say "-----------------------------";
}
</code></pre>
<h1 id="EXPORT">EXPORT</h1>
<p>The <code>:all</code> tag can be used to import all the subroutines available in this module.</p>
<h1 id="NOTES">NOTES</h1>
<p>Almost all the subroutines in this module will give output. The unit measurements used will be according to the ones mentioned in <code>Acme::FishFarm::WaterConditionMonitor</code>.</p>
<h1 id="SYSTEM-INSTALLATION-RELATED-SUBROUTINES">SYSTEM INSTALLATION RELATED SUBROUTINES</h1>
<h2 id="install_all_systems">install_all_systems</h2>
<p>Installs all the available systems the default way and returns them as a list of <code>Acme::FishFarm::*</code> objects in the following sequence:</p>
<pre><code> (Feeder, OxygenMaintainer, WaterConditionMonitor, WaterLevelMaintainer, WaterFiltration)</code></pre>
<h1 id="SENSOR-READING-RELATED-SUBROUTINES">SENSOR READING RELATED SUBROUTINES</h1>
<h2 id="reduce_precision-decimal">reduce_precision ( $decimal )</h2>
<p>Reduces positive or negative <code>$decimal</code> to a 3-decimal value. Make sure to pass in a decimal with more than 3 decimal points.</p>
<p>Returns the reduced precision value.</p>
<p>This subroutine is useful if you are trying to set the current sensor readings randomly using the built-in <code>rand</code> function as you do not want to end up with too many decimals on the screen.</p>
<h1 id="AUTOMATED-SYSTEMS-RELATED-SUBROUTINES">AUTOMATED SYSTEMS RELATED SUBROUTINES</h1>
<p>All of the subroutines here will give output.</p>
<p>Take note that there are some systems that can't be connected to the water monitoring system and therefore will not effect the LEDs or buzzers. These systems are:</p>
<ul>
<li><p>Acme::FishFarm::Feeder</p>
</li>
<li><p>Acme::FishFarm::WaterFiltration</p>
</li>
<li><p>Acme::FishFarm::WaterLevelMaintainer</p>
</li>
</ul>
<h2 id="consume_oxygen-oxygen_maintainer-consumed_oxygen">consume_oxygen ( $oxygen_maintainer, $consumed_oxygen )</h2>
<p>This will cause the oxygen level (DO level) of the <code>Acme::FishFarm::OxygenMaintainer</code> to reduce by <code>$consumed_oxygen mg/L</code></p>
<p>Returns 1 upon success.</p>
<h2 id="check_DO-oxygen_maintainer-current_DO_reading">check_DO ( $oxygen_maintainer, $current_DO_reading )</h2>
<p>This checks and outputs the condition of the current DO level.</p>
<p>Take note that this process will trigger the LED and buzzer if abnormal condition is present.</p>
<p>Returns 1 upon success.</p>
<h2 id="check_pH-water_monitor-current_ph_reading">check_pH ( $water_monitor, $current_ph_reading )</h2>
<p>This checks and outputs the condition of the current pH value.</p>
<p>Take note that this process will trigger the LED and buzzer if abnormal condition is present.</p>
<p>Returns 1 upon success.</p>
<h2 id="check_temperature-water_monitor-current_temperature_reading">check_temperature ( $water_monitor, $current_temperature_reading )</h2>
<p>This checks and outputs the condition of the current temperature.</p>
<p>Take note that this process will trigger the LED and buzzer if abnormal condition is present.</p>
<p>Returns 1 upon success.</p>
<h2 id="check_turbidity-water_monitor-current_turbidity_reading">check_turbidity ( $water_monitor, $current_turbidity_reading )</h2>
<p>This checks and outputs the condition of the current temperature.</p>
<p>Take note that this process will trigger the LED and buzzer if abnormal condition is present.</p>
<p>Returns 1 upon success.</p>
<h2 id="check_water_filter-water_filter-current_waste_count-reduce_waste_by">check_water_filter ( $water_filter, $current_waste_count, $reduce_waste_by )</h2>
<p>This checks, performs necessary actions and outputs the condition of the current waste count in the filtering cylinder.</p>
<p>Take note that this process <b>DOES NOT</b> trigger the LED and buzzer if abnormal condition is present.</p>
<p>Returns 1 upon success.</p>
<h2 id="check_water_level-water_level_maintainer-current_water_level">check_water_level ( $water_level_maintainer, $current_water_level )</h2>
<p>This checks, performs necessary actions and outputs the condition of the current waste count in the filtering cylinder.</p>
<p>Take note that this process <b>DOES NOT</b> trigger the LED and buzzer if abnormal condition is present.</p>
<p>Returns 1 upon success.</p>
<h2 id="check_feeder-feeder-verbose">check_feeder ( $feeder, $verbose )</h2>
<p>This checks, performs necessary actions and outputs the condition of the feeder. Each call will tick the clock inside the feeder. See <code>Acme::FishFarm::Feeder</code> for more info.</p>
<p>If the food tank is empty, it will be filled to the default. So if you want to fill a different amount, please set the amount before hand. See <code>Acme::FishFarm::Feeder</code>.</p>
<p>Setting <code>$verbose</code> to 1 will give more output about the empty food tank.</p>
<p>Take note that this process <b>DOES NOT</b> trigger the LED and buzzer if abnormal condition is present.</p>
<p>Returns 1 upon success.</p>
<h2 id="render_leds-water_monitor">render_leds ( $water_monitor )</h2>
<p>Outputs which LEDs are lighted up. Returns 1 upon success.</p>
<p>Currently this subroutine only shows the LEDs present in the <code>Acme::FishFarm::WaterConditionMonitor</code> object. See that module for more details about the available LEDs.</p>
<p>More LEDs will be available in the future.</p>
<h2 id="render_buzzer-water_monitor">render_buzzer ( $water_monitor )</h2>
<p>Outputs which buzzer is buzzing. Returns 1 upon success.</p>
<p>See <code>Acme::FishFarm::WaterConditionMonitor</code> for details on how the short and long buzzers are switched on and off.</p>
<h1 id="AUTHOR">AUTHOR</h1>
<p>Raphael Jong Jun Jie, <code><ellednera at cpan.org></code></p>
<h1 id="BUGS">BUGS</h1>
<p>Please report any bugs or feature requests to <code>bug-acme-fishfarm at rt.cpan.org</code>, or through the web interface at <a href="https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-FishFarm">https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Ac...
<h1 id="SUPPORT">SUPPORT</h1>
<p>You can find documentation for this module with the perldoc command.</p>
<pre><code> perldoc Acme::FishFarm</code></pre>
<p>You can also look for information at:</p>
<ul>
<li><p>RT: CPAN's request tracker (report bugs here)</p>
<p><a href="https://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-FishFarm">https://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-FishFarm</a></p>
</li>
<li><p>CPAN Ratings</p>
<p><a href="https://cpanratings.perl.org/d/Acme-FishFarm">https://cpanratings.perl.org/d/Acme-FishFarm</a></p>
</li>
<li><p>Search CPAN</p>
<p><a href="https://metacpan.org/release/Acme-FishFarm">https://metacpan.org/release/Acme-FishFarm</a></p>
</li>
</ul>
<h1 id="ACKNOWLEDGEMENTS">ACKNOWLEDGEMENTS</h1>
<p>Besiyata d'shmaya</p>
<h1 id="SEE-ALSO">SEE ALSO</h1>
<pre><code> Acme::FishFarm::Feeder
( run in 0.575 second using v1.01-cache-2.11-cpan-39bf76dae61 )