Public Member Functions | Public Attributes | Private Member Functions
ir_hasher.hasher Class Reference

List of all members.

Public Member Functions

def __init__

Public Attributes

 callback
 cb
 code_timeout
 edges
 gpio
 hash_val
 in_code
 pi
 t1
 t2
 t3
 t4

Private Member Functions

def _cb
def _hash

Detailed Description

This class forms a hash over the IR pulses generated by an
IR remote.

The remote key press is not converted into a code in the manner of
the lirc module.  No attempt is made to decode the type of protocol
used by the remote.  The hash is likely to be unique for different
keys and different remotes but this is not guaranteed.

This hashing process works for some remotes/protocols but not for
others.  The only way to find out if it works for one or more of
your remotes is to try it and see.

EXAMPLE CODE

#!/usr/bin/env python

import time
import pigpio
import ir_hasher

def callback(hash):
   print("hash={}".format(hash));

pi = pigpio.pi()

ir = ir_hasher.hasher(pi, 7, callback, 5)

print("ctrl c to exit");

time.sleep(300)

pi.stop()

Definition at line 5 of file ir_hasher.py.


Constructor & Destructor Documentation

def ir_hasher.hasher.__init__ (   self,
  pi,
  gpio,
  callback,
  timeout = 5 
)
Initialises an IR remote hasher on a pi's gpio.  A gap of timeout
milliseconds indicates the end of the remote key press.

Definition at line 42 of file ir_hasher.py.


Member Function Documentation

def ir_hasher.hasher._cb (   self,
  gpio,
  level,
  tick 
) [private]

Definition at line 73 of file ir_hasher.py.

def ir_hasher.hasher._hash (   self,
  old_val,
  new_val 
) [private]

Definition at line 60 of file ir_hasher.py.


Member Data Documentation

Definition at line 45 of file ir_hasher.py.

Definition at line 45 of file ir_hasher.py.

Definition at line 45 of file ir_hasher.py.

Definition at line 73 of file ir_hasher.py.

Definition at line 45 of file ir_hasher.py.

Definition at line 60 of file ir_hasher.py.

Definition at line 45 of file ir_hasher.py.

Definition at line 45 of file ir_hasher.py.

Definition at line 73 of file ir_hasher.py.

Definition at line 73 of file ir_hasher.py.

Definition at line 73 of file ir_hasher.py.

Definition at line 73 of file ir_hasher.py.


The documentation for this class was generated from the following file:


cob_hand_bridge
Author(s): Mathias L├╝dtke
autogenerated on Thu Jun 6 2019 20:43:57