Hi all, hope someone here can give me some pointers in the right direction.


I am looking at implementing a custom daemon for the sample mode of the USB IR Toy from Dangerous Prototype but can’t really get my head around what I need to implement and what it should to. This means I’ll be able to use the IRRecording functionality to generate a remote file with the timing and bitmasks for the different buttons/repeats etc.



Looking at the code for some of the daemons this is my understanding of how it works:

Define my own struct of type hardware.

Implement *init_func so it sets up the IR Receiver the way I want it.

Implement *deinit_func to do a nice shutdown.

Implement *rec_func to receive data.

Implement #decode_func to decode the data I receive.


Where I stumble is on the actual data I have access to and what I should write to/return in the implementation.



So my real question is: Is there any documentation about what all the structs do and what input/output they expect?




For example: The USB IR Toy gives me an array of timings for a specific signal (2bytes per pulse), so the output from the IR Toy might be {0xFF, 0xFF, 0x02,0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0xFF, 0xFF}.

What I can’t figure out how this will get passed to my daemon..will the buffer hold the separate bytes? Will it be an array of some kind? A struct?

And when I have taken that array and converted it to the actual pulse times, how do I get them into the LIRC engine so it can match it against the remote control configuration?



Very grateful for any help on the matter!