Second Pattern for PDL

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Second Pattern for PDL

  • Creator
    Topic
  • #52625
    Gordon Koch
    Participant

      Hello All,

          I have a lab system that is sending an added (hex 04) at the end of the ACK going to the engine. This rest of the encapsulation is “normal”. I have attempted to modify the PDL for the outbound thread to include this second pattern. However, I must have the syntax wrong, since I am still getting the following error:

      [pdl :PDL :DBUG/0:windopath_adt:07/28/2011 12:28:28] Calling Tcl procedure: hci_pd.read

      [pdl :PDL :DBUG/0:windopath_adt:07/28/2011 12:28:28] with args: {}

      [pdl :PDL :DBUG/0:windopath_adt:07/28/2011 12:28:28] Tcl procedure hci_pd.read returns ‘RECEIVE’

      [pdl :PDL :DBUG/0:windopath_adt:07/28/2011 12:28:28] trying to match phrase: basic-msg

      [pdl :PDL :DBUG/0:windopath_adt:07/28/2011 12:28:28] multi: phrase #0 rejected; trying next

      [pdl :PDL :ERR /0:windopath_adt:07/28/2011 12:28:28] no-match: no more phrases to try

      Please help with the correct coding for the pdl file. This is the related portion that I have now:

      define phrase basic-msg;

         ;

         field data = variable-array( not( ) );

         ; ;

      end phrase;

      define phrase ack-msg;

         ;

         field data = variable-array( not( ) );

         ; ; ;

      end phrase;

      Any help would be appreciated.

      Thank You.

    Viewing 1 reply thread
    • Author
      Replies
      • #74897
        Russ Ross
        Participant

          Did you compile the PDL after you modified it to create the corresponding pdo file?

          Here is an example of how to compile my.pdl

          cd to directory where the pdl is located (should be either something like $HCIROOT/pdls or $HCISITEDIR/pdls)

          hcipdc my.pdl

          This should create a new my.pdo file that includes your modifications.

          It has been many years since I did anything with a PDL and I remember concluding it was only paying attention to the first termination character and nothing after that but hopefully that is no longer the case.

          PDL is very picky about the last line in the file so be sure it isn’t a blank line or has a space after the last character on the last line or you will be challenged to figure out the problem.

          I also looked at some of the other examples and saw items defined on separate lines in some of the PDLs.

          From past programming expereince I know stacking commands using a semi-colon on a single line sometimes creates situataions, so even though it is a long shot you could also try this

          Code:

          define phrase ack-msg;
            ;
            field data = variable-array( not( ) );
            ;
            ;
            ;
          end phrase;

          I’m also assuming that is the correct definition for the character of intrest which corresponds to x04 in the ASCII table I just pulled up but never sure how the PDL wants it defined and I don’t know if you can specifiy x04 instead of .

          I never received any PDL training and have to try various things like you are without really knowing what I’m doing exactly.

          Russ Ross
          RussRoss318@gmail.com

        • #74898
          Gordon Koch
          Participant

            Hello Ross,

                   Thank you for your reply. I have subsequently learned that most likely the next pattern cannot be in a different “define phrase” command. The next pattern needs to be in the same basic-msg group, and I do not know the syntax for that. Otherwise there needs to be some other coding or setup that is beyond me. My understanding of PDL is very limited, but I thought I would take a stab at it.

            Thanks.

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