Slinke

 view release on metacpan or  search on metacpan

examples/build_IR_database.pl  view on Meta::CPAN


use strict;
use Slinke;
use Data::Dumper;

my $file = shift || "slinke.irdb";

# read in database
my ( %COMMANDS, %COMPONENT_LOOKUP, %COMPONENTS, %COMMAND_LOOKUP );
{
    local $/ = "";
    open FILE, $file;
    my $string = <FILE>;
    close FILE;
    
    eval $string;
}

my $slinke = new Slinke();
$slinke->setIRSamplingPeriod( 100 / 1e6 );
$slinke->setIRTimeoutPeriod( 500 );

examples/decode_IR.pl  view on Meta::CPAN

#!/usr/bin/perl -w

use strict;
use Slinke;

my $file = shift || "slinke.irdb";

# read in database
my ( %COMMANDS, %COMPONENT_LOOKUP, %COMPONENTS, %COMMAND_LOOKUP );
{
    local $/ = "";
    open FILE, $file;
    my $string = <FILE>;
    close FILE;
    
    eval $string;
}

my $slinke = new Slinke();
$slinke->setIRSamplingPeriod( 100 / 1e6 );
$slinke->setIRReceivePorts( 0xFF );

examples/play_IR_command.pl  view on Meta::CPAN

use Slinke;

my $DEBUG = 0;
my $TIMEOUT = 500;

my $file = shift || "slinke.irdb";

# read in database
my ( %COMMANDS, %COMPONENT_LOOKUP, %COMPONENTS, %COMMAND_LOOKUP );
{
    local $/ = "";
    open FILE, $file;
    my $string = <FILE>;
    close FILE;
    
    eval $string;
}

my $slinke = new Slinke();

$slinke->setIRSamplingPeriod( 100 / 1e6 );



( run in 0.320 second using v1.01-cache-2.11-cpan-49f99fa48dc )