Skip to content

Commit

Permalink
documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
varkenvarken committed Jul 9, 2022
1 parent 7b4d13b commit 2031bc0
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions pylnlib/Interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# License: GPL 3, see file LICENSE
#
# Version: 20220629202609
# Version: 20220709155819

import signal
import sys
Expand All @@ -19,8 +19,27 @@


class Interface:
def __init__(self, port, baud=57600, fast=False, dummy=False):
"""
Handles thread safe sending and receiving LocoNet messages on a serial interface.
It will gracefully exit if it receives a SIGINT or SIGTERM signal.
"""

def __init__(
self, port: str, baud: int = 57600, fast: bool = False, dummy: bool = False
):
"""
Creates an Interface instance.
Args:
port (str): seriall port, on Linux typically something like /dev/ttyACM0
baud (int, optional): the baudrate. Defaults to 57600.
fast (bool, optional): if false it uses timestamp message in the input data to replay a realistic speed. Defaults to False.
dummy (bool, optional): if true it will not write anyhting on the serial port. Defaults to False.
See Also:
[Capture and replay](capture_and_replay)
"""
self.time = None
self.fast = fast
self.dummy = dummy
Expand Down

0 comments on commit 2031bc0

Please sign in to comment.