Finally, he implemented it by modifying "libusb", modifying it to send and receive usb translations from the message queue instead of usbfs. I programmed my simulator to create libsub types and send and receive them using message queues.
Now Simulator interprets incoming transmissions and sends them to the command parser, which sends a request / message to the automation system using sockets in a specific format. The automation system sends it as an instruction, sending it to the parser of commands using a socket. This socket invokes a method specific to each request in the simulator. Now the simulator forms the appropriate transfer structure and moves to the device plugin (via libusb) through the message queue.
source share