From a192052b1bc11186af7404eb0b240f9906353cbd Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 5 Jan 2024 18:51:29 -0800 Subject: [PATCH] Update _ClinkDevRoot.py ### Description - Bug fix for rogue v6 --- .../cameralink_gateway/_ClinkDevRoot.py | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/firmware/python/cameralink_gateway/_ClinkDevRoot.py b/firmware/python/cameralink_gateway/_ClinkDevRoot.py index 33ba311..42c1693 100644 --- a/firmware/python/cameralink_gateway/_ClinkDevRoot.py +++ b/firmware/python/cameralink_gateway/_ClinkDevRoot.py @@ -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 @@ -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, @@ -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