I want to understand how devctl() works, in the developer support of QNX they don’t precise how we can use for example __DIOTF(class, cmd, data), we have a different class, but what about cmd, I saw in an example that he use different numbers but I don’t know what those numbers represent.
The command and the data_in and/or data_out, are private between you and your driver. The o/s only creates and sends a devctl message with your command and data. All the data you send “in” will be part of the message.
That said, you should pick an appropriate class and create your dcmd_xxx.h from a standard model i.e. usr/include/sys/dcmd_chr.h
devctl is just a communication layer between your driver & your other program (like a phone is a communication layer between 2 people). It doesn’t know/care about what numbers you use (or language 2 people speak over a phone). Your driver & other program are what has to know what those numbers mean.