Scannex ip.buffer User Manual
© UK 2007-2021 Scannex Electronics Ltd. All rights reserved worldwide.
10.7.6. Protocol: Generic Records
This protocol provides an easy way to collect ASCII data from a wide variety of devices.
It is subtly different to the “ASCII Lines” protocol in the following ways:
•
It will always terminate the record with CR+LF sequence (adding one if needed)
•
It will throw away any “runt” records – records that do not terminate in the
“Suffix” character string.
•
It will only keep data between the Prefix and Suffix strings. All other data is
discarded.
Protocol Parameters
Allow
“
ASCII only
” – strips the high bit from the incoming data and
removes all NULL characters (0x00) and control codes
“
ASCII + codes
” – strips the high bit from the incoming data
but keeps NULL characters (0x00) and control codes.
[ASCII only]
Type
“
Lua Pattern
” – The Prefix and Suffix are both interpreted as
Lua string patterns. This allows for very complex record
boundaries.
“
String Literal
” – Treats Prefix and Suffix as literal strings
(i.e. not Lua patterns).
[String Literal]
Prefix
The string or Lua pattern that denotes the beginning of a record
(if applicable).
[blank]
Suffix
The string or Lua pattern that denotes the end of a record. If left
blank then the protocol will look for either CR or LF
characters.
[blank]
ACK
The string to send back to the device. Some devices require a
positive acknowledgement from the ip.buffer. The Source
must be a bidirectional device to allow this (i.e. COM or
TCP)
[blank]
Timeout
If there is no line ending suffix received the timeout decides
when to throw away the partial data received.
[1000]
26
If the extracted record contains CR and LF characters these will be stripped from the record as
control characters. If you have a multi-line record then you should choose “ASCII + codes”
Page 77
Scannex ip.buffer User Manual
© UK 2007-2021 Scannex Electronics Ltd. All rights reserved worldwide.
10.7.6. Protocol: Generic Records
This protocol provides an easy way to collect ASCII data from a wide variety of devices.
It is subtly different to the “ASCII Lines” protocol in the following ways:
•
It will always terminate the record with CR+LF sequence (adding one if needed)
•
It will throw away any “runt” records – records that do not terminate in the
“Suffix” character string.
•
It will only keep data between the Prefix and Suffix strings. All other data is
discarded.
Protocol Parameters
Allow
“
ASCII only
” – strips the high bit from the incoming data and
removes all NULL characters (0x00) and control codes
“
ASCII + codes
” – strips the high bit from the incoming data
but keeps NULL characters (0x00) and control codes.
[ASCII only]
Type
“
Lua Pattern
” – The Prefix and Suffix are both interpreted as
Lua string patterns. This allows for very complex record
boundaries.
“
String Literal
” – Treats Prefix and Suffix as literal strings
(i.e. not Lua patterns).
[String Literal]
Prefix
The string or Lua pattern that denotes the beginning of a record
(if applicable).
[blank]
Suffix
The string or Lua pattern that denotes the end of a record. If left
blank then the protocol will look for either CR or LF
characters.
[blank]
ACK
The string to send back to the device. Some devices require a
positive acknowledgement from the ip.buffer. The Source
must be a bidirectional device to allow this (i.e. COM or
TCP)
[blank]
Timeout
If there is no line ending suffix received the timeout decides
when to throw away the partial data received.
[1000]
26
If the extracted record contains CR and LF characters these will be stripped from the record as
control characters. If you have a multi-line record then you should choose “ASCII + codes”
Page 77