Skip to content

Commit

Permalink
Merge pull request #142 from lisazacarias/pv
Browse files Browse the repository at this point in the history
Bringing custom PV signature in line with base PV signature
  • Loading branch information
lisazacarias committed Apr 4, 2024
2 parents 5c901ee + 160447a commit 15bab45
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions lcls_tools/common/controls/pyepics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,29 @@ def __init__(self, message):


class PV(EPICS_PV):
def __init__(self, pvname):
super().__init__(pvname, connection_timeout=0.01)
def __init__(
self,
pvname,
connection_timeout=0.01,
callback=None,
form="time",
verbose=False,
auto_monitor=None,
count=None,
connection_callback=None,
access_callback=None,
):
super().__init__(
pvname=pvname,
connection_timeout=connection_timeout,
callback=callback,
form=form,
verbose=verbose,
auto_monitor=auto_monitor,
count=count,
connection_callback=connection_callback,
access_callback=access_callback,
)

def __str__(self):
return f"{self.pvname} PV Object"
Expand All @@ -37,6 +58,7 @@ def caget(self, count=None, as_string=False, as_numpy=True, use_monitor=True):
as_numpy=as_numpy,
use_monitor=use_monitor,
)

if value is not None:
break
attempt += 1
Expand Down

0 comments on commit 15bab45

Please sign in to comment.