renamed transport funcs

doublebuf
Ondřej Hruška 6 years ago
parent a15c5b6ebe
commit 026ace14ab
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 4
      gex/__init__.py
  2. 4
      gex/transport.py
  3. 4
      main.py

@ -5,8 +5,8 @@ from gex.PayloadParser import PayloadParser
from gex.TinyFrame import TinyFrame, TF_Msg, TF from gex.TinyFrame import TinyFrame, TF_Msg, TF
from gex.Unit import Unit from gex.Unit import Unit
from gex.Client import Client from gex.Client import Client
from gex.transport import RawUSB from gex.transport import TrxRawUSB
from gex.transport import SerialSync from gex.transport import TrxSerialSync
# import all the units # import all the units
from gex.units.DOut import DOut from gex.units.DOut import DOut

@ -38,7 +38,7 @@ class BaseGexTransport:
raise Exception("Not implemented") raise Exception("Not implemented")
class SerialSync (BaseGexTransport): class TrxSerialSync (BaseGexTransport):
""" """
Transport based on pySerial, no async support. Transport based on pySerial, no async support.
Call poll() to receive spontaneous events or responses. Call poll() to receive spontaneous events or responses.
@ -91,7 +91,7 @@ class SerialSync (BaseGexTransport):
self._listener(rv) self._listener(rv)
class RawUSB (BaseGexTransport): class TrxRawUSB (BaseGexTransport):
""" """
pyUSB-based transport with minimal overhead and async IO pyUSB-based transport with minimal overhead and async IO
""" """

@ -2,8 +2,8 @@
import time import time
import gex import gex
transport = gex.RawUSB(sn='0029002F-42365711-32353530') transport = gex.TrxRawUSB(sn='0029002F-42365711-32353530')
#transport = gex.SerialSync(port='/dev/ttyACM0') #transport = gex.TrxSerialSync(port='/dev/ttyACM0')
with gex.Client(transport) as client: with gex.Client(transport) as client:

Loading…
Cancel
Save