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

Update _ClinkDevRoot.py #41

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions firmware/python/cameralink_gateway/_ClinkDevRoot.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(self,
enableConfig = True,
pcieBoardType = None,
enVcMask = 0xD, # Enable lane mask: Don't connect data stream (VC1) by default because intended for C++ process
zmqSrvEn = True, # Flag to include the ZMQ server
**kwargs):

# Set the FEB firmware Version lock = https://github.com/slaclab/cameralink-gateway/blob/master/firmware/targets/shared_version.mk
Expand All @@ -73,12 +74,6 @@ def __init__(self,
for lane in self.laneConfig:
self.defaultFile.append(f'config/{self.laneConfig[lane]}/lane{lane}.yml')

# Check for simulation
if dev == 'sim':
kwargs['timeout'] = 100000000 # 100 s
else:
kwargs['timeout'] = 5000000 # 5 s

# Pass custom value to parent via super function
super().__init__(
dev = dev,
Expand All @@ -87,10 +82,20 @@ def __init__(self,
initRead = initRead,
**kwargs)

# added for rogue6
self.zmqServer = pr.interfaces.ZmqServer(root=self, addr='*', port=0)
self.addInterface(self.zmqServer)
# Add ZMQ server
if zmqSrvEn:
self.zmqServer = pyrogue.interfaces.ZmqServer(root=self, addr='*', port=0)
self.addInterface(self.zmqServer)

# Check for simulation
if dev == 'sim':
# Set the timeout
self._timeout = 100000000 # firmware simulation slow and timeout base on real time (not simulation time)

else:
# Set the timeout
self._timeout = 5000000 # 5.0 seconds default

# Unhide the RemoteVariableDump command
self.RemoteVariableDump.hidden = False

Expand Down