Lines Matching refs:serial

62 from serial.serialutil import *
910 self.serial = serial_port
978 (self.serial.getCTS() and MODEMSTATE_MASK_CTS) |
979 (self.serial.getDSR() and MODEMSTATE_MASK_DSR) |
980 (self.serial.getRI() and MODEMSTATE_MASK_RI) |
981 (self.serial.getCD() and MODEMSTATE_MASK_CD)
1118 backup = self.serial.baudrate
1122 self.serial.baudrate = baudrate
1126 self.serial.baudrate = backup
1129 … self.logger.info("%s baud rate: %s" % (baudrate and 'set' or 'get', self.serial.baudrate))
1130 … self.rfc2217SendSubnegotiation(SERVER_SET_BAUDRATE, struct.pack("!I", self.serial.baudrate))
1132 backup = self.serial.bytesize
1136 self.serial.bytesize = datasize
1140 self.serial.bytesize = backup
1143 … self.logger.info("%s data size: %s" % (datasize and 'set' or 'get', self.serial.bytesize))
1144 … self.rfc2217SendSubnegotiation(SERVER_SET_DATASIZE, struct.pack("!B", self.serial.bytesize))
1146 backup = self.serial.parity
1150 self.serial.parity = RFC2217_REVERSE_PARITY_MAP[parity]
1154 self.serial.parity = backup
1157 … self.logger.info("%s parity: %s" % (parity and 'set' or 'get', self.serial.parity))
1160 struct.pack("!B", RFC2217_PARITY_MAP[self.serial.parity])
1163 backup = self.serial.stopbits
1167 self.serial.stopbits = RFC2217_REVERSE_STOPBIT_MAP[stopbits]
1171 self.serial.stopbits = backup
1174 … self.logger.info("%s stop bits: %s" % (stopbits and 'set' or 'get', self.serial.stopbits))
1177 struct.pack("!B", RFC2217_STOPBIT_MAP[self.serial.stopbits])
1181 if self.serial.xonxoff:
1183 elif self.serial.rtscts:
1188 self.serial.xonxoff = False
1189 self.serial.rtscts = False
1194 self.serial.xonxoff = True
1199 self.serial.rtscts = True
1208 self.serial.setBreak(True)
1213 self.serial.setBreak(False)
1222 self.serial.setDTR(True)
1227 self.serial.setDTR(False)
1237 self.serial.setRTS(True)
1242 self.serial.setRTS(False)
1282 self.serial.flushInput()
1287 self.serial.flushOutput()
1292 self.serial.flushInput()
1293 self.serial.flushOutput()