web stats
Basic TCP - Dealing with variable end of message bytes - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-29-2018, 11:59 PM
seaston seaston is offline
OBX.3 Kenobi
 
Join Date: Feb 2010
Location: London, UK
Posts: 168
seaston is on a distinguished road
Default Basic TCP - Dealing with variable end of message bytes

I am looking to interface to a system that always sends STX at the start of a message, mostly ends with ETX, but sometimes with EOT. I don't think it is possible to set this up in the Basic TCP interface settings with a variable end of message character. Please can anyone confirm if it is possible to interface using Mirth Connect?

Quote:

Notes:

Phoresis starts the transmission sending MSG5 (first patient) then waits for MSG2 (ACK) from the Host, then continues with the next MSG5 (next patient) and waits again for MSG2, and thus up to the last sample selected by the operator.
 If Host answers a MSG4 (NACK), Phoresis retransmits the previous patient results and waits again for the MSG2 (ACK) for max. 3 times then goes to the next patient results.
 When Phoresis does not have anymore samples to transmit to the Host, the last character of MSG5 becomes
EOT (ASCII 04h) instead of the ETX (ASCII 03h) character transmitted at the end of each previous sample.
 Every record as a fixed length

Reply With Quote
  #2  
Old 10-31-2018, 06:58 AM
agermano agermano is online now
Mirth Guru
 
Join Date: Apr 2017
Location: Indiana, USA
Posts: 900
agermano is on a distinguished road
Default

I think you are correct that you can't specify multiple End of Message byte sequences with an OR condition.

It should work to use <EOT> as your end of message byte, and then use a batch splitter on the <ETX><STX> bytes. The downside would be that it would have to read the entire transmission before it could start splitting it into messages, and I don't know how many there are in a single transmission or how big they are.

There are probably other ways to get it working, too, possibly by creating your own transmission mode, but if the above solution works, I would go with that.

EDIT: Nevermind. I just read the whole thing, and I see you need to ACK after each STX, so what I said above won't work.

Last edited by agermano; 10-31-2018 at 07:01 AM. Reason: correction
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 08:55 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation