Device::LaCrosse::WS23xx::MemoryMap - Weather station address meanings
use Device::LaCrosse::WS23xx::MemoryMap; my $map = Device::LaCrosse::WS23xx::MemoryMap->new();
This is NOT intended as a user-visible module. It is used internally by Device::LaCrosse::WS23xx. This interface is subject to change without notice.
Parses the data table contained in the module itself.
Canonicalizes FIELD and looks it up. If found, returns a hashref with the following elements:
Canonical field name.
Units of the measurement. See Units below.
Starting address of this field in the WS-23xx memory map
Length, in nybbles, of the field.
Perl expression used to convert data nybbles to a useful form.
If FIELD is not found, returns undef.
The known data fields -- i.e., what you can use as an argument to Device::LaCrosse::WS23xx->get() -- are:
END_MMAP_REST
for my $entry (@map) { my $name = sprintf("%-40s", $entry->{name});
if (my $units = $entry->{units}) { $name .= $units; } $name =~ s/\s+$//; print { $mmap_fh } " ", $name, "\n"; }
print { $mmap_fh } <<'END_MMAP_FINAL';
Where applicable, units are displayed to the right of each field.
The WS-23xx devices return data in the following units:
Degrees Centigrade (temperature)
Percent (humidity)
hectoPascals (pressure)
Meters per Second (wind speed)
Millimeters (rainfall)
Compass degrees, 0-359, (wind direction)
Minutes.
Seconds.
Seconds since the Epoch; you probably want to use it as an argument to localtime().
Ed Santiago <esm@cpan.org>
Device::LaCrosse::WS23xx
To install Device::LaCrosse::WS23xx, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Device::LaCrosse::WS23xx
CPAN shell
perl -MCPAN -e shell install Device::LaCrosse::WS23xx
For more information on module installation, please visit the detailed CPAN module installation guide.