summaryrefslogtreecommitdiff
path: root/documentation
diff options
context:
space:
mode:
authorChris Liechti <cliechti@gmx.net>2016-01-18 20:46:00 +0100
committerChris Liechti <cliechti@gmx.net>2016-01-18 20:46:00 +0100
commit1c4c599d91f9b0f418885cfc65fb1b4b54fd8ed2 (patch)
treef305b6d53328c1a8ddb9f06a8c093ca6d72c93f0 /documentation
parent6c693d71a4ca9827bf78f30ea9a8f80ef21d7c10 (diff)
downloadpyserial-git-1c4c599d91f9b0f418885cfc65fb1b4b54fd8ed2.tar.gz
doc update
Diffstat (limited to 'documentation')
-rw-r--r--documentation/pyserial_api.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/documentation/pyserial_api.rst b/documentation/pyserial_api.rst
index 94dd686..4763c6c 100644
--- a/documentation/pyserial_api.rst
+++ b/documentation/pyserial_api.rst
@@ -1041,6 +1041,8 @@ This module provides classes to simplify working with threads and protocols.
.. method:: handle_packet(packet)
+ :param bytes packet: a packet as defined by ``TERMINATOR``
+
Process packets - to be overridden by subclassing.
@@ -1051,11 +1053,24 @@ This module provides classes to simplify working with threads and protocols.
.. attribute:: TERMINATOR = b'\\r\\n'
+
+ Line ending.
+
.. attribute:: ENCODING = 'utf-8'
+
+ Encoding of the send and received data.
+
.. attribute:: UNICODE_HANDLING = 'replace'
+ Unicode error handly policy.
+
.. method:: handle_packet(packet)
+ :param bytes packet: a packet as defined by ``TERMINATOR``
+
+ In this case it will be a line, calls :meth:`handle_line` after applying
+ the :attr:`ENCODING`.
+
.. method:: handle_line(line)
:param str line: Unicode string with one line (excluding line terminator)