| Protocol::HAP::Characteristic(3p) | Perl Library Manual | Protocol::HAP::Characteristic(3p) |
NAME
Protocol::HAP::Characteristic - HAP characteristic definitions
SYNOPSIS
use Protocol::HAP::Characteristic;
my $char = Protocol::HAP::Characteristic->new(
type => 'CurrentTemperature',
iid => 13,
format => 'float',
perms => ['pr', 'ev'],
value => 21.5,
unit => 'celsius',
);
my $value = $char->get_value();
$char->set_value(22.0);
DESCRIPTION
This module supplies the HAP characteristic objects. Each characteristic holds its properties, its value, and its permissions.
THE LOGGER ARGUMENT
The constructor takes an optional "logger" argument: an object with "debug", "info", "warning", and "error" methods that take printf-style arguments. The default is the null logger of Protocol::HAP. "set_value" and "enable_events" report through it.
SEE ALSO
Protocol::HAP, spec/HAP-Characteristics.md
| 2026-08-18 | OpenBSD |