Ok Alex, thanks for your help, correct me if i am wrong.
This is the scenario:
3D cockpit, i click on a button X to set flaps to landing;
button X is attached to device Y;
on device Y is called the function SetCommand();
we call the dispatch_action(nil, iFlaps, iFull).
Is this the right way to interact from our LUA device with the simulation engine?