Connect()

From SweepMe! Wiki
Revision as of 20:19, 11 July 2018 by Afischer (talk | contribs) (Created page with "The function connect can be added to any Device Class: {{syntaxhighlight|lang=python|code= def connect(self): # do something }} This function will be called at the beg...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The function connect can be added to any Device Class:

def connect(self):
   # do something

This function will be called at the beginning of each measurement. It is intended to be used to make everything ready for further communication with the device. In case, you use the PortManager there is no need to use this function. Otherwise, you can create your own object to here to communicate with your device.