| Line 94... |
Line 94... |
| 94 |
This decorator has a timeout variable that can be set to change the
|
94 |
This decorator has a timeout variable that can be set to change the
|
| 95 |
device timeout for the duration of the function.
|
95 |
device timeout for the duration of the function.
|
| 96 |
It also adds a "timeout" argument to every function to access this
|
96 |
It also adds a "timeout" argument to every function to access this
|
| 97 |
feature from external. So DON'T EVER use a parameter called 'timeout'
|
97 |
feature from external. So DON'T EVER use a parameter called 'timeout'
|
| 98 |
in your commands. Variables are ok.
|
98 |
in your commands. Variables are ok.
|
| - |
|
99 |
|
| - |
|
100 |
If you want to enable logging please pass a misc.Logger object to the
|
| - |
|
101 |
constructor.
|
| 99 |
"""
|
102 |
"""
|
| 100 |
def __init__(self, loglevel = 2, logtarget = "stdout", logfile = "tools.log"):
|
103 |
def __init__(self, logger = Logger(loglevel = -1)):
|
| 101 |
self.logger = Logger(loglevel, logtarget, logfile)
|
104 |
self.logger = logger
|
| 102 |
self.logger.debug("Initializing Emcore object\n")
|
105 |
self.logger.debug("Initializing Emcore object\n")
|
| 103 |
self.lib = Lib(self.logger)
|
106 |
self.lib = Lib(self.logger)
|
| 104 |
|
107 |
|
| 105 |
self.getversioninfo()
|
108 |
self.getversioninfo()
|
| 106 |
if self.lib.dev.swtypeid != 2:
|
109 |
if self.lib.dev.swtypeid != 2:
|