NAME
Device::LaCrosse::WS23xx::MemoryMap - Weather station address meanings
SYNOPSIS
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.
DESCRIPTION
CONSTRUCTOR
METHODS
- find_field( FIELD )
-
Canonicalizes FIELD and looks it up. If found, returns a hashref with the following elements:
- name
-
Canonical field name.
- units
-
Units of the measurement. See Units below.
- address
-
Starting address of this field in the WS-23xx memory map
- count
-
Length, in nybbles, of the field.
- expr
-
Perl expression used to convert data nybbles to a useful form.
If FIELD is not found, returns undef.
Known Fields
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.
Units
The WS-23xx devices return data in the following units:
- C
-
Degrees Centigrade (temperature)
- %
-
Percent (humidity)
- hPa
-
hectoPascals (pressure)
- m/s
-
Meters per Second (wind speed)
- mm
-
Millimeters (rainfall)
- degrees
-
Compass degrees, 0-359, (wind direction)
- minutes
-
Minutes.
- seconds
-
Seconds.
- time_t
-
Seconds since the Epoch; you probably want to use it as an argument to localtime().
AUTHOR
Ed Santiago <esm@cpan.org>