252
Platforms
©2000-2008 Tibbo Technology Inc.
Type:
Enum (pl_ser_esctype, byte)
Value Range:
0- PL_SER_ET_DISABLED (disabled): Recognition of
serial escape sequences disabled.
1- PL_SER_ET_TYPE1: Escape sequences of type 1 are to
be recognized.
2- PL_SER_ET_TYPE2: Escape sequences of type 2 are to
be recognized.
See Also:
,
Details
Escape sequence is a special occurrence of characters in the incoming data
received by the serial port. Escape sequences are only recognized in the
mode of operation (
= 0- PL_SER_MODE_UART).
When escape sequence is detected the
event is generated and the
serial port is disabled (
= 0- NO). When enabled, serial escape
sequence detection works even when the
is employed (see
property).
Follows is the description of two escape sequence types:
Type 1
Type1 escape sequence consists of three consecutive escape
characters (ASCII code of escape character is defined by the
property). For the escape sequence to be recognized
each of the escape characters must be preceded by a time gap of at
least 100ms:
...previous
data
<--100ms--
>
E.C.
<--100ms--
>
E.C.
<--100ms--
>
E.C.
If the time gap before a certain escape character exceeds 100ms
then this character is considered to be a part of the escape sequence
and is not recorded into the RX buffer. If the time gap before a
certain escape character is less than 100ms than this character is
considered to be a normal data character and is saved into the RX
buffer. Additionally, escape character counter is reset and the escape
sequence must be started again. The following example illustrates
one important point (escape characters are shown as
). Supposing
the serial port receives the following string:
ABC
<--100ms-->
<--100ms-->
DE
First two escape characters is this example had correct time gap
before them, so they were counted as a part of the escape sequence
and not saved into the buffer. The third escape character did not
have a correct time gap so it was interpreted as a data character and
saved into the buffer. The following was recorded into the RX buffer:
ABC
DE
The side effect and the point this example illustrates is that first two
escape characters were lost -- they neither became a part of a
successful escape sequence (because this sequence wasn't
completed), nor were saved into the buffer.
226
236
226
255
259
251
245
260
251