I'm developing an application which interacts with Chemistry Analyzers and I need to work with the QRY^Q02 and DSR^Q03 messages.
The communication schema is as follows:
Analyzer Soft
QRY^Q02
|--------------------------------->|
QCK^Q02
|<---------------------------------|
DSR^Q03
|<---------------------------------|
ACK^Q03
|--------------------------------->|
I've implemented a ReceivingApplication to handle the incoming messages and generating the responses.
The problem I have is that I don't know how to send the DSR^Q03 message after responding the QCK^Q02.
One alternative is to fire a separate thread from the "processMessage", which will send the response to the query. I think this isn't a good approach to handle the query for several reasons.
Does someone know how to send the DSR^Q03 after responding the QCK^Q02 ?
If anyone can help me, I'll really appreciate it.
Thanks in advance. Best regards.
I have tried with an Analyzer System with a 3rd party network tool to test this use-case which is good work.
And after sending the
QCK^Q02
, you can sendDSR^Q03
directly (no wait, no new thread, just do it directly). Just send one by one. The analyzer will accept the information.I hope this can help you.