PDL allow double message Delimiter

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf PDL allow double message Delimiter

  • Creator
    Topic
  • #54256
    Dustin Schreader
    Participant

    Currently I have a client that is sending XML data without length encoding or standard encapsulation but I figure there should be a way to set the starting delimiter to “ or 0x0A 0x0A.

    So far the best option seems to be using a ‘not’ in a variable-array and storing the XML data between the delimiters in a field variable. The problem I have is that it appears the ‘not’ does not accept multiple character delimiters only single so I am only able to use a single linefeed as a delimiter which causes issues because there is a linefeed after each line of XML data.

    Please any suggestions on a possible work around. The PDL code I have attempted so far including failed attempts that are comment out are as follows:

    Code:


    define driver tcpip-erx;
       version: “1.0”;
    end driver;

    define phrase basic-msg-two;
      “, ) ); */
    /*    field data = variable-array( not( ‘
    ‘ ) );*/
    /*field chk = fixed-array(2,
    );*/
    /*    
    ;
       
    ;*/
     /*  field term = fixed-array(100, begin variable-array(not(
    )); ; end); */
    field term = variable-array( not( ‘
    ‘ ) );
    ;
    ;
    end phrase;

    hci_pd_msg_style basic  phrase:basic-msg-two
                           field:term
                           resync:\xb

Viewing 3 reply threads
  • Author
    Replies
    • #80741
      Charlie Bursell
      Participant

      I assume you are using 5.8 or better

      Try the TCP/IP protocol the select Encapsulated -> User

      set start to <?

      set end to nn

      A quick and dirty test on my Windows box seems to work OK

    • #80742
      Dustin Schreader
      Participant

      We are still using cloverleaf 5.7. We do not have the option in TCP/IP protocol to select the Encapsulated Options.

    • #80743
      Charlie Bursell
      Participant

      That will be real tough.  PDL was written for the very first version of Cloverleaf and has not changed much since.  There are some things that are hard to do.

      I have done some similar things using X.12 where I define a bogus encapsulation statement and let it error.  I then capture the buffer in PDL and get what I want.  Slows things down a bit but not too much.

      You also need to consider ACK messages.  Surely you will send ACKs.  You need that for flow control.

      Bottom line is I would update if I were you.  Running 5.7is like still running Windows XP.

    • #80744
      Dustin Schreader
      Participant

      Thank you for the help Charlie. We decided to move the code to Cloverleaf 5.8.

Viewing 3 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,129
Forums
28
Topics
9,301
Replies
34,448
Topic Tags
288
Empty Topic Tags
10