The engine know which is a data message and which is a relpy message for inbound messages. If it comes in while Wait Reply is on its a Reply type otherwise its a dat type. The only time you have to se that yourself is if you are building a reply message.