-
Notifications
You must be signed in to change notification settings - Fork 76
/
_dummy_shim.py
59 lines (36 loc) · 929 Bytes
/
_dummy_shim.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import threading
class DummyDispatcherThreadContext:
dispatcher = None
event_type = None
event_thread = None
def run(self, *args, **kwargs):
...
__call__ = run
class DummyDispatcher:
context = None
logger = None
stop_event = None
timeout = 0.1
threads = {}
def stop(self):
...
def schedule_utility_task(self, callback, *args, **kwargs):
...
def get_thread_context(self, name):
return DummyDispatcherThreadContext()
thread_class = threading.Thread
pv_form = 'time'
name = 'dummy'
_dispatcher = DummyDispatcher()
def setup(logger):
...
def caget(*args, **kwargs):
raise NotImplementedError
def caput(*args, **kwargs):
raise NotImplementedError
def get_pv(*args, **kwargs):
raise NotImplementedError
def release_pvs(*args, **kwargs):
raise NotImplementedError
def get_dispatcher():
return _dispatcher