From 026ace14ab391f0045c1f5a38fd1010231577c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sun, 28 Jan 2018 15:46:13 +0100 Subject: [PATCH] renamed transport funcs --- gex/__init__.py | 4 ++-- gex/transport.py | 4 ++-- main.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gex/__init__.py b/gex/__init__.py index dab04a1..5c45986 100644 --- a/gex/__init__.py +++ b/gex/__init__.py @@ -5,8 +5,8 @@ from gex.PayloadParser import PayloadParser from gex.TinyFrame import TinyFrame, TF_Msg, TF from gex.Unit import Unit from gex.Client import Client -from gex.transport import RawUSB -from gex.transport import SerialSync +from gex.transport import TrxRawUSB +from gex.transport import TrxSerialSync # import all the units from gex.units.DOut import DOut diff --git a/gex/transport.py b/gex/transport.py index 2378942..8c2000d 100644 --- a/gex/transport.py +++ b/gex/transport.py @@ -38,7 +38,7 @@ class BaseGexTransport: raise Exception("Not implemented") -class SerialSync (BaseGexTransport): +class TrxSerialSync (BaseGexTransport): """ Transport based on pySerial, no async support. Call poll() to receive spontaneous events or responses. @@ -91,7 +91,7 @@ class SerialSync (BaseGexTransport): self._listener(rv) -class RawUSB (BaseGexTransport): +class TrxRawUSB (BaseGexTransport): """ pyUSB-based transport with minimal overhead and async IO """ diff --git a/main.py b/main.py index 16ef46a..c6229ce 100644 --- a/main.py +++ b/main.py @@ -2,8 +2,8 @@ import time import gex -transport = gex.RawUSB(sn='0029002F-42365711-32353530') -#transport = gex.SerialSync(port='/dev/ttyACM0') +transport = gex.TrxRawUSB(sn='0029002F-42365711-32353530') +#transport = gex.TrxSerialSync(port='/dev/ttyACM0') with gex.Client(transport) as client: