No announcement yet.

Basic TCP - Dealing with variable end of message bytes

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?


    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

  • #2
    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, 07:01 AM. Reason: correction