NAME ezsign - Library to permit basic controlling of scrolling alpha-numeric LED displays that were produced by Adaptive Micro Systems, Inc. SYNOPSIS use ezsign; my $sign = ezsign->new("COM1"); # sends priority text message $sign->SendTextSimple("hello world"); # also sends a priority text $sign->SendTextSimple(mode => 'flash', text => "testing moo"); # clears the priority message $sign->ClearPriorityText(); # sync time and send a priority message that displays the time/date. $sign->SynchronizeLocalTime(); $sign->SendTextSimple("current date and time: \x0B8 \x13"); DESCRIPTION Please note that only basic communications functionality is currently offered by this library. This library was designed and tested with a "SERIES 300 ALPHA LED SIGN" which can be cheaply purchased for approximately $175 USD. Compatibility with other Adaptive models should be possible but has not been tested. Although the Adapative communications protocol allows for multiple signs to be daisy-chained and assigned unique addresses so that they can be programmed individually or by groups, this library was not designed for that usage scenario. The sign has several kilobytes (such as 32kb for the SERIES 300) of persistent memory that is used to store all of the TEXT files, STRING files, and DOT graphics. There are a total of 95 possible "file label" slots, which are given one-character ASCII names in the range of 0x20 through 0x7E inclusive. Each of these file labels can be used for one of the three purposes already mentioned, but changing the designated purpose of a file label will erase its contents. The size of each file label is specified at the time its purpose is configured and the memory used for its storage is taken from the total amount of persistent memory available on the device. Message files cannot be written to any files (other than "0" or "A") until memory is explicitly allocated for that file label using the Set Memory Configuration command. File label "0" is used for Priority messages and is pre-configured to use a set region of memory outside of the Memory Pool. When data is written to the Priority message file, all other text files will stop being displayed. When the Priority message file is erased, then normal display of other text files will resume. The Priority message file is limited to 125 characters. The size, purpose, and operating hours of the Priority message file cannot be reconfigured. The normal operational cycle of the sign is to display all TEXT file labels in sequence, unless there exists a Priority message (stored in file label "0"). File labels that do not contain TEXT are ignored. File labels that are configured to only be displayed at certain times of the date or days of the week are also ignored. METHODS The following methods are currently available: $sign = ezsign->new($port); Constructor for the communications object. Returns a reference to a ezsign object. On Windows, the "$port" will typically be "COM1" or "COM2" or similar. On UNIX, "$port" will be the serial port device filename, such as "/dev/cua1" $sign->SendTextSimple(...); Public method used to send new simple text files to the sign. Simple text files use the same formatting mode for the entire text. This method can accept either a single text string, or an argument hash that allows attributes to optionally be specified for the text. If the file/mode/position arguments are omitted then the following defaults are assumed: no file specified; destination file '0' (priority message). no display mode; random 'AUTOMODE' should be used. no position; fill screen 'FILL' should be used. Note that sending a priority message will prevent all other text messages stored on the sign from being displayed until the "ezsign::ClearPriorityText" method is called. Examples: $sign->SendTextSimple("testing2"); $sign->SendTextSimple(mode => 'flash', text => "testing moo"); $sign->SendTextSimple('position' => 'sparkle', 'file' => 'B', 'mode' => 'flash', 'text' => "new message"); $sign->SendTextFilePreformatted( 'file' => $file_label, 'rawtext' => $preformatted_text, ... ); Public method used to send new pre-formatted text files to the sign. This method expects that the "$preformatted_text" already contains the embedded escape codes that indicate the position, mode, or other display attributes for the text. The "$preformatted_text" argument may be undef or empty if you want to erase the specified text file, although the "ezsign::ClearTextFile" method provides a more convenient way to do this. The argument "$file_label" must be a valid single-character file label and must be large enough to store the entire block of text. By default, this method automatically reconfigures allocated memory on the sign so that the file label will be just large enough for the new block of text. This automatic reconfiguring can be supressed by supplying: 'autoconfigure' => 0. As a side effect of resizing memory, the protection and configured operating times of the text file will be reset. If this is not desirable then the 'autoconfigure' option (described above) can be used to supress this behavior. Alternatively, the new protection that should be used can be explicitly specified with the 'protected' option. (There is currently no way to specify the new operating times of the text file used during autoconfiguring.) Example: # sets the designated file text (with automatic resizing # and no protection, by default). $sign->SendTextFilePreformatted( 'file' => 'A', 'rawtext' => "\x1b\x20\x62" . "hello world" ); # same but does not automatically resize memory. $sign->SendTextFilePreformatted( 'file' => 'A', 'rawtext' => "\x1b\x20\x62" . "hello world", 'autoconfigure' => 0 ); # explicitly resizes memory and ensures that the text is # protected from being changed via the remote control. $sign->SendTextFilePreformatted( 'file' => 'A', 'rawtext' => "\x1b\x20\x62" . "hello world", 'autoconfigure' => 1, 'protected' => 1 ); $sign->ClearTextFile($filelabel); Erases a text file that was previously sent to the device. Examples: $sign->ClearTextFile("A"); $sign->ClearPriorityText(); Erases the priority text file on the device, allowing other text files to be displayed at will. This method is a shorthand for calling "ezsign::ClearTextFile" with an argument of "0". Examples: $sign->ClearPriorityText(); $sign->SynchronizeLocalTime(); Syncronize the clock on the sign to the current local time (timezone). The sign uses the time and date to schedule which messages should be displayed on specified days of the week and/or hours of the day. The current time and date can also be incorporated into text messages by placing the appropriate escape codes within your text messages. $sign->SynchronizeGMT(); Syncronize the clock on the sign to the current time in GMT. See "ezsign::SynchronizeLocalTime" for more information. $sign->SoftReset(); Sends a soft-reset to the sign. No persisted data is erased in a soft-reset. Immediately following the reset, the sign will display its ROM version, memory size, and other factory-determined values, before resuming display of its text files. Performing a soft-reset will cause the sign to forget the current time and date. It is not normally necessary to invoke this method. SEE ALSO See http://www.ams-i.com/ for details about the Adaptive product lines and other technical specifications about the communications protocol used with their products. COPYRIGHT This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.