Ipc message parameters in PC SDK

IpcMessage class contains the following int fields - Sender, Cmd, UserDef and UserData. The same fields are used in the IpcQueue.Send overload.

However, the use of these parameters is not clear in the documentation. Of the 4 parameters, UserDef is accessible from RMQGetMsgHeader and Sender seems to be cast as rmqslot (I think).

I am curious to know what Cmd and UserData are for and how they can be used in RAPID.