Trying to configure a tcp/ip PDL to read and ack two different phrases. First, vendor sends a single x05 and waits for ack. Then vendor sends a variable length string of data followed by a line feed. I can get either one to work using the elements below, but not both. The PDL program puts out “no more phrases to try” on occasion, which implies that it’s capable of trying multiple phrases, but can’t figure out a way to do this using hci_pd_msg_style. All suggestions welcome, including possible non-pdl solutions. This is for reading ASTM messages from a medical device interface.
/**** This works. Ack’s x05 sent with no lf ***/
define phrase ping-msg;
field ping = fixed-array(1,or());
end phrase;
/***This basic-msg phrase works. Captures anything ending in lf***/
define phrase basic-msg;
field data = variable-array( not( ) );
;
end phrase;
/*** Problem is how to get PDL utility to check both phrases. Have tried listing both phrases and fields in every way I can imagine. ***
hci_pd_msg_style acknak phrase:basic-msg
field:data
ackphrase:ack-msg
nakphrase:nak-msg
timeout:1000
naktries:1
tmotries:1
Thanks