Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

threading.client behaves different from sync.client #9

Open
vstadnytskyi opened this issue Oct 22, 2019 · 0 comments
Open

threading.client behaves different from sync.client #9

vstadnytskyi opened this issue Oct 22, 2019 · 0 comments

Comments

@vstadnytskyi
Copy link
Owner

In [11]: ctx.get_pvs?
timeout : number or None, optional
    Number of seconds before a CaprotoTimeoutError is raised. This
    default can be overridden for any specific operation. By default,
    fall back to the default timeout set by the Context. If None, never
    timeout.
In [8]: RBV, = ctx.get_pvs('NIH:TEMP.RBV', timeout = 20)

Exception in thread search:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/caproto/threading/client.py", line 1113, in _process_search_results_l
oop
    cm = self.get_circuit_manager(address, pv.priority)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/caproto/threading/client.py", line 1161, in get_circuit_manager

    cm = VirtualCircuitManager(self, circuit, self.selector)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/caproto/threading/client.py", line 1313, in __init__
    raise CaprotoTimeoutError(f"Circuit with server at {host}:{port} "
caproto._utils.CaprotoTimeoutError: Circuit with server at 128.231.5.169:5068 did not connect within 2.0-second timeout.
user:T user-13$ caproto-get NIH:TEMP.RBV 
NIH:TEMP.RBV                              [23.403]
user:T user-13$ caproto-get NIH:TEMP.RBV 
NIH:TEMP.RBV                              [23.403]

In [14]: from caproto.sync.client import read

In [15]: read('NIH:TEMP.RBV')
Out[15]: ReadNotifyResponse(data=array([23.40296364]), data_type=<ChannelType.DOUBLE: 6>, data_count=1, status=CAStatusCode(name='ECA_NORMAL', code=0, code
_with_severity=1, severity=<CASeverity.SUCCESS: 1>, success=1, defunct=False, description='Normal successful completion'), ioid=0, metadata=None)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant