28 DEFAULT_BAUDRATE = 1000000
74 return self.ser.in_waiting
77 if (sys.version_info > (3, 0)):
78 return self.ser.read(length)
80 return [ord(ch)
for ch
in self.ser.read(length)]
83 return self.ser.write(packet)
101 return round(time.time() * 1000000000) / 1000000.0
114 self.
ser = serial.Serial(
119 bytesize=serial.EIGHTBITS,
125 self.ser.reset_input_buffer()
132 if platform.system() ==
'Darwin':
133 if baudrate
in [9600, 19200, 38400, 57600, 115200]:
138 if baudrate
in [9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000, 576000, 921600, 1000000, 1152000,
139 2000000, 2500000, 3000000, 3500000, 4000000]:
def setPortName(self, port_name)
def writePort(self, packet)
def isPacketTimeout(self)
def getBytesAvailable(self)
def setBaudRate(self, baudrate)
def __init__(self, port_name)
def setPacketTimeout(self, packet_length)
def setPacketTimeoutMillis(self, msec)
def readPort(self, length)
def getTimeSinceStart(self)
def setupPort(self, cflag_baud)
def getCFlagBaud(self, baudrate)