Add SocketReader documentation

This commit is contained in:
bremme 2020-12-27 18:58:14 +01:00
parent e12aff5c0d
commit 97786576cf

View File

@ -43,6 +43,25 @@ process because the code is blocking (not asynchronous):
To be documented.
**Socket client**
Read a remote serial port (for example using ser2net) and work with the parsed telegrams.
It should be run in a separate process because the code is blocking (not asynchronous):
.. code-block:: python
from dsmr_parser import telegram_specifications
from dsmr_parser.clients import SocketReader
socket_reader = SocketReader(
host='127.0.0.1',
port=2001,
telegram_specification=telegram_specifications.V4
)
for telegram in socket_reader.read():
print(telegram) # see 'Telegram object' docs below
Parsing module usage
--------------------