NAME

Roku::RokuLCD - M400 & M500 Display Functions made more accessible than via the Roku::RCP module

VERSION

Version 0.03 March 24, 2014 Proper CPAN packaging and moved to using Roku::RCP as a base rather than the non-CPAN RokuUI module

SYNOPSIS

use Roku::RokuLCD;
my $display = Roku::RokuLCD->new($rokuIP);
if (! display) { die("Could not connect to Roku Soundbridge"); }

my($rv) = $display->marquee(text => "This allows easy access to the marquee function - timings for M400 only");

$display->ticker(text => "An alternative to the marquee function that can cope with large quantities of text", pause => 5);

open (INFILE, "a_text_file.txt");
@slurp_file = <INFILE>;
close(INFILE);

$display->teletype(text => "@slurp_file", pause => 2, linepause => 1);

$display->Quit;

DESCRIPTION

Roku::RokuLCD was written because the RokuUI module appeared a bit too high level, so I put together some simplified display routines into a single easy-to-use object.

It has now been moved to using the Roku::RCP module which is easily available from CPAN.

It inherits all the methods from the standard Roku::RCP module.

METHODS

new(host => host_address [, port => port] [, model => 400 or 500])

If not given, RokuLCD assumes that the port number is 4444, and will attempt to determine the model from the displaytype command (if that fails, it will set the model type to M400).

marquee(text => text to display [, clear => 0/1])

This allows quick access to the standard sketch marquee function - timings are for text sized to the M400 display as I do not have access to an M500.

If 1 is passed to clear, it forces the display to clear first (default 0)

ticker(text => text to display [, y => 0/1] [, pause => seconds])

An alternative to the marquee that can be displayed on either the top or bottom line.

teletype(text => text to display [, pause => seconds] [, [linepause => seconds])

An alternative to using marquee to display large quantities of text, scrolling the display upwards rather than from the right.

The length of time to pause after each line of text is given by linepause, wheras pause holds the length of time to pause at the end of the text.

onstandby

Checks whether the Soundbridge is on standby (returns true) or in use (returns false)

sb_response

Used to return any command responses; filtering out prompts

STANDARD VARIABLES

clear

  • 0 (default) do not clear display first

  • 1 clear display first

BUGS AND LIMITATIONS

To do list

  • teletype method requires refactoring.

AUTHOR

Outhwaite, Ed, <edster at gmx.com>

ACKNOWLEDGEMENTS

Both ticker and teletype were inspired by Rod Lord's work on the Hitch-Hiker's Guide to the Galaxy TV program. http://www.rodlord.com/pages/hhgg.htm

LICENSE AND COPYRIGHT

Copyright 2014 Outhwaite, Ed.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0

Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.

If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.

Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

RokuUI is Copyright Michael Polymenakos 2007 mpoly@panix.com