How to read commands from the event bus X10

Hi all.

I’m new in openhab. I’m programming a X10 Binding. I can controlling the cm15a with a c library called libususb.c. I’m using the method Runtime.getRuntime().exec(“programme”) in java to run the c library and it works but now I want to connect the orders with the UI. How could I receive the command? I read that I have to use the event bus. How I can get the commands from the event bus?

Thank you all.

I can’t answer your survive question but at you aware of the Mochad binding?