MCPcopy Create free account
hub / github.com/LabPy/lantz / make_feat

Function make_feat

lantz/drivers/coherent/innova.py:33–46  ·  view source on GitHub ↗
(command, **kwargs)

Source from the content-addressed store, hash-verified

31
32
33def make_feat(command, **kwargs):
34
35 def get(self):
36 return self.query('PRINT {}'.format(command))
37
38 def set(self, value):
39 return self.query('{}={}'.format(command, value))
40
41 if kwargs.pop('readonly', None):
42 return Feat(fget=get, **kwargs)
43 elif kwargs.pop('writeonly', None):
44 return Feat(fset=set, **kwargs)
45
46 return Feat(get, set, **kwargs)
47
48
49class Innova300C(MessageBasedDriver):

Callers 3

Innova300CClass · 0.70
ArgonInnova300CClass · 0.70
KryptonInnova300CClass · 0.70

Calls 1

FeatClass · 0.90

Tested by

no test coverage detected