46 """ |
46 """ |
47 if not self.__blockReadyRead: |
47 if not self.__blockReadyRead: |
48 data = bytes(self.__serial.readAll()) |
48 data = bytes(self.__serial.readAll()) |
49 self.dataReceived.emit(data) |
49 self.dataReceived.emit(data) |
50 |
50 |
51 @pyqtSlot() |
|
52 def connectToDevice(self, connection): |
51 def connectToDevice(self, connection): |
53 """ |
52 """ |
54 Public slot to connect to the device. |
53 Public method to connect to the device. |
55 |
54 |
56 @param connection name of the connection to be used |
55 @param connection name of the connection to be used |
57 @type str |
56 @type str |
58 @return flag indicating success |
57 @return flag indicating success and an error message |
59 @rtype bool |
58 @rtype tuple of (bool, str) |
60 """ |
59 """ |
61 return self.__serial.openSerialLink(connection) |
60 return self.__serial.openSerialLink(connection) |
62 |
61 |
63 @pyqtSlot() |
62 @pyqtSlot() |
64 def disconnectFromDevice(self): |
63 def disconnectFromDevice(self): |