renamed transport funcs
This commit is contained in:
+2
-2
@@ -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
|
||||||
|
|||||||
+2
-2
@@ -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:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user