-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9f61e1b
commit 5ae354c
Showing
5 changed files
with
54 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from cothread.catools import caget, caput | ||
|
||
|
||
class callback_set(object): | ||
def __init__(self, output): | ||
self.output = output | ||
|
||
def callback(self, value, index=None): | ||
for record in self.output: | ||
record.set(value) | ||
|
||
|
||
class callback_refresh(object): | ||
def __init__(self, server, output_pv): | ||
self.server = server | ||
self.output_pv = output_pv | ||
|
||
def callback(self, value, index=None): | ||
self.server.refresh_record(self.output_pv) | ||
|
||
|
||
class caget_mask(object): | ||
def __init__(self, pv): | ||
self.pv = pv | ||
|
||
def get(self): | ||
return caget(self.pv) | ||
|
||
|
||
class caput_mask(object): | ||
def __init__(self, pv): | ||
self.pv = pv | ||
|
||
def set(self, value): | ||
return caput(self.pv, value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
numpy>=1.10 | ||
scipy>=0.16 | ||
pytest>=2.9 | ||
cothread | ||
pytest-cov | ||
coveralls | ||
mock | ||
flake8 | ||
sphinx | ||
sphinx-rtd-theme | ||
cothread |