src/eric7/MicroPython/MicroPythonDeviceInterface.py

branch
eric7
changeset 10229
e50bbf250343
parent 10012
d649d500a9a1
child 10439
21c28b0f9e41
equal deleted inserted replaced
10228:74c6150aa745 10229:e50bbf250343
35 @param parent reference to the parent object 35 @param parent reference to the parent object
36 @type QObject 36 @type QObject
37 """ 37 """
38 super().__init__(parent) 38 super().__init__(parent)
39 39
40 @pyqtSlot()
41 def connectToDevice(self, connection): 40 def connectToDevice(self, connection):
42 """ 41 """
43 Public slot to connect to the device. 42 Public method to connect to the device.
44 43
45 @param connection name of the connection to be used 44 @param connection name of the connection to be used
46 @type str 45 @type str
47 @return flag indicating success 46 @return flag indicating success and an error message
48 @rtype bool 47 @rtype tuple of (bool, str)
49 @exception NotImplementedError raised to indicate that this method needs to 48 @exception NotImplementedError raised to indicate that this method needs to
50 be implemented in a derived class 49 be implemented in a derived class
51 """ 50 """
52 raise NotImplementedError( 51 raise NotImplementedError(
53 "This method needs to be implemented in a derived class." 52 "This method needs to be implemented in a derived class."
54 ) 53 )
55 54
56 return False 55 return False, ""
57 56
58 @pyqtSlot() 57 @pyqtSlot()
59 def disconnectFromDevice(self): 58 def disconnectFromDevice(self):
60 """ 59 """
61 Public slot to disconnect from the device. 60 Public slot to disconnect from the device.

eric ide

mercurial