| 1 | package Protocol::IR::Proto::NEC482; | ||
| 2 | 55 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 55 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | |||
| 5 | 55 | our $VERSION = '1.5'; | |
| 6 | |||
| 7 | 55 | ▶ | use parent 'Protocol::IR::Proto::NEC48'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | # NEC482 is the 48-NEC2 variant: identical single-frame timing to 48-NEC1, | ||
| 10 | # only the repeat differs (the '2' variants re-transmit the whole frame | ||
| 11 | # instead of a short header+gap ditto frame). A single frame of either is | ||
| 12 | # timing-identical, so a timing decode labels both 48-NEC1; the name is | ||
| 13 | # preserved so repeat behavior survives conversion. | ||
| 14 | 19 | ▶ | sub _protocol_name { '48-NEC2' } |
|
Subroutine
_protocol_name: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 55 | 1; | |
| 17 | |||
| 18 | =head1 NAME | ||
| 19 | |||
| 20 | Protocol::IR::Proto::NEC482 - 48-NEC2 protocol handler (48-bit NEC, whole-frame repeat) | ||
| 21 | |||
| 22 | =head1 VERSION | ||
| 23 | |||
| 24 | version 1.5 | ||
| 25 | |||
| 26 | =head1 SYNOPSIS | ||
| 27 | |||
| 28 | use Protocol::IR::Converter; | ||
| 29 | |||
| 30 | my $converter = Protocol::IR::Converter->new(); | ||
| 31 | |||
| 32 | # 48-NEC2 is timing-identical to 48-NEC1 for a single frame; the name is | ||
| 33 | # kept so repeat behavior survives conversion. | ||
| 34 | my $code = $converter->import_code('48-NEC2', | ||
| 35 | { address => 77, subaddress => 178, command => 222 }); | ||
| 36 | |||
| 37 | =head1 DESCRIPTION | ||
| 38 | |||
| 39 | The C<48-NEC2> variant of L<Protocol::IR::Proto::NEC48> transmits an | ||
| 40 | identical single frame; only the repeat structure differs (it re-transmits | ||
| 41 | the whole frame rather than a short header+gap ditto frame). Because the | ||
| 42 | repeat is invisible to the single-frame decoders, a timing decode labels both | ||
| 43 | variants C<48-NEC1>; the C<48-NEC2> name is produced when a code is imported | ||
| 44 | by name (CSV, C<decode_params>, C<decode_raw>), which is the IRDB-to-wig | ||
| 45 | path. | ||
| 46 | |||
| 47 | =head1 METHODS | ||
| 48 | |||
| 49 | All methods are inherited from L<Protocol::IR::Proto::NEC48>; only the | ||
| 50 | protocol name differs. | ||
| 51 | |||
| 52 | =head1 SUPPORT | ||
| 53 | |||
| 54 | Source code: L<https://github.com/bwarden/perl-protocol-ir> | ||
| 55 | |||
| 56 | Bug reports and feature requests: L<https://github.com/bwarden/perl-protocol-ir/issues> | ||
| 57 | |||
| 58 | =head1 AUTHOR | ||
| 59 | |||
| 60 | Brett T. Warden <bwarden@cpan.org> | ||
| 61 | |||
| 62 | =head1 COPYRIGHT AND LICENSE | ||
| 63 | |||
| 64 | Copyright (c) 2026 Brett T. Warden | ||
| 65 | |||
| 66 | This library is free software; you can redistribute it and/or modify it | ||
| 67 | under the terms of the GNU General Public License as published by the | ||
| 68 | Free Software Foundation; either version 2 of the License, or (at your | ||
| 69 | option) any later version. | ||