Module Lirc


module Lirc: sig  end
This module provides access to LIRC (see also the project homepage)

exception Lirc of string
generic exception for the module
exception DaemonDown
exception raised when the LIRC daemon is shut down


High level function


val connect : string ->
?config:string -> ?check:(string -> bool) -> (string -> bool) -> unit
connect prog handler initialize a client with name prog then call handler each time a code is received, until it return false

config : path to the configuration file (defaults to ~/.lircrc)
check : allow to check each code found in the configuration file (defaults to the constant true function)


Low level functions


type t 
configuration file handle
val init : string -> unit
init prog initialize the lirc client with name prog
val deinit : unit -> unit
lirc client release
val readconfig : ?check:(string -> bool) -> ?config:string -> unit -> t
reading of the configuration file
Raises Lirc"readconfig" if config does not exists or check return false.

check : allow to check each code found in the configuration file (defaults to the constant true function)
config : path to the configuration file (defaults to ~/.lircrc)
val freeconfig : t -> unit
release of the configuration handle
val nextcode : t -> string list
nextcode t return the list of the codes received since the last call. If no codes were received, wait for a code.