From 5ac8cc2bb8ac04f71965bfc96a7a579ce45e56b1 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Sat, 27 Jul 2024 23:25:27 -0700 Subject: [PATCH 01/16] Add index to variable value and pydm gui --- python/pyrogue/_Variable.py | 10 ++++++---- python/pyrogue/pydm/data_plugins/rogue_plugin.py | 15 ++++++++------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/python/pyrogue/_Variable.py b/python/pyrogue/_Variable.py index da677000b..28c4b3f11 100644 --- a/python/pyrogue/_Variable.py +++ b/python/pyrogue/_Variable.py @@ -127,8 +127,8 @@ def varUpdate(self,path,varValue): class VariableValue(object): """ """ - def __init__(self, var, read=False): - self.value = var.get(read=read) + def __init__(self, var, read=False, index=-1): + self.value = var.get(read=read,index=index) self.valueDisp = var.genDisp(self.value) self.disp = var.disp self.enum = var.enum @@ -572,7 +572,7 @@ def write(self, *, verify=True, check=True): pass @pr.expose - def getVariableValue(self,read=True): + def getVariableValue(self,read=True,index=-1): """ Return the value after performing a read from hardware if applicable. Hardware read is blocking. An error will result in a logged exception. @@ -582,6 +582,8 @@ def getVariableValue(self,read=True): ---------- read : bool (Default value = True) + index : int + (Default value = -1) Returns ------- @@ -590,7 +592,7 @@ def getVariableValue(self,read=True): Listeners will be informed of the update. """ - return VariableValue(self,read=read) + return VariableValue(self,read=read,index=index) @pr.expose def value(self, index=-1): diff --git a/python/pyrogue/pydm/data_plugins/rogue_plugin.py b/python/pyrogue/pydm/data_plugins/rogue_plugin.py index 14ef8a0da..fca1bd95a 100644 --- a/python/pyrogue/pydm/data_plugins/rogue_plugin.py +++ b/python/pyrogue/pydm/data_plugins/rogue_plugin.py @@ -33,10 +33,10 @@ def parseAddress(address): - # "rogue://index//" + # "rogue://index///" # or - # "rogue://host:port//" - # Mode: 'Value', 'Disp', 'Name' or 'Path' + # "rogue://host:port///" + # Mode: 'value', 'disp', 'name' or 'path' envList = os.getenv('ROGUE_SERVERS') if envList is None: @@ -58,12 +58,13 @@ def parseAddress(address): port = int(data_server[1]) path = data[1] mode = 'value' if (len(data) < 3) else data[2] + index = -1 if (len(data) < 4) else int(data[3]) - return (host,port,path,mode) + return (host,port,path,mode,index) def nodeFromAddress(address): - host, port, path, mode = parseAddress(address) + host, port, path, mode, index = parseAddress(address) client = VirtualClient(host, port) return client.root.getNode(path) @@ -75,7 +76,7 @@ def __init__(self, channel, address, protocol=None, parent=None): self.app = QApplication.instance() - self._host, self._port, self._path, self._mode = parseAddress(channel.address) + self._host, self._port, self._path, self._mode, self._index = parseAddress(channel.address) self._cmd = False self._int = False @@ -204,7 +205,7 @@ def add_listener(self, channel): self.new_value_signal[str].emit(self._node.path) else: self.write_access_signal.emit(self._cmd or self._node.mode!='RO') - self._updateVariable(self._node.path,self._node.getVariableValue(read=False)) + self._updateVariable(self._node.path,self._node.getVariableValue(read=False, index=self._index)) else: self.new_value_signal[str].emit(self._node.name) From 18f3cf39c5d4bc1abb1500ca1fee2fdb13717ffd Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Wed, 31 Jul 2024 09:39:50 -0700 Subject: [PATCH 02/16] Fix block alignment --- src/rogue/interfaces/memory/Block.cpp | 5 ++++- src/rogue/interfaces/memory/Variable.cpp | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index f7f517f44..f327805ac 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -511,7 +511,7 @@ void rim::Block::addVariables(std::vector variables) { (*vit)->verifyEn_); } - // List variables + // List variables } else { for (x = 0; x < (*vit)->numValues_; x++) { // Variable allows overlaps, add to overlap enable mask @@ -520,6 +520,9 @@ void rim::Block::addVariables(std::vector variables) { // Otherwise add to exclusive mask and check for existing mapping } else { + + printf("Overlap Check size = %i, index = %i, base = %i, bits = %i\n", size_, x, x * (*vit)->valueStride_ + (*vit)->bitOffset_[0], (*vit)->valueBits_); + if (anyBits(excMask, x * (*vit)->valueStride_ + (*vit)->bitOffset_[0], (*vit)->valueBits_)) throw(rogue::GeneralError::create( "Block::addVariables", diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index 4661dd20b..4b4c356a2 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -470,7 +470,7 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { highTranByte_[0] = varBytes_ - 1; staleHighByte_ = highTranByte_[0]; - // List variable + // List variable } else { for (x = 0; x < numValues_; x++) { lowTranByte_[x] = @@ -484,10 +484,11 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { (static_cast(minSize) * 8.0))) * minSize - 1; + printf("Idx = %i, low = %i, high = %i\n", x, lowTranByte_[x], highTranByte_[x]); } // Compute total bit range of accessed bytes - varBytes_ = highTranByte_[numValues_ - 1] - lowTranByte_[0] + 1; + varBytes_ = highTranByte_[numValues_ - 1]; staleHighByte_ = highTranByte_[numValues_ - 1]; } From df8e60e73a1a08a1fdf1def6b8da7c81f7d0fc08 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Wed, 31 Jul 2024 09:50:13 -0700 Subject: [PATCH 03/16] Remove debug statement --- src/rogue/interfaces/memory/Block.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index f327805ac..d2182ca90 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -521,8 +521,6 @@ void rim::Block::addVariables(std::vector variables) { // Otherwise add to exclusive mask and check for existing mapping } else { - printf("Overlap Check size = %i, index = %i, base = %i, bits = %i\n", size_, x, x * (*vit)->valueStride_ + (*vit)->bitOffset_[0], (*vit)->valueBits_); - if (anyBits(excMask, x * (*vit)->valueStride_ + (*vit)->bitOffset_[0], (*vit)->valueBits_)) throw(rogue::GeneralError::create( "Block::addVariables", From 2d9b9505c7454067a9c9296ab9c962c5b9f30db3 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Wed, 31 Jul 2024 09:50:40 -0700 Subject: [PATCH 04/16] Remove debug statement --- src/rogue/interfaces/memory/Variable.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index 4b4c356a2..1a40ff295 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -484,7 +484,6 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { (static_cast(minSize) * 8.0))) * minSize - 1; - printf("Idx = %i, low = %i, high = %i\n", x, lowTranByte_[x], highTranByte_[x]); } // Compute total bit range of accessed bytes From fccd47503fb006449d9dd08f7be9e7fa49aea68b Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Wed, 31 Jul 2024 09:55:08 -0700 Subject: [PATCH 05/16] Add set index --- python/pyrogue/pydm/data_plugins/rogue_plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyrogue/pydm/data_plugins/rogue_plugin.py b/python/pyrogue/pydm/data_plugins/rogue_plugin.py index fca1bd95a..17786ad59 100644 --- a/python/pyrogue/pydm/data_plugins/rogue_plugin.py +++ b/python/pyrogue/pydm/data_plugins/rogue_plugin.py @@ -154,7 +154,7 @@ def put_value(self, new_value): if self._cmd: self._node.__call__(val) else: - self._node.setDisp(val) + self._node.setDisp(val,index=self._index) def add_listener(self, channel): From 2d0f34ff58ee04ce6d26a4ee86db5c10e161d3e0 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Wed, 31 Jul 2024 11:04:07 -0700 Subject: [PATCH 06/16] Fix update value --- conda.yml | 1 + .../pyrogue/pydm/data_plugins/rogue_plugin.py | 4 ++++ .../pydm/examples/rogue_plugin_test.ui | 23 +++++++++++++++---- .../pyrogue/pydm/tools/generic_file_tool.py | 2 +- python/pyrogue/pydm/tools/node_info_tool.py | 2 +- python/pyrogue/pydm/tools/read_node_tool.py | 2 +- .../pyrogue/pydm/tools/read_recursive_tool.py | 2 +- python/pyrogue/pydm/tools/write_node_tool.py | 2 +- .../pydm/tools/write_recursive_tool.py | 2 +- 9 files changed, 30 insertions(+), 10 deletions(-) diff --git a/conda.yml b/conda.yml index 9c1831db5..f7ea8c9f8 100644 --- a/conda.yml +++ b/conda.yml @@ -27,3 +27,4 @@ dependencies: - matplotlib - pytest - pytest-cov + - pyqt=5.12 diff --git a/python/pyrogue/pydm/data_plugins/rogue_plugin.py b/python/pyrogue/pydm/data_plugins/rogue_plugin.py index 17786ad59..a48156caf 100644 --- a/python/pyrogue/pydm/data_plugins/rogue_plugin.py +++ b/python/pyrogue/pydm/data_plugins/rogue_plugin.py @@ -115,6 +115,10 @@ def linkState(self, state): def _updateVariable(self,path,varValue): + + if self._index != -1: + varValue = self._node.getVariableValue(read=False, index=self._index) + if self._mode == 'name': self.new_value_signal[str].emit(self._node.name) elif self._mode == 'path': diff --git a/python/pyrogue/pydm/examples/rogue_plugin_test.ui b/python/pyrogue/pydm/examples/rogue_plugin_test.ui index 2d572a956..0e6be3dcb 100644 --- a/python/pyrogue/pydm/examples/rogue_plugin_test.ui +++ b/python/pyrogue/pydm/examples/rogue_plugin_test.ui @@ -19,7 +19,7 @@ - 4 + 0 @@ -34,6 +34,16 @@ + + + + + + + rogue://0/root.AxiVersion.TestListA/disp/3 + + + @@ -105,7 +115,7 @@ - {"name": "Axis 1", "orientation": "left", "label": "Test Plot Scatter", "minRange": -1.0, "maxRange": 1.0, "autoRange": true, "logMode": false} + {"name": "Axis 1", "orientation": "left", "label": "Test Plot Scatter", "minRange": -1.04, "maxRange": 1.04, "autoRange": true, "logMode": false} @@ -125,7 +135,7 @@ - {"name": "Axis 1", "orientation": "left", "label": "Test Plot Time", "minRange": -1.0, "maxRange": 1.0, "autoRange": true, "logMode": null} + {"name": "Axis 1", "orientation": "left", "label": "Test Plot Time", "minRange": -1.04, "maxRange": 1.04, "autoRange": true, "logMode": null} @@ -151,7 +161,7 @@ - {"name": "Axis 1", "orientation": "left", "label": "Test Array Waveform", "minRange": -1.0, "maxRange": 1.0, "autoRange": true, "logMode": false} + {"name": "Axis 1", "orientation": "left", "label": "Test Array Waveform", "minRange": -1.04, "maxRange": 1.04, "autoRange": true, "logMode": false} @@ -298,6 +308,11 @@
pydm.widgets.frame
1 + + PyDMLineEdit + QLineEdit +
pydm.widgets.line_edit
+
diff --git a/python/pyrogue/pydm/tools/generic_file_tool.py b/python/pyrogue/pydm/tools/generic_file_tool.py index 42df13c1d..259eaf19b 100644 --- a/python/pyrogue/pydm/tools/generic_file_tool.py +++ b/python/pyrogue/pydm/tools/generic_file_tool.py @@ -41,7 +41,7 @@ def __init__(self,save=False): ExternalTool.__init__(self, icon=icon, name=name, group=group, use_with_widgets=use_with_widgets) def call(self, channels, sender): - addr, port, path, mode = parseAddress(channels[0].address) + addr, port, path, mode, index = parseAddress(channels[0].address) self._client = VirtualClient(addr, port) node = self._client.root.getNode(path) diff --git a/python/pyrogue/pydm/tools/node_info_tool.py b/python/pyrogue/pydm/tools/node_info_tool.py index 02ecf5e36..5b83534ea 100644 --- a/python/pyrogue/pydm/tools/node_info_tool.py +++ b/python/pyrogue/pydm/tools/node_info_tool.py @@ -36,7 +36,7 @@ def __init__(self): ExternalTool.__init__(self, icon=icon, name=name, group=group, use_with_widgets=use_with_widgets) def call(self, channels, sender): - addr, port, path, mode = parseAddress(channels[0].address) + addr, port, path, mode, index = parseAddress(channels[0].address) self._client = VirtualClient(addr, port) node = self._client.root.getNode(path) diff --git a/python/pyrogue/pydm/tools/read_node_tool.py b/python/pyrogue/pydm/tools/read_node_tool.py index 15a384794..349145969 100644 --- a/python/pyrogue/pydm/tools/read_node_tool.py +++ b/python/pyrogue/pydm/tools/read_node_tool.py @@ -34,7 +34,7 @@ def __init__(self): ExternalTool.__init__(self, icon=icon, name=name, group=group, use_with_widgets=use_with_widgets) def call(self, channels, sender): - addr, port, path, mode = parseAddress(channels[0].address) + addr, port, path, mode, index = parseAddress(channels[0].address) self._client = VirtualClient(addr, port) node = self._client.root.getNode(path) diff --git a/python/pyrogue/pydm/tools/read_recursive_tool.py b/python/pyrogue/pydm/tools/read_recursive_tool.py index 6f429d3d9..feb6fd76f 100644 --- a/python/pyrogue/pydm/tools/read_recursive_tool.py +++ b/python/pyrogue/pydm/tools/read_recursive_tool.py @@ -34,7 +34,7 @@ def __init__(self): ExternalTool.__init__(self, icon=icon, name=name, group=group, use_with_widgets=use_with_widgets) def call(self, channels, sender): - addr, port, path, mode = parseAddress(channels[0].address) + addr, port, path, mode, index = parseAddress(channels[0].address) self._client = VirtualClient(addr, port) node = self._client.root.getNode(path) diff --git a/python/pyrogue/pydm/tools/write_node_tool.py b/python/pyrogue/pydm/tools/write_node_tool.py index 1c828bd26..25fda74bd 100644 --- a/python/pyrogue/pydm/tools/write_node_tool.py +++ b/python/pyrogue/pydm/tools/write_node_tool.py @@ -34,7 +34,7 @@ def __init__(self): ExternalTool.__init__(self, icon=icon, name=name, group=group, use_with_widgets=use_with_widgets) def call(self, channels, sender): - addr, port, path, mode = parseAddress(channels[0].address) + addr, port, path, mode, index = parseAddress(channels[0].address) self._client = VirtualClient(addr, port) node = self._client.root.getNode(path) diff --git a/python/pyrogue/pydm/tools/write_recursive_tool.py b/python/pyrogue/pydm/tools/write_recursive_tool.py index 382a07896..06f460d59 100644 --- a/python/pyrogue/pydm/tools/write_recursive_tool.py +++ b/python/pyrogue/pydm/tools/write_recursive_tool.py @@ -33,7 +33,7 @@ def __init__(self): ExternalTool.__init__(self, icon=icon, name=name, group=group, use_with_widgets=use_with_widgets) def call(self, channels, sender): - addr, port, path, mode = parseAddress(channels[0].address) + addr, port, path, mode, index = parseAddress(channels[0].address) self._client = VirtualClient(addr, port) node = self._client.root.getNode(path) From bc0b026e60132b48de6422d250d0541835c75c17 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Wed, 31 Jul 2024 11:08:20 -0700 Subject: [PATCH 07/16] Fix changes to test ui --- python/pyrogue/pydm/examples/rogue_plugin_test.ui | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/python/pyrogue/pydm/examples/rogue_plugin_test.ui b/python/pyrogue/pydm/examples/rogue_plugin_test.ui index 0e6be3dcb..2ddcfc6e5 100644 --- a/python/pyrogue/pydm/examples/rogue_plugin_test.ui +++ b/python/pyrogue/pydm/examples/rogue_plugin_test.ui @@ -34,16 +34,6 @@ - - - - - - - rogue://0/root.AxiVersion.TestListA/disp/3 - - - @@ -308,11 +298,6 @@
pydm.widgets.frame
1 - - PyDMLineEdit - QLineEdit -
pydm.widgets.line_edit
-
From 460382d65936a6f268773820a24204a78e799dce Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Wed, 31 Jul 2024 11:16:27 -0700 Subject: [PATCH 08/16] Fix linter area --- src/rogue/interfaces/memory/Block.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index d2182ca90..2c81292ea 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -518,9 +518,8 @@ void rim::Block::addVariables(std::vector variables) { if ((*vit)->overlapEn_) { setBits(oleMask, x * (*vit)->valueStride_ + (*vit)->bitOffset_[0], (*vit)->valueBits_); - // Otherwise add to exclusive mask and check for existing mapping + // Otherwise add to exclusive mask and check for existing mapping } else { - if (anyBits(excMask, x * (*vit)->valueStride_ + (*vit)->bitOffset_[0], (*vit)->valueBits_)) throw(rogue::GeneralError::create( "Block::addVariables", From 1de28071adce87efd64da4420062e9234b307b33 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Wed, 31 Jul 2024 11:43:15 -0700 Subject: [PATCH 09/16] Fix block size calculation --- src/rogue/interfaces/memory/Variable.cpp | 2 +- tests/test_list_memory.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index 1a40ff295..3bb928625 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -487,7 +487,7 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { } // Compute total bit range of accessed bytes - varBytes_ = highTranByte_[numValues_ - 1]; + varBytes_ = highTranByte_[numValues_ - 1] + 1; staleHighByte_ = highTranByte_[numValues_ - 1]; } diff --git a/tests/test_list_memory.py b/tests/test_list_memory.py index 68baae441..da5cb7aca 100644 --- a/tests/test_list_memory.py +++ b/tests/test_list_memory.py @@ -16,7 +16,7 @@ import numpy as np import random -#rogue.Logging.setLevel(rogue.Logging.Warning) +rogue.Logging.setLevel(rogue.Logging.Debug) #import logging #logger = logging.getLogger('pyrogue') #logger.setLevel(logging.DEBUG) From 84181435623fe04dd4041739ed9f082fe195aac1 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Wed, 31 Jul 2024 12:15:35 -0700 Subject: [PATCH 10/16] Fix logging --- tests/test_list_memory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_list_memory.py b/tests/test_list_memory.py index da5cb7aca..8e4c80e2e 100644 --- a/tests/test_list_memory.py +++ b/tests/test_list_memory.py @@ -16,7 +16,7 @@ import numpy as np import random -rogue.Logging.setLevel(rogue.Logging.Debug) +#rogue.Logging.setLevel(rogue.Logging.Debug) #import logging #logger = logging.getLogger('pyrogue') #logger.setLevel(logging.DEBUG) From 820cd5e55e7fc2ddc807645e022ef47354ec1999 Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Fri, 9 Aug 2024 11:08:42 -0700 Subject: [PATCH 11/16] Update template --- templates/RogueConfig.cmake.in | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/templates/RogueConfig.cmake.in b/templates/RogueConfig.cmake.in index 70091becf..6d891b227 100644 --- a/templates/RogueConfig.cmake.in +++ b/templates/RogueConfig.cmake.in @@ -26,8 +26,9 @@ set(NO_PYTHON @NO_PYTHON@) # Boost + Python ##################################### if ( NOT NO_PYTHON ) - # Search for newest version of Python3 first - set(Python3_FIND_STRATEGY "VERSION") + + # Find newest python interpreter first + set(Python3_FIND_STRATEGY "LOCATION") find_package(Python3 QUIET REQUIRED COMPONENTS Interpreter Development) # Find Numpy @@ -49,10 +50,6 @@ if ( NOT NO_PYTHON ) # Hint for boost on anaconda if (DEFINED ENV{CONDA_PREFIX}) set(Boost_ROOT $ENV{CONDA_PREFIX}) - - # SLAC AFS custom path - elseif (DEFINED ENV{BOOST_PATH}) - set(Boost_ROOT $ENV{BOOST_PATH}) endif() # libboost_python3.7 style libraries @@ -88,6 +85,7 @@ if ( NOT NO_PYTHON ) message("") message(FATAL_ERROR "Failed to find boost libraries!") endif() + else() add_definitions( -DNO_PYTHON ) endif() From 28533bddce0a39acff160da58c53f6d37119b122 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 16 Aug 2024 08:10:59 -0700 Subject: [PATCH 12/16] Update petalinux.rst ### Description - Updating instructions for rogue v6.4.0 --- docs/src/installing/petalinux.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/installing/petalinux.rst b/docs/src/installing/petalinux.rst index c32f68df3..0a406ac7e 100644 --- a/docs/src/installing/petalinux.rst +++ b/docs/src/installing/petalinux.rst @@ -18,8 +18,8 @@ You will want to replace the file project-spec/meta-user/recipes-apps/rogue/rogu .. code:: - ROGUE_VERSION = "6.1.4" - ROGUE_MD5SUM = "659c7f5c894f6915e2bd15f922cdab3b" + ROGUE_VERSION = "6.4.0" + ROGUE_MD5SUM = "acbd2b178af84776efbd78cdf3f5db7d" SUMMARY = "Recipe to build Rogue" HOMEPAGE ="https://github.com/slaclab/rogue" @@ -84,14 +84,14 @@ You will want to replace the file project-spec/meta-user/recipes-apps/rogue/rogu install -m 0755 ${S}/python/rogue.so ${D}${PYTHON_SITEPACKAGES_DIR} } -Update the ROGUE_VERSION line for an updated version when appropriate (min version is 6.1.3). You will need to first download the tar.gz file and compute the MD5SUM using the following commands if you update the ROGUE_VERSION line: +Update the ROGUE_VERSION line for an updated version when appropriate. You will need to first download the tar.gz file and compute the MD5SUM using the following commands if you update the ROGUE_VERSION line: .. code:: > wget https://github.com/slaclab/rogue/archive/vx.x.x.tar.gz > md5sum vx.x.x.tar.gz -If your rogue application requires additional python libraries you can add them to the DEPENDS += line in the above text. +RDEPENDS is the Runtime Dependencies. If your rogue application requires additional python libraries you can add them to the RDEPENDS += line in the above text. To enable compilation and installation of the rogue package in your petalinux project execute the following command: From 7d23cc19b14b5faf2936b0ef8ada3cdc1cb47d8a Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Fri, 16 Aug 2024 19:48:09 -0700 Subject: [PATCH 13/16] Fixed segment size calculation --- python/pyrogue/protocols/_Network.py | 4 ++-- src/rogue/protocols/udp/Client.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/pyrogue/protocols/_Network.py b/python/pyrogue/protocols/_Network.py index 977b40f5b..83d475c81 100644 --- a/python/pyrogue/protocols/_Network.py +++ b/python/pyrogue/protocols/_Network.py @@ -28,10 +28,10 @@ def __init__(self,*, port, host='127.0.0.1', jumbo=False, wait=True, packVer=1, if server: self._udp = rogue.protocols.udp.Server(port,jumbo) - self._rssi = rogue.protocols.rssi.Server(self._udp.maxPayload()) + self._rssi = rogue.protocols.rssi.Server(self._udp.maxPayload()-8) else: self._udp = rogue.protocols.udp.Client(host,port,jumbo) - self._rssi = rogue.protocols.rssi.Client(self._udp.maxPayload()) + self._rssi = rogue.protocols.rssi.Client(self._udp.maxPayload()-8) if packVer == 2: self._pack = rogue.protocols.packetizer.CoreV2(False,True,enSsi) # ibCRC = False, obCRC = True diff --git a/src/rogue/protocols/udp/Client.cpp b/src/rogue/protocols/udp/Client.cpp index 0030ac77b..3dc2b6c6c 100644 --- a/src/rogue/protocols/udp/Client.cpp +++ b/src/rogue/protocols/udp/Client.cpp @@ -202,7 +202,7 @@ void rpu::Client::runThread(std::weak_ptr lockPtr) { if (res > 0) { // Message was too big if (res > avail) { - udpLog_->warning("Receive data was too large. Dropping."); + udpLog_->warning("Receive data was too large. Rx=%i, avail=%i Dropping.",res,avail); } else { buff->setPayload(res); sendFrame(frame); From 38f9833bb9795ad85886a5d2074c02bc8ba0da9e Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Fri, 16 Aug 2024 19:56:11 -0700 Subject: [PATCH 14/16] Fix linter error --- src/rogue/protocols/udp/Client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rogue/protocols/udp/Client.cpp b/src/rogue/protocols/udp/Client.cpp index 3dc2b6c6c..f5a88c2a4 100644 --- a/src/rogue/protocols/udp/Client.cpp +++ b/src/rogue/protocols/udp/Client.cpp @@ -202,7 +202,7 @@ void rpu::Client::runThread(std::weak_ptr lockPtr) { if (res > 0) { // Message was too big if (res > avail) { - udpLog_->warning("Receive data was too large. Rx=%i, avail=%i Dropping.",res,avail); + udpLog_->warning("Receive data was too large. Rx=%i, avail=%i Dropping.", res, avail); } else { buff->setPayload(res); sendFrame(frame); From f4962990c9ca80ca70c6787a9f424a7e13a65574 Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Tue, 27 Aug 2024 12:40:18 -0700 Subject: [PATCH 15/16] Make status variable read-only --- python/pyrogue/_DataReceiver.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/pyrogue/_DataReceiver.py b/python/pyrogue/_DataReceiver.py index 07a3ea733..833f3f5fe 100644 --- a/python/pyrogue/_DataReceiver.py +++ b/python/pyrogue/_DataReceiver.py @@ -38,27 +38,31 @@ def __init__(self, self.add(pr.LocalVariable(name='FrameCount', value=0, + mode = 'RO', pollInterval=1, description='Frame Rx Counter')) self.add(pr.LocalVariable(name='ErrorCount', value=0, + mode = 'RO', pollInterval=1, description='Frame Error Counter')) self.add(pr.LocalVariable(name='ByteCount', value=0, + mode = 'RO', pollInterval=1, description='Byte Rx Counter')) self.add(pr.LocalVariable(name='Updated', value=False, + mode = 'RO', description='Data has been updated flag')) self.add(pr.LocalVariable(name='Data', typeStr=typeStr, disp='', - groups=['NoState','NoStream'], + groups=['NoState','NoStream', 'NoConfig'], value=value, hidden=hideData, description='Data Frame Container')) From df042a19081fcf07fd54af10a4ca7433ea36e3bd Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Wed, 28 Aug 2024 10:36:10 -0700 Subject: [PATCH 16/16] whitespace removal --- python/pyrogue/_DataReceiver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyrogue/_DataReceiver.py b/python/pyrogue/_DataReceiver.py index 833f3f5fe..9bb431c62 100644 --- a/python/pyrogue/_DataReceiver.py +++ b/python/pyrogue/_DataReceiver.py @@ -56,7 +56,7 @@ def __init__(self, self.add(pr.LocalVariable(name='Updated', value=False, - mode = 'RO', + mode = 'RO', description='Data has been updated flag')) self.add(pr.LocalVariable(name='Data',