From 1b652354b555afcc7d5029df7b1ed82064ac40e1 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Thu, 27 Jun 2024 15:25:13 -0700 Subject: [PATCH 01/41] updating docker and conda to source reusable YAML CI scripts --- .github/workflows/rogue_ci.yml | 97 +++++----------------------------- 1 file changed, 12 insertions(+), 85 deletions(-) diff --git a/.github/workflows/rogue_ci.yml b/.github/workflows/rogue_ci.yml index c96a50fed..964d87a49 100644 --- a/.github/workflows/rogue_ci.yml +++ b/.github/workflows/rogue_ci.yml @@ -136,95 +136,22 @@ jobs: # ---------------------------------------------------------------------------- - conda_build: - name: Anaconda Build + conda_build_lib: needs: [full_build_test, small_build_test] - if: startsWith(github.ref, 'refs/tags/') - runs-on: ubuntu-20.04 - steps: - - # This step checks out a copy of your repository. - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - - name: Setup anaconda - run: | - cd ${HOME} - wget -O miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh - bash miniconda.sh -b -p ${HOME}/miniconda - export PATH="${HOME}/miniconda/bin:$PATH" - source ${HOME}/miniconda/etc/profile.d/conda.sh - conda config --set always_yes yes - conda config --set channel_priority strict - conda install -n base conda-libmamba-solver - conda config --set solver libmamba - conda install conda-build anaconda-client conda-verify - conda update -q conda conda-build - conda update --all - - - name: Get Image Information - id: get_image_info - env: - CONDA_UPLOAD_TOKEN_TAG: ${{ secrets.CONDA_UPLOAD_TOKEN_TAG }} - run: | - echo token=${CONDA_UPLOAD_TOKEN_TAG} >> ${GITHUB_OUTPUT} - - - name: Build - run: | - export PATH="${HOME}/miniconda/bin:$PATH" - source ${HOME}/miniconda/etc/profile.d/conda.sh - conda build conda-recipe --output-folder bld-dir -c conda-forge - - - name: Upload - run: | - export PATH="${HOME}/miniconda/bin:$PATH" - source ${HOME}/miniconda/etc/profile.d/conda.sh - anaconda -t ${{ steps.get_image_info.outputs.token }} upload --force bld-dir/*/*.tar.bz2 + uses: slaclab/ruckus/.github/workflows/conda_build_lib.yml@main + with: + version: '1.0.0' + secrets: + CONDA_UPLOAD_TOKEN_TAG: ${{ secrets.CONDA_UPLOAD_TOKEN_TAG }} # ---------------------------------------------------------------------------- - docker_build: - name: Docker Build - runs-on: ubuntu-20.04 + docker_build_lib: needs: [full_build_test, small_build_test] - if: startsWith(github.ref, 'refs/tags/') - steps: - - # This step checks out a copy of your repository. - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Get Image Information - id: get_image_info - run: | - echo tag=`git describe --tags` >> ${GITHUB_OUTPUT} - echo branch=`echo ${GITHUB_REF} | awk 'BEGIN { FS = "/" } ; { print $3 }'` >> ${GITHUB_OUTPUT} - - # Setup docker build environment - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - # Login to Dockerhub - - name: Login to Dockerhub - uses: docker/login-action@v1 - with: - username: tidair - password: ${{ secrets.DOCKERHUB_TOKEN }} - - # Build and push the docker image - - name: Build and push image to Dockerhub - uses: docker/build-push-action@v2 - with: - context: . - file: ./docker/rogue/Dockerfile - push: true - tags: tidair/rogue:${{ steps.get_image_info.outputs.tag }}, tidair/rogue:latest - build-args: branch=${{ steps.get_image_info.outputs.branch }} + uses: slaclab/ruckus/.github/workflows/docker_build_lib.yml@main + with: + version: '1.0.0' + secrets: + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} # ---------------------------------------------------------------------------- From 112dfb6bccd5e685743e38b7fa8250e7ff3979dd Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 08:32:28 -0700 Subject: [PATCH 02/41] adding C++ linter --- .github/workflows/rogue_ci.yml | 10 ++++++++-- pip_requirements.txt | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rogue_ci.yml b/.github/workflows/rogue_ci.yml index c96a50fed..aaba62dd1 100644 --- a/.github/workflows/rogue_ci.yml +++ b/.github/workflows/rogue_ci.yml @@ -34,20 +34,26 @@ jobs: cache: 'pip' cache-dependency-path: 'pip_requirements.txt' + # Install dependencies - name: Install dependencies run: | sudo apt-get update sudo apt-get install doxygen doxygen-doc libzmq3-dev libboost-all-dev pip install -r pip_requirements.txt - # Flake 8 check - - name: Flake8 Tests + # Python Linter + - name: Python Linter run: | python -m compileall -f ./python/ flake8 --count ./python/ python -m compileall -f ./tests flake8 --count ./tests/ + # C++ Linter + - name: C++ Linter + run: | + find . -name '*.h' -o -name '*.cpp' | xargs cpplint + # Rogue - name: Build Rogue run: | diff --git a/pip_requirements.txt b/pip_requirements.txt index e3f5afab4..f771b2b90 100644 --- a/pip_requirements.txt +++ b/pip_requirements.txt @@ -15,6 +15,7 @@ sqlalchemy pyserial numpy flake8 +cpplint gitpython pygithub pydm From cdb5fd798a2708d3d88c9c6331b2b985c24ea9b1 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 08:43:24 -0700 Subject: [PATCH 03/41] adding cpplinter message filter --- CPPLINT.cfg | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CPPLINT.cfg diff --git a/CPPLINT.cfg b/CPPLINT.cfg new file mode 100644 index 000000000..852651986 --- /dev/null +++ b/CPPLINT.cfg @@ -0,0 +1,5 @@ +# Increase the max number of characters on a given line +linelength=120 + +# List of filters to apply +filter=-legal/copyright From 5b8e4bc5ac30d175d86f011ad8421bea34025f88 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 08:52:26 -0700 Subject: [PATCH 04/41] resolving c++ linter Redundant blank line at the end of a code block should be deleted. [whitespace/blank_line] [3] --- tests/api_test/src/api_test.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/api_test/src/api_test.cpp b/tests/api_test/src/api_test.cpp index 0e1523c2a..2f1fb9f70 100644 --- a/tests/api_test/src/api_test.cpp +++ b/tests/api_test/src/api_test.cpp @@ -50,7 +50,6 @@ int main(int argc, char** argv) { Py_BEGIN_ALLOW_THREADS; sleep(60); Py_END_ALLOW_THREADS; - } catch (...) { fprintf(stderr, "Found error running API example:\n"); PyErr_Print(); From 1d326cfdf7b02d3eea6309c670966a500f0838fc Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 11:20:01 -0700 Subject: [PATCH 05/41] updates to CPPLINT.cfg --- CPPLINT.cfg | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 852651986..4e2511eb5 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -1,5 +1,17 @@ +####################################################### +# CPPLINT.cfg +####################################################### + # Increase the max number of characters on a given line linelength=120 # List of filters to apply filter=-legal/copyright + +# Suppress the warning for unapproved C++11 headers +# Required for " is an unapproved C++11 header" +filter=-build/c++11 + +# Disable the build/include_order check +# Required for #include "rogue/Directives.h" to be at start +filter=-build/include_order From 66fb36ea21affcc545c2781e77b58d75cba28688 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 13:07:33 -0700 Subject: [PATCH 06/41] resolving c++ linter If an else has a brace on one side, it should have it on both [readability/braces] --- src/rogue/hardware/axi/AxiStreamDma.cpp | 18 +-- src/rogue/interfaces/ZmqClient.cpp | 15 +- src/rogue/interfaces/ZmqServer.cpp | 3 +- src/rogue/interfaces/memory/Block.cpp | 133 ++++++++---------- src/rogue/interfaces/memory/Emulate.cpp | 3 +- src/rogue/interfaces/memory/Master.cpp | 17 ++- src/rogue/interfaces/memory/Slave.cpp | 5 +- src/rogue/interfaces/memory/TcpClient.cpp | 3 +- src/rogue/interfaces/memory/TcpServer.cpp | 9 +- src/rogue/interfaces/memory/Transaction.cpp | 7 +- src/rogue/interfaces/memory/Variable.cpp | 26 ++-- src/rogue/interfaces/stream/Fifo.cpp | 6 +- src/rogue/interfaces/stream/Frame.cpp | 8 +- src/rogue/interfaces/stream/FrameIterator.cpp | 6 +- src/rogue/interfaces/stream/Master.cpp | 37 +++-- src/rogue/interfaces/stream/Pool.cpp | 3 +- src/rogue/interfaces/stream/RateDrop.cpp | 3 +- src/rogue/interfaces/stream/Slave.cpp | 15 +- src/rogue/interfaces/stream/TcpCore.cpp | 6 +- .../protocols/packetizer/ControllerV1.cpp | 3 +- .../protocols/packetizer/ControllerV2.cpp | 3 +- src/rogue/protocols/rssi/Controller.cpp | 39 +++-- src/rogue/protocols/udp/Client.cpp | 7 +- src/rogue/protocols/udp/Server.cpp | 7 +- src/rogue/protocols/xilinx/XvcConnection.cpp | 4 +- src/rogue/utilities/Prbs.cpp | 8 +- src/rogue/utilities/StreamUnZip.cpp | 4 +- src/rogue/utilities/StreamZip.cpp | 7 +- .../utilities/fileio/LegacyStreamReader.cpp | 4 +- src/rogue/utilities/fileio/StreamReader.cpp | 4 +- src/rogue/utilities/fileio/StreamWriter.cpp | 4 +- 31 files changed, 211 insertions(+), 206 deletions(-) diff --git a/src/rogue/hardware/axi/AxiStreamDma.cpp b/src/rogue/hardware/axi/AxiStreamDma.cpp index dd8700097..ba0eb55ec 100644 --- a/src/rogue/hardware/axi/AxiStreamDma.cpp +++ b/src/rogue/hardware/axi/AxiStreamDma.cpp @@ -63,10 +63,9 @@ rha::AxiStreamDmaSharedPtr rha::AxiStreamDma::openShared(std::string path, rogue if ((it = sharedBuffers_.find(path)) != sharedBuffers_.end()) { ret = it->second; log->debug("Reusing existing shared file descriptor for %s", path.c_str()); - } // Create new record - else { + } else { ret = std::make_shared(path); log->debug("Opening new shared file descriptor for %s", path.c_str()); } @@ -279,10 +278,9 @@ ris::FramePtr rha::AxiStreamDma::acceptReq(uint32_t size, bool zeroCopyEn) { // Zero copy is disabled. Allocate from memory. if (zeroCopyEn == false || desc_->rawBuff == NULL) { frame = reqLocalFrame(size, false); - } // Allocate zero copy buffers from driver - else { + } else { rogue::GilRelease noGil; // Create empty frame @@ -353,17 +351,17 @@ void rha::AxiStreamDma::acceptFrame(ris::FramePtr frame) { if (it == frame->beginBuffer()) { fuser = frame->getFirstUser(); if (enSsi_) fuser |= 0x2; - } else + } else { fuser = 0; + } // Last Buffer if (it == (frame->endBuffer() - 1)) { cont = 0; luser = frame->getLastUser(); - } // Continue flag is set if this is not the last (*it)er - else { + } else { cont = 1; luser = 0; } @@ -390,10 +388,9 @@ void rha::AxiStreamDma::acceptFrame(ris::FramePtr frame) { meta |= 0x40000000; (*it)->setMeta(meta); } - } // Write to pgp with (*it)er copy in driver - else { + } else { // Keep trying since select call can fire // but write fails because we did not win the (*it)er lock do { @@ -523,10 +520,9 @@ void rha::AxiStreamDma::runThread(std::weak_ptr lockPtr) { rxCount = rxSize[0]; else rxCount = 1; - } // Zero copy read - else { + } else { // Attempt read, dest is not needed since only one lane/vc is open rxCount = dmaReadBulkIndex(fd_, RxBufferCount, rxSize, meta, rxFlags, rxError, NULL); diff --git a/src/rogue/interfaces/ZmqClient.cpp b/src/rogue/interfaces/ZmqClient.cpp index ba60f1a07..cd0bba1b1 100644 --- a/src/rogue/interfaces/ZmqClient.cpp +++ b/src/rogue/interfaces/ZmqClient.cpp @@ -90,8 +90,9 @@ rogue::interfaces::ZmqClient::ZmqClient(std::string addr, uint16_t port, bool do addr.c_str())); reqPort = port + 1; - } else + } else { reqPort = port + 2; + } // Setup request port temp = "tcp://"; @@ -190,12 +191,14 @@ std::string rogue::interfaces::ZmqClient::sendString(std::string path, std::stri if (waitRetry_) { log_->error("Timeout waiting for response after %f Seconds, server may be busy! Waiting...", seconds); zmq_msg_close(&msg); - } else + } else { throw rogue::GeneralError::create("ZmqClient::sendString", "Timeout waiting for response after %f Seconds.", seconds); - } else + } + } else { break; + } } if (seconds != 0) log_->error("Finally got response from server after %f seconds!", seconds); @@ -251,13 +254,15 @@ bp::object rogue::interfaces::ZmqClient::send(bp::object value) { log_->error("Timeout waiting for response after %f Seconds, server may be busy! Waiting...", seconds); zmq_msg_close(&rxMsg); - } else + } else { throw rogue::GeneralError::create( "ZmqClient::send", "Timeout waiting for response after %f Seconds, server may be busy!", seconds); - } else + } + } else { break; + } } } diff --git a/src/rogue/interfaces/ZmqServer.cpp b/src/rogue/interfaces/ZmqServer.cpp index 9aa15d10c..61413cfbf 100644 --- a/src/rogue/interfaces/ZmqServer.cpp +++ b/src/rogue/interfaces/ZmqServer.cpp @@ -82,8 +82,9 @@ void rogue::interfaces::ZmqServer::start() { res = this->tryConnect(); if (res) break; } - } else + } else { res = this->tryConnect(); + } if (!res) { if (port == 0) diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index 2b9bb3a56..c89f630c0 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -229,10 +229,9 @@ void rim::Block::intStartTransaction(uint32_t type, bool forceWr, bool check, ri tSize = verifySize_; tData = verifyData_ + verifyBase_; verifyInp_ = true; - } // Not a verify transaction - else { + } else { // Derive offset and size based upon min transaction size tOff = lowByte; tSize = (highByte - lowByte) + 1; @@ -480,10 +479,11 @@ void rim::Block::addVariables(std::vector variables) { for (x = 0; x < (*vit)->bitOffset_.size(); x++) { // Variable allows overlaps, add to overlap enable mask - if ((*vit)->overlapEn_) setBits(oleMask, (*vit)->bitOffset_[x], (*vit)->bitSize_[x]); + if ((*vit)->overlapEn_) { + setBits(oleMask, (*vit)->bitOffset_[x], (*vit)->bitSize_[x]); // Otherwise add to exclusive mask and check for existing mapping - else { + } else { if (anyBits(excMask, (*vit)->bitOffset_[x], (*vit)->bitSize_[x])) throw(rogue::GeneralError::create("Block::addVariables", "Variable bit overlap detected for block %s with address 0x%.8x and variable %s", @@ -519,10 +519,11 @@ void rim::Block::addVariables(std::vector variables) { for (x = 0; x < (*vit)->numValues_; x++) { // Variable allows overlaps, add to overlap enable mask - if ((*vit)->overlapEn_) setBits(oleMask, x * (*vit)->valueStride_ + (*vit)->bitOffset_[0], (*vit)->valueBits_); + if ((*vit)->overlapEn_) { + setBits(oleMask, x * (*vit)->valueStride_ + (*vit)->bitOffset_[0], (*vit)->valueBits_); // Otherwise add to exclusive mask and check for existing mapping - else { + } else { if (anyBits(excMask, x * (*vit)->valueStride_ + (*vit)->bitOffset_[0], (*vit)->valueBits_)) throw(rogue::GeneralError::create("Block::addVariables", "Variable bit overlap detected for block %s with address 0x%.8x and variable %s", @@ -638,8 +639,9 @@ void rim::Block::setBytes(const uint8_t* data, rim::Variable* var, uint32_t inde buff = (uint8_t*)malloc(var->valueBytes_); memcpy(buff, data, var->valueBytes_); reverseBytes(buff, var->valueBytes_); - } else + } else { buff = (uint8_t*)data; + } // List variable if (var->numValues_ != 0) { @@ -667,21 +669,20 @@ void rim::Block::setBytes(const uint8_t* data, rim::Variable* var, uint32_t inde var->staleLowByte_ = var->lowTranByte_[index]; var->staleHighByte_ = var->highTranByte_[index]; } - } // Standard variable - else { + } else { var->staleLowByte_ = var->lowTranByte_[0]; var->staleHighByte_ = var->highTranByte_[0]; // Fast copy - if (var->fastByte_ != NULL) + if (var->fastByte_ != NULL) { memcpy(blockData_ + var->fastByte_[0], buff, var->valueBytes_); - else if (var->bitOffset_.size() == 1) + } else if (var->bitOffset_.size() == 1) { copyBits(blockData_, var->bitOffset_[0], buff, 0, var->bitSize_[0]); - else { + } else { srcBit = 0; for (x = 0; x < var->bitOffset_.size(); x++) { copyBits(blockData_, var->bitOffset_[x], buff, srcBit, var->bitSize_[x]); @@ -716,17 +717,16 @@ void rim::Block::getBytes(uint8_t* data, rim::Variable* var, uint32_t index) { else copyBits(data, 0, blockData_, var->bitOffset_[0] + (index * var->valueStride_), var->valueBits_); - } - else { + } else { // Fast copy - if (var->fastByte_ != NULL) + if (var->fastByte_ != NULL) { memcpy(data, blockData_ + var->fastByte_[0], var->valueBytes_); - else if (var->bitOffset_.size() == 1) + } else if (var->bitOffset_.size() == 1) { copyBits(data, 0, blockData_, var->bitOffset_[0], var->bitSize_[0]); - else { + } else { dstBit = 0; for (x = 0; x < var->bitOffset_.size(); x++) { copyBits(data, dstBit, blockData_, var->bitOffset_[x], var->bitSize_[x]); @@ -758,10 +758,9 @@ void rim::Block::setPyFunc(bp::object& value, rim::Variable* var, int32_t index) throw(rogue::GeneralError::create("Block::setPyFunc", "Passing ndarray not supported for %s", var->name_.c_str())); - } // Is passed value a list - else if (PyList_Check(value.ptr())) { + } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -786,10 +785,9 @@ void rim::Block::setPyFunc(bp::object& value, rim::Variable* var, int32_t index) setBytes((uint8_t*)valueBuf.buf, var, index + x); PyBuffer_Release(&valueBuf); } - } // Single value - else { + } else { // Call python function bp::object ret = ((rim::VariableWrap*)var)->toBytes(value); @@ -813,10 +811,8 @@ bp::object rim::Block::getPyFunc(rim::Variable* var, int32_t index) { "Accessing unindexed value not support for %s", var->name_.c_str())); - } - // Single value - else { + } else { memset(getBuffer, 0, var->valueBytes_); getBytes(getBuffer, var, index); @@ -931,15 +927,14 @@ void rim::Block::setUIntPy(bp::object& value, rim::Variable* var, int32_t index) } else if (PyArray_TYPE(arr) == NPY_UINT32) { uint32_t* src = reinterpret_cast(PyArray_DATA(arr)); for (x = 0; x < dims[0]; x++) setUInt(src[x], var, index + x); - } else + } else { throw(rogue::GeneralError::create("Block::setUIntPy", "Passed nparray is not of type (uint64 or uint32) for %s", var->name_.c_str())); - - } + } // Is passed value a list - else if (PyList_Check(value.ptr())) { + } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -962,10 +957,9 @@ void rim::Block::setUIntPy(bp::object& value, rim::Variable* var, int32_t index) setUInt(tmp, var, index + x); } - } // Passed scalar numpy value - else if (PyArray_CheckScalar(value.ptr())) { + } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_UINT64) { uint64_t val; PyArray_ScalarAsCtype(value.ptr(), &val); @@ -974,9 +968,10 @@ void rim::Block::setUIntPy(bp::object& value, rim::Variable* var, int32_t index) uint32_t val; PyArray_ScalarAsCtype(value.ptr(), &val); setUInt(val, var, index); - } else + } else { throw( rogue::GeneralError::create("Block::setUIntPy", "Failed to extract value for %s.", var->name_.c_str())); + } } else { bp::extract tmp(value); @@ -1090,15 +1085,14 @@ void rim::Block::setIntPy(bp::object& value, rim::Variable* var, int32_t index) } else if (PyArray_TYPE(arr) == NPY_INT32) { int32_t* src = reinterpret_cast(PyArray_DATA(arr)); for (x = 0; x < dims[0]; x++) setInt(src[x], var, index + x); - } else + } else { throw(rogue::GeneralError::create("Block::setIntPy", "Passed nparray is not of type (int64 or int32) for %s", var->name_.c_str())); - - } + } // Is passed value a list - else if (PyList_Check(value.ptr())) { + } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -1121,10 +1115,9 @@ void rim::Block::setIntPy(bp::object& value, rim::Variable* var, int32_t index) setInt(tmp, var, index + x); } - } // Passed scalar numpy value - else if (PyArray_CheckScalar(value.ptr())) { + } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_INT64) { int64_t val; PyArray_ScalarAsCtype(value.ptr(), &val); @@ -1133,9 +1126,10 @@ void rim::Block::setIntPy(bp::object& value, rim::Variable* var, int32_t index) int32_t val; PyArray_ScalarAsCtype(value.ptr(), &val); setInt(val, var, index); - } else + } else { throw( rogue::GeneralError::create("Block::setIntPy", "Failed to extract value for %s.", var->name_.c_str())); + } } else { bp::extract tmp(value); @@ -1250,15 +1244,14 @@ void rim::Block::setBoolPy(bp::object& value, rim::Variable* var, int32_t index) if (PyArray_TYPE(arr) == NPY_BOOL) { bool* src = reinterpret_cast(PyArray_DATA(arr)); for (x = 0; x < dims[0]; x++) setBool(src[x], var, index + x); - } else + } else { throw(rogue::GeneralError::create("Block::setBoolPy", "Passed nparray is not of type (bool) for %s", var->name_.c_str())); - - } + } // Is passed value a list - else if (PyList_Check(value.ptr())) { + } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -1281,17 +1274,17 @@ void rim::Block::setBoolPy(bp::object& value, rim::Variable* var, int32_t index) setBool(tmp, var, index + x); } - } // Passed scalar numpy value - else if (PyArray_CheckScalar(value.ptr())) { + } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_BOOL) { bool val; PyArray_ScalarAsCtype(value.ptr(), &val); setBool(val, var, index); - } else + } else { throw( rogue::GeneralError::create("Block::setBoolPy", "Failed to extract value for %s.", var->name_.c_str())); + } } else { bp::extract tmp(value); @@ -1320,9 +1313,8 @@ bp::object rim::Block::getBoolPy(rim::Variable* var, int32_t index) { boost::python::handle<> handle(obj); ret = bp::object(handle); - } - else { + } else { bp::handle<> handle(bp::borrowed(getBool(var, index) ? Py_True : Py_False)); ret = bp::object(handle); } @@ -1460,14 +1452,14 @@ void rim::Block::setFloatPy(bp::object& value, rim::Variable* var, int32_t index if (PyArray_TYPE(arr) == NPY_FLOAT32) { float* src = reinterpret_cast(PyArray_DATA(arr)); for (x = 0; x < dims[0]; x++) setFloat(src[x], var, index + x); - } else + } else { throw(rogue::GeneralError::create("Block::setFLoatPy", "Passed nparray is not of type (float32) for %s", var->name_.c_str())); - } + } // Is passed value a list - else if (PyList_Check(value.ptr())) { + } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -1490,18 +1482,18 @@ void rim::Block::setFloatPy(bp::object& value, rim::Variable* var, int32_t index setFloat(tmp, var, index + x); } - } // Passed scalar numpy value - else if (PyArray_CheckScalar(value.ptr())) { + } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_FLOAT32) { float val; PyArray_ScalarAsCtype(value.ptr(), &val); setFloat(val, var, index); - } else + } else { throw(rogue::GeneralError::create("Block::setFloatPy", "Failed to extract value for %s.", var->name_.c_str())); + } } else { bp::extract tmp(value); @@ -1531,9 +1523,8 @@ bp::object rim::Block::getFloatPy(rim::Variable* var, int32_t index) { boost::python::handle<> handle(obj); ret = bp::object(handle); - } - else { + } else { PyObject* val = Py_BuildValue("f", getFloat(var, index)); if (val == NULL) throw(rogue::GeneralError::create("Block::getFloatPy", "Failed to generate Float")); @@ -1606,15 +1597,14 @@ void rim::Block::setDoublePy(bp::object& value, rim::Variable* var, int32_t inde if (PyArray_TYPE(arr) == NPY_FLOAT64) { double* src = reinterpret_cast(PyArray_DATA(arr)); for (x = 0; x < dims[0]; x++) setDouble(src[x], var, index + x); - } else + } else { throw(rogue::GeneralError::create("Block::setFLoatPy", "Passed nparray is not of type (double) for %s", var->name_.c_str())); - - } + } // Is passed value a list - else if (PyList_Check(value.ptr())) { + } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -1637,18 +1627,18 @@ void rim::Block::setDoublePy(bp::object& value, rim::Variable* var, int32_t inde setDouble(tmp, var, index + x); } - } // Passed scalar numpy value - else if (PyArray_CheckScalar(value.ptr())) { + } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_FLOAT64) { double val; PyArray_ScalarAsCtype(value.ptr(), &val); setDouble(val, var, index); - } else + } else { throw(rogue::GeneralError::create("Block::setDoublePy", "Failed to extract value for %s.", var->name_.c_str())); + } } else { bp::extract tmp(value); @@ -1678,9 +1668,8 @@ bp::object rim::Block::getDoublePy(rim::Variable* var, int32_t index) { boost::python::handle<> handle(obj); ret = bp::object(handle); - } - else { + } else { PyObject* val = Py_BuildValue("d", getDouble(var, index)); if (val == NULL) throw(rogue::GeneralError::create("Block::getDoublePy", "Failed to generate Double")); @@ -1753,15 +1742,14 @@ void rim::Block::setFixedPy(bp::object& value, rim::Variable* var, int32_t index if (PyArray_TYPE(arr) == NPY_FLOAT64) { double* src = reinterpret_cast(PyArray_DATA(arr)); for (x = 0; x < dims[0]; x++) setFixed(src[x], var, index + x); - } else + } else { throw(rogue::GeneralError::create("Block::setFixedPy", "Passed nparray is not of type (double) for %s", var->name_.c_str())); - - } + } // Is passed value a list - else if (PyList_Check(value.ptr())) { + } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -1784,18 +1772,18 @@ void rim::Block::setFixedPy(bp::object& value, rim::Variable* var, int32_t index setFixed(tmp, var, index + x); } - } // Passed scalar numpy value - else if (PyArray_CheckScalar(value.ptr())) { + } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_FLOAT64) { double val; PyArray_ScalarAsCtype(value.ptr(), &val); setFixed(val, var, index); - } else + } else { throw(rogue::GeneralError::create("Block::setFixedPy", "Failed to extract value for %s.", var->name_.c_str())); + } } else { bp::extract tmp(value); @@ -1825,9 +1813,8 @@ bp::object rim::Block::getFixedPy(rim::Variable* var, int32_t index) { boost::python::handle<> handle(obj); ret = bp::object(handle); - } - else { + } else { PyObject* val = Py_BuildValue("d", getFixed(var, index)); if (val == NULL) throw(rogue::GeneralError::create("Block::getFixedPy", "Failed to generate Fixed")); diff --git a/src/rogue/interfaces/memory/Emulate.cpp b/src/rogue/interfaces/memory/Emulate.cpp index ccedad26e..90acfe568 100644 --- a/src/rogue/interfaces/memory/Emulate.cpp +++ b/src/rogue/interfaces/memory/Emulate.cpp @@ -98,10 +98,9 @@ void rim::Emulate::doTransaction(rim::TransactionPtr tran) { // printf("Write data to 4k=0x%" PRIx64 ", offset=0x%" PRIx64 ", size=%" PRIu64 "\n", addr4k, off4k, // size4k); memcpy(memMap_[addr4k] + off4k, ptr, size4k); - } // Read or verify - else { + } else { // printf("Read data from 4k=0x%" PRIx64 ", offset=0x%" PRIx64 ", size=%" PRIu64 "\n", addr4k, off4k, // size4k); memcpy(ptr, memMap_[addr4k] + off4k, size4k); diff --git a/src/rogue/interfaces/memory/Master.cpp b/src/rogue/interfaces/memory/Master.cpp index db1656152..18d8c1008 100644 --- a/src/rogue/interfaces/memory/Master.cpp +++ b/src/rogue/interfaces/memory/Master.cpp @@ -247,8 +247,9 @@ void rim::Master::waitTransaction(uint32_t id) { if (it != tranMap_.end()) { tran = it->second; tranMap_.erase(it); - } else + } else { break; + } } // Outside of lock @@ -280,10 +281,9 @@ void rim::Master::copyBits(uint8_t* dstData, uint32_t dstLsb, uint8_t* srcData, dstByte += bytes; srcByte += bytes; rem -= (bytes * 8); - } // Not aligned - else { + } else { dstData[dstByte] &= ((0x1 << dstBit) ^ 0xFF); dstData[dstByte] |= ((srcData[srcByte] >> srcBit) & 0x1) << dstBit; srcByte += (++srcBit / 8); @@ -362,10 +362,9 @@ void rim::Master::setBits(uint8_t* dstData, uint32_t lsb, uint32_t size) { memset(&(dstData[dstByte]), 0xFF, bytes); dstByte += bytes; rem -= (bytes * 8); - } // Not aligned - else { + } else { dstData[dstByte] |= (0x1 << dstBit); dstByte += (++dstBit / 8); dstBit %= 8; @@ -421,10 +420,9 @@ bool rim::Master::anyBits(uint8_t* dstData, uint32_t lsb, uint32_t size) { if (dstData[dstByte] != 0) ret = true; dstByte += 1; rem -= 8; - } // Not aligned - else { + } else { if ((dstData[dstByte] & (0x1 << dstBit)) != 0) ret = true; dstByte += (++dstBit / 8); dstBit %= 8; @@ -468,10 +466,11 @@ void rim::Master::rshiftPy(bp::object p) { boost::python::extract get_slave(p); // Test extraction - if (get_slave.check()) slv = get_slave(); + if (get_slave.check()) { + slv = get_slave(); // Otherwise look for indirect call - else if (PyObject_HasAttrString(p.ptr(), "_getMemorySlave")) { + } else if (PyObject_HasAttrString(p.ptr(), "_getMemorySlave")) { // Attempt to convert returned object to slave pointer boost::python::extract get_slave(p.attr("_getMemorySlave")()); diff --git a/src/rogue/interfaces/memory/Slave.cpp b/src/rogue/interfaces/memory/Slave.cpp index ca2e34327..cca4e13e4 100644 --- a/src/rogue/interfaces/memory/Slave.cpp +++ b/src/rogue/interfaces/memory/Slave.cpp @@ -266,10 +266,11 @@ void rim::Slave::lshiftPy(boost::python::object p) { boost::python::extract get_master(p); // Test extraction - if (get_master.check()) mst = get_master(); + if (get_master.check()) { + mst = get_master(); // Otherwise look for indirect call - else if (PyObject_HasAttrString(p.ptr(), "_getMemoryMaster")) { + } else if (PyObject_HasAttrString(p.ptr(), "_getMemoryMaster")) { // Attempt to convert returned object to master pointer boost::python::extract get_master(p.attr("_getMemoryMaster")()); diff --git a/src/rogue/interfaces/memory/TcpClient.cpp b/src/rogue/interfaces/memory/TcpClient.cpp index 64bdf4839..6a470c2b0 100644 --- a/src/rogue/interfaces/memory/TcpClient.cpp +++ b/src/rogue/interfaces/memory/TcpClient.cpp @@ -237,8 +237,9 @@ void rim::TcpClient::runThread() { more = 0; moreSize = 8; zmq_getsockopt(this->zmqResp_, ZMQ_RCVMORE, &more, &moreSize); - } else + } else { more = 1; + } } while (threadEn_ && more); // Proper message received diff --git a/src/rogue/interfaces/memory/TcpServer.cpp b/src/rogue/interfaces/memory/TcpServer.cpp index 40547802d..1c144a27b 100644 --- a/src/rogue/interfaces/memory/TcpServer.cpp +++ b/src/rogue/interfaces/memory/TcpServer.cpp @@ -162,8 +162,9 @@ void rim::TcpServer::runThread() { more = 0; moreSize = 8; zmq_getsockopt(this->zmqReq_, ZMQ_RCVMORE, &more, &moreSize); - } else + } else { more = 1; + } } while (threadEn_ && more); // Proper message received @@ -189,8 +190,9 @@ void rim::TcpServer::runThread() { for (x = 0; x < msgCnt; x++) zmq_msg_close(&(msg[x])); continue; // while (1) } - } else + } else { zmq_msg_init_size(&(msg[4]), size); + } // Data pointer data = (uint8_t*)zmq_msg_data(&(msg[4])); @@ -223,8 +225,9 @@ void rim::TcpServer::runThread() { // Send message for (x = 0; x < 6; x++) zmq_sendmsg(this->zmqResp_, &(msg[x]), (x == 5) ? 0 : ZMQ_SNDMORE); - } else + } else { for (x = 0; x < msgCnt; x++) zmq_msg_close(&(msg[x])); + } } } diff --git a/src/rogue/interfaces/memory/Transaction.cpp b/src/rogue/interfaces/memory/Transaction.cpp index 55218fdd2..497b8ec94 100644 --- a/src/rogue/interfaces/memory/Transaction.cpp +++ b/src/rogue/interfaces/memory/Transaction.cpp @@ -241,8 +241,9 @@ std::string rim::Transaction::wait() { id_, address_, size_); - } else + } else { cond_.wait_for(lock, std::chrono::microseconds(1000)); + } } // Reset @@ -270,9 +271,9 @@ void rim::Transaction::refreshTimer(rim::TransactionPtr ref) { if (ref == NULL || timercmp(&startTime_, &(ref->startTime_), >=)) { timeradd(&currTime, &timeout_, &endTime_); - if (warnTime_.tv_sec == 0 && warnTime_.tv_usec == 0) + if (warnTime_.tv_sec == 0 && warnTime_.tv_usec == 0) { warnTime_ = endTime_; - else if (timercmp(&warnTime_, &currTime, >=)) { + } else if (timercmp(&warnTime_, &currTime, >=)) { log_->warning("Transaction timer refresh! Possible slow link! type=%" PRIu32 " id=%" PRIu32 ", address=0x%016" PRIx64 ", size=%" PRIu32, type_, diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index 4626e11f3..a565e5983 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -184,10 +184,9 @@ rim::Variable::Variable(std::string name, valueBytes_ = byteSize_; valueBits_ = bitTotal_; valueStride_ = bitTotal_; - } // List variables - else { + } else { // Compute bit total bitTotal_ = bitSize_[0]; @@ -211,10 +210,11 @@ rim::Variable::Variable(std::string name, if ((bitOffset_.size() == 1) && (bitOffset_[0] % 8 == 0) && (bitSize_[0] % 8 == 0)) { // Standard variable - if (numValues_ == 0) fastByte_ = (uint32_t*)malloc(sizeof(uint32_t)); + if (numValues_ == 0) { + fastByte_ = (uint32_t*)malloc(sizeof(uint32_t)); // List variable - else if ((valueBits_ % 8) == 0 && (valueStride_ % 8) == 0) { + } else if ((valueBits_ % 8) == 0 && (valueStride_ % 8) == 0) { fastByte_ = (uint32_t*)malloc(numValues_ * sizeof(uint32_t)); } } @@ -469,10 +469,9 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { // Compute the highest byte, aligned to min access highTranByte_[0] = varBytes_ - 1; staleHighByte_ = highTranByte_[0]; - } // List variable - else { + } else { for (x = 0; x < numValues_; x++) { lowTranByte_[x] = (uint32_t)std::floor(((float)bitOffset_[0] + (float)x * (float)valueStride_) / ((float)minSize * 8.0)) * minSize; @@ -486,10 +485,11 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { // Adjust fast copy locations if (fastByte_ != NULL) { - if (numValues_ == 0) fastByte_[0] = bitOffset_[0] / 8; + if (numValues_ == 0) { + fastByte_[0] = bitOffset_[0] / 8; // List variable - else { + } else { for (x = 0; x < numValues_; x++) fastByte_[x] = (bitOffset_[0] + (valueStride_ * x)) / 8; } } @@ -705,8 +705,9 @@ std::string rim::Variable::getDumpValue(bool read) { ret << "0x"; for (x = 0; x < valueBytes_; x++) ret << std::setfill('0') << std::setw(2) << std::hex << (uint32_t)byteData[x]; - } else + } else { ret << (block_->*getUInt_)(this, index); + } break; case rim::Int: @@ -715,8 +716,9 @@ std::string rim::Variable::getDumpValue(bool read) { ret << "0x"; for (x = 0; x < valueBytes_; x++) ret << std::setfill('0') << std::setw(2) << std::hex << (uint32_t)byteData[x]; - } else + } else { ret << (block_->*getInt_)(this, index); + } break; case rim::Bool: @@ -851,9 +853,9 @@ std::string rim::Variable::getString(int32_t index) { } void rim::Variable::getValue(std::string& retString, int32_t index) { - if (getString_ == NULL) + if (getString_ == NULL) { throw(rogue::GeneralError::create("Variable::getValue", "Wrong get type for variable %s", path_.c_str())); - else { + } else { block_->read(this, index); block_->getValue(this, retString, index); } diff --git a/src/rogue/interfaces/stream/Fifo.cpp b/src/rogue/interfaces/stream/Fifo.cpp index b79502943..38f4396ae 100644 --- a/src/rogue/interfaces/stream/Fifo.cpp +++ b/src/rogue/interfaces/stream/Fifo.cpp @@ -92,7 +92,7 @@ ris::Fifo::~Fifo() { //! Return the number of elements in the Fifo std::size_t ris::Fifo::size() { return queue_.size(); -}; +} //! Return the number of dropped frames std::size_t ris::Fifo::dropCnt() const { @@ -121,9 +121,9 @@ void ris::Fifo::acceptFrame(ris::FramePtr frame) { ris::FrameLockPtr lock = frame->lock(); // Do we copy the frame? - if (noCopy_) + if (noCopy_) { nFrame = frame; - else { + } else { // Get size, adjust if trim is enabled size = frame->getPayload(); if (trimSize_ != 0 && trimSize_ < size) size = trimSize_; diff --git a/src/rogue/interfaces/stream/Frame.cpp b/src/rogue/interfaces/stream/Frame.cpp index 5770916a3..67e47a154 100644 --- a/src/rogue/interfaces/stream/Frame.cpp +++ b/src/rogue/interfaces/stream/Frame.cpp @@ -184,16 +184,16 @@ void ris::Frame::setPayload(uint32_t pSize) { size_ += loc; // Beyond the fill point, empty buffer - if (lSize == 0) (*it)->setPayloadEmpty(); + if (lSize == 0) { + (*it)->setPayloadEmpty(); // Size exists in current buffer - else if (lSize <= loc) { + } else if (lSize <= loc) { (*it)->setPayload(lSize); lSize = 0; - } // Size is beyond current buffer - else { + } else { lSize -= loc; (*it)->setPayloadFull(); } diff --git a/src/rogue/interfaces/stream/FrameIterator.cpp b/src/rogue/interfaces/stream/FrameIterator.cpp index daa166019..c5353aadc 100644 --- a/src/rogue/interfaces/stream/FrameIterator.cpp +++ b/src/rogue/interfaces/stream/FrameIterator.cpp @@ -59,10 +59,9 @@ void ris::FrameIterator::increment(int32_t diff) { buffEnd_ = frameSize_; buff_ = frame_->endBuffer(); data_ = NULL; - } // Move forward in buffer chain - else { + } else { // Increment current buffer until we find the location of the data position // Iterator always contains one extra buffer index while (framePos_ >= buffEnd_) { @@ -91,10 +90,9 @@ void ris::FrameIterator::decrement(int32_t diff) { buffEnd_ = frameSize_; buff_ = frame_->endBuffer(); data_ = NULL; - } // Move backwards in buffer chain - else { + } else { // Decrement current buffer until the desired frame position is greater than // the bottom of the buffer while (framePos_ < buffBeg_) { diff --git a/src/rogue/interfaces/stream/Master.cpp b/src/rogue/interfaces/stream/Master.cpp index 554923750..bdfadb0a0 100644 --- a/src/rogue/interfaces/stream/Master.cpp +++ b/src/rogue/interfaces/stream/Master.cpp @@ -92,20 +92,20 @@ void ris::Master::sendFrame(FramePtr frame) { // Ensure passed frame is a single buffer bool ris::Master::ensureSingleBuffer(ris::FramePtr& frame, bool reqEn) { // Frame is a single buffer - if (frame->bufferCount() == 1) + if (frame->bufferCount() == 1) { return true; - else if (!reqEn) + } else if (!reqEn) { return false; - else { + } else { uint32_t size = frame->getPayload(); ris::FramePtr nFrame = reqFrame(size, true); - if (nFrame->bufferCount() != 1) + if (nFrame->bufferCount() != 1) { return false; - else { + } else { nFrame->setPayload(size); ris::FrameIterator srcIter = frame->begin(); @@ -149,30 +149,36 @@ void ris::Master::equalsPy(boost::python::object p) { boost::python::extract get_master(p); // Test extraction - if (get_master.check()) rMst = get_master(); + if (get_master.check()) { + rMst = get_master(); // Otherwise look for indirect call - else if (PyObject_HasAttrString(p.ptr(), "_getStreamMaster")) { + } else if (PyObject_HasAttrString(p.ptr(), "_getStreamMaster")) { // Attempt to convert returned object to master pointer boost::python::extract get_master(p.attr("_getStreamMaster")()); // Test extraction - if (get_master.check()) rMst = get_master(); + if (get_master.check()) { + rMst = get_master(); + } } // Attempt to access object as a stream slave boost::python::extract get_slave(p); // Test extraction - if (get_slave.check()) rSlv = get_slave(); + if (get_slave.check()) { + rSlv = get_slave(); // Otherwise look for indirect call - else if (PyObject_HasAttrString(p.ptr(), "_getStreamSlave")) { + } else if (PyObject_HasAttrString(p.ptr(), "_getStreamSlave")) { // Attempt to convert returned object to slave pointer boost::python::extract get_slave(p.attr("_getStreamSlave")()); // Test extraction - if (get_slave.check()) rSlv = get_slave(); + if (get_slave.check()) { + rSlv = get_slave(); + } } if (rMst == NULL || rSlv == NULL || lSlv == NULL) @@ -191,15 +197,18 @@ bp::object ris::Master::rshiftPy(bp::object p) { boost::python::extract get_slave(p); // Test extraction - if (get_slave.check()) slv = get_slave(); + if (get_slave.check()) { + slv = get_slave(); // Otherwise look for indirect call - else if (PyObject_HasAttrString(p.ptr(), "_getStreamSlave")) { + } else if (PyObject_HasAttrString(p.ptr(), "_getStreamSlave")) { // Attempt to convert returned object to slave pointer boost::python::extract get_slave(p.attr("_getStreamSlave")()); // Test extraction - if (get_slave.check()) slv = get_slave(); + if (get_slave.check()) { + slv = get_slave(); + } } if (slv != NULL) diff --git a/src/rogue/interfaces/stream/Pool.cpp b/src/rogue/interfaces/stream/Pool.cpp index 143f401d0..698a3a17f 100644 --- a/src/rogue/interfaces/stream/Pool.cpp +++ b/src/rogue/interfaces/stream/Pool.cpp @@ -159,9 +159,10 @@ ris::BufferPtr ris::Pool::allocBuffer(uint32_t size, uint32_t* total) { if (dataQ_.size() > 0) { data = dataQ_.front(); dataQ_.pop(); - } else if ((data = (uint8_t*)malloc(bAlloc)) == NULL) + } else if ((data = (uint8_t*)malloc(bAlloc)) == NULL) { throw( rogue::GeneralError::create("Pool::allocBuffer", "Failed to allocate buffer with size = %" PRIu32, bAlloc)); + } // Only use lower 24 bits of meta. // Upper 8 bits may have special meaning to sub-class diff --git a/src/rogue/interfaces/stream/RateDrop.cpp b/src/rogue/interfaces/stream/RateDrop.cpp index d6f0dc7e8..92b777100 100644 --- a/src/rogue/interfaces/stream/RateDrop.cpp +++ b/src/rogue/interfaces/stream/RateDrop.cpp @@ -90,10 +90,9 @@ void ris::RateDrop::acceptFrame(ris::FramePtr frame) { sendFrame(frame); dropCount_ = 0; } - } // Dropping based upon time - else { + } else { gettimeofday(&currTime, NULL); if (timercmp(&currTime, &(nextPeriod_), >)) { diff --git a/src/rogue/interfaces/stream/Slave.cpp b/src/rogue/interfaces/stream/Slave.cpp index f484348a6..085ccb5f9 100644 --- a/src/rogue/interfaces/stream/Slave.cpp +++ b/src/rogue/interfaces/stream/Slave.cpp @@ -143,20 +143,20 @@ uint64_t ris::Slave::getByteCount() { // Ensure passed frame is a single buffer bool ris::Slave::ensureSingleBuffer(ris::FramePtr& frame, bool reqEn) { // Frame is a single buffer - if (frame->bufferCount() == 1) + if (frame->bufferCount() == 1) { return true; - else if (!reqEn) + } else if (!reqEn) { return false; - else { + } else { uint32_t size = frame->getPayload(); ris::FramePtr nFrame = reqLocalFrame(size, true); - if (nFrame->bufferCount() != 1) + if (nFrame->bufferCount() != 1) { return false; - else { + } else { nFrame->setPayload(size); ris::FrameIterator srcIter = frame->begin(); @@ -205,10 +205,11 @@ bp::object ris::Slave::lshiftPy(bp::object p) { boost::python::extract get_master(p); // Test extraction - if (get_master.check()) mst = get_master(); + if (get_master.check()) { + mst = get_master(); // Otherwise look for indirect call - else if (PyObject_HasAttrString(p.ptr(), "_getStreamMaster")) { + } else if (PyObject_HasAttrString(p.ptr(), "_getStreamMaster")) { // Attempt to convert returned object to master pointer boost::python::extract get_master(p.attr("_getStreamMaster")()); diff --git a/src/rogue/interfaces/stream/TcpCore.cpp b/src/rogue/interfaces/stream/TcpCore.cpp index 181f5ca55..c4cab4c4a 100644 --- a/src/rogue/interfaces/stream/TcpCore.cpp +++ b/src/rogue/interfaces/stream/TcpCore.cpp @@ -112,10 +112,9 @@ ris::TcpCore::TcpCore(std::string addr, uint16_t port, bool server) { " at address %s, another process may be using this port", port + 1, addr.c_str())); - } // Client mode - else { + } else { this->pullAddr_.append(std::to_string(static_cast(port + 1))); this->pushAddr_.append(std::to_string(static_cast(port))); @@ -248,8 +247,9 @@ void ris::TcpCore::runThread() { more = 0; moreSize = 8; zmq_getsockopt(this->zmqPull_, ZMQ_RCVMORE, &more, &moreSize); - } else + } else { more = 1; + } } while (threadEn_ && more); // Proper message received diff --git a/src/rogue/protocols/packetizer/ControllerV1.cpp b/src/rogue/protocols/packetizer/ControllerV1.cpp index 622003aec..f794788e2 100644 --- a/src/rogue/protocols/packetizer/ControllerV1.cpp +++ b/src/rogue/protocols/packetizer/ControllerV1.cpp @@ -173,8 +173,9 @@ void rpp::ControllerV1::transportRx(ris::FramePtr frame) { // Detect SSI error if (enSsi_ & (tmpLuser & 0x1)) tranFrame_[tmpDest]->setError(0x80); - } else + } else { tranCount_[0]++; + } } //! Frame received at application interface diff --git a/src/rogue/protocols/packetizer/ControllerV2.cpp b/src/rogue/protocols/packetizer/ControllerV2.cpp index 210f1882c..045ac9e47 100644 --- a/src/rogue/protocols/packetizer/ControllerV2.cpp +++ b/src/rogue/protocols/packetizer/ControllerV2.cpp @@ -144,8 +144,9 @@ void rpp::ControllerV2::transportRx(ris::FramePtr frame) { crc_[tmpDest] = CRC::Calculate(data, size - 4, crcTable_, crc_[tmpDest]); crcErr = (tmpCrc != crc_[tmpDest]); - } else + } else { crcErr = false; + } log_->debug("transportRx: Raw header: 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8 ", 0x%" PRIx8, diff --git a/src/rogue/protocols/rssi/Controller.cpp b/src/rogue/protocols/rssi/Controller.cpp index 7957d9d5e..fa621df96 100644 --- a/src/rogue/protocols/rssi/Controller.cpp +++ b/src/rogue/protocols/rssi/Controller.cpp @@ -240,21 +240,21 @@ void rpr::Controller::transportRx(ris::FramePtr frame) { // Reset if (head->rst) { - if (state_ == StOpen || state_ == StWaitSyn) { stQueue_.push(head); } - } + if (state_ == StOpen || state_ == StWaitSyn) { + stQueue_.push(head); + } // Syn frame goes to state machine if state = open // or we are waiting for ack replay - else if (head->syn) { + } else if (head->syn) { if (state_ == StOpen || state_ == StWaitSyn) { lastSeqRx_ = head->sequence; nextSeqRx_ = lastSeqRx_ + 1; stQueue_.push(head); } - } // Data or NULL in the correct sequence go to application - else if (state_ == StOpen && (head->nul || frame->getPayload() > rpr::Header::HeaderSize)) { + } else if (state_ == StOpen && (head->nul || frame->getPayload() > rpr::Header::HeaderSize)) { if (head->sequence == nextSeqRx_) { // log_->warning("Data or NULL in the correct sequence go to application: nextSeqRx_=0x%" PRIx8, // nextSeqRx_); @@ -293,22 +293,20 @@ void rpr::Controller::transportRx(ris::FramePtr frame) { // Notify after the last sequence update stCond_.notify_all(); - } // Check if received frame is already in out of order queue - else if ((it = oooQueue_.find(head->sequence)) != oooQueue_.end()) { + } else if ((it = oooQueue_.find(head->sequence)) != oooQueue_.end()) { log_->warning("Dropped duplicate frame. server=%" PRIu8 ", head->sequence=%" PRIu32 ", next sequence=%" PRIu32, server_, head->sequence, nextSeqRx_); dropCount_++; - } // Add to out of order queue in case things arrive out of order // Make sure received sequence is in window. There may be a better way // to do this while handling the 8 bit rollover - else { + } else { uint8_t x = nextSeqRx_; uint8_t windowEnd = (nextSeqRx_ + curMaxBuffers_ + 1); @@ -359,9 +357,9 @@ ris::FramePtr rpr::Controller::applicationTx() { if (head->nul) { head.reset(); frame.reset(); - } else + } else { (*(frame->beginBuffer()))->adjustHeader(rpr::Header::HeaderSize); - + } } while (!frame); return (frame); @@ -396,7 +394,9 @@ void rpr::Controller::applicationRx(ris::FramePtr frame) { flock->unlock(); // Connection is closed - if (state_ != StOpen) return; + if (state_ != StOpen) { + return; + } // Wait while busy either by flow control or buffer starvation while (txListCount_ >= curMaxBuffers_) { @@ -782,10 +782,9 @@ struct timeval& rpr::Controller::stateClosedWait() { if (head->rst) { state_ = StClosed; log_->warning("Closing link. Server=%" PRIu8, server_); - } // Syn ack - else if (head->syn && (head->ack || server_)) { + } else if (head->syn && (head->ack || server_)) { curMaxBuffers_ = head->maxOutstandingSegments; curMaxSegment_ = head->maxSegmentSize; curCumAckTout_ = head->cumulativeAckTimeout; @@ -804,13 +803,13 @@ struct timeval& rpr::Controller::stateClosedWait() { if (server_) { state_ = StSendSynAck; return (zeroTme_); - } else + } else { state_ = StSendSeqAck; + } gettimeofday(&stTime_, NULL); - } // reset counters - else { + } else { curMaxBuffers_ = locMaxBuffers_; curMaxSegment_ = locMaxSegment_; curCumAckTout_ = locCumAckTout_; @@ -819,10 +818,9 @@ struct timeval& rpr::Controller::stateClosedWait() { curMaxRetran_ = locMaxRetran_; curMaxCumAck_ = locMaxCumAck_; } - } // Generate syn after try period passes - else if ((!server_) && timePassed(stTime_, tryPeriodD1_)) { + } else if ((!server_) && timePassed(stTime_, tryPeriodD1_)) { // Allocate frame head = rpr::Header::create(tran_->reqFrame(rpr::Header::SynSize, false)); @@ -845,8 +843,9 @@ struct timeval& rpr::Controller::stateClosedWait() { // Update state gettimeofday(&stTime_, NULL); state_ = StWaitSyn; - } else if (server_) + } else if (server_) { state_ = StWaitSyn; + } return (tryPeriodD4_); } diff --git a/src/rogue/protocols/udp/Client.cpp b/src/rogue/protocols/udp/Client.cpp index 3fc436e1c..c8de9d9f4 100644 --- a/src/rogue/protocols/udp/Client.cpp +++ b/src/rogue/protocols/udp/Client.cpp @@ -173,8 +173,9 @@ void rpu::Client::acceptFrame(ris::FramePtr frame) { timeout_.tv_sec, timeout_.tv_usec); res = 0; - } else if ((res = sendmsg(fd_, &msg, 0)) < 0) + } else if ((res = sendmsg(fd_, &msg, 0)) < 0) { udpLog_->warning("UDP Write Call Failed"); + } } // Continue while write result was zero @@ -207,9 +208,9 @@ void rpu::Client::runThread(std::weak_ptr lockPtr) { if (res > 0) { // Message was too big - if (res > avail) + if (res > avail) { udpLog_->warning("Receive data was too large. Dropping."); - else { + } else { buff->setPayload(res); sendFrame(frame); } diff --git a/src/rogue/protocols/udp/Server.cpp b/src/rogue/protocols/udp/Server.cpp index d27e38fce..19ea6e198 100644 --- a/src/rogue/protocols/udp/Server.cpp +++ b/src/rogue/protocols/udp/Server.cpp @@ -174,8 +174,9 @@ void rpu::Server::acceptFrame(ris::FramePtr frame) { timeout_.tv_sec, timeout_.tv_usec); res = 0; - } else if ((res = sendmsg(fd_, &msg, 0)) < 0) + } else if ((res = sendmsg(fd_, &msg, 0)) < 0) { udpLog_->warning("UDP Write Call Failed"); + } } // Continue while write result was zero @@ -211,9 +212,9 @@ void rpu::Server::runThread(std::weak_ptr lockPtr) { if (res > 0) { // Message was too big - if (res > avail) + if (res > avail) { udpLog_->warning("Receive data was too large. Dropping."); - else { + } else { buff->setPayload(res); sendFrame(frame); } diff --git a/src/rogue/protocols/xilinx/XvcConnection.cpp b/src/rogue/protocols/xilinx/XvcConnection.cpp index c534bc16a..e479fd119 100644 --- a/src/rogue/protocols/xilinx/XvcConnection.cpp +++ b/src/rogue/protocols/xilinx/XvcConnection.cpp @@ -213,9 +213,9 @@ void rpx::XvcConnection::run() { tl_ = bytes; bump(2 * bytes); - } else + } else { throw(rogue::GeneralError::create("XvcConnection::run()", "Unsupported message received")); - + } flush(); /* Repeat until all the characters from the first chunk are exhausted* (most likely the chunk just contained diff --git a/src/rogue/utilities/Prbs.cpp b/src/rogue/utilities/Prbs.cpp index 67acdd9da..4fde1d73b 100644 --- a/src/rogue/utilities/Prbs.cpp +++ b/src/rogue/utilities/Prbs.cpp @@ -123,9 +123,9 @@ double ru::Prbs::updateTime(struct timeval* last) { if (timercmp(&per, &cmp, >)) { ret = (float)per.tv_sec + (float(per.tv_usec) / 1e6); gettimeofday(last, NULL); - } else + } else { ret = 0.0; - + } return ret; } @@ -369,9 +369,9 @@ void ru::Prbs::genFrame(uint32_t size) { // Generate payload while (frIter != frEnd) { - if (sendCount_) + if (sendCount_) { ris::toFrame(frIter, byteWidth_, wCount); - else { + } else { flfsr(data); ris::toFrame(frIter, byteWidth_, data); } diff --git a/src/rogue/utilities/StreamUnZip.cpp b/src/rogue/utilities/StreamUnZip.cpp index ac7416b81..a683d90c9 100644 --- a/src/rogue/utilities/StreamUnZip.cpp +++ b/src/rogue/utilities/StreamUnZip.cpp @@ -109,9 +109,9 @@ void ru::StreamUnZip::acceptFrame(ris::FramePtr frame) { if ((wBuff + 1) == newFrame->endBuffer()) { ris::FramePtr tmpFrame = this->reqFrame(frame->getPayload(), true); wBuff = newFrame->appendFrame(tmpFrame); - } else + } else { ++wBuff; - + } strm.next_out = (char*)(*wBuff)->begin(); strm.avail_out = (*wBuff)->getAvailable(); } diff --git a/src/rogue/utilities/StreamZip.cpp b/src/rogue/utilities/StreamZip.cpp index 6d17a8df9..e6477c828 100644 --- a/src/rogue/utilities/StreamZip.cpp +++ b/src/rogue/utilities/StreamZip.cpp @@ -98,8 +98,9 @@ void ru::StreamZip::acceptFrame(ris::FramePtr frame) { if (++rBuff != frame->endBuffer()) { strm.next_in = (char*)(*rBuff)->begin(); strm.avail_in = (*rBuff)->getPayload(); - } else + } else { done = true; + } } // Update write buffer if necessary @@ -108,9 +109,9 @@ void ru::StreamZip::acceptFrame(ris::FramePtr frame) { if ((wBuff + 1) == newFrame->endBuffer()) { ris::FramePtr tmpFrame = this->reqFrame(frame->getPayload(), true); wBuff = newFrame->appendFrame(tmpFrame); - } else + } else { ++wBuff; - + } strm.next_out = (char*)(*wBuff)->begin(); strm.avail_out = (*wBuff)->getAvailable(); } diff --git a/src/rogue/utilities/fileio/LegacyStreamReader.cpp b/src/rogue/utilities/fileio/LegacyStreamReader.cpp index 891c9f9ae..2a7015903 100644 --- a/src/rogue/utilities/fileio/LegacyStreamReader.cpp +++ b/src/rogue/utilities/fileio/LegacyStreamReader.cpp @@ -112,9 +112,9 @@ bool ruf::LegacyStreamReader::nextFile() { if (fd_ >= 0) { ::close(fd_); fd_ = -1; - } else + } else { return (false); - + } if (fdIdx_ == 0) return (false); fdIdx_++; diff --git a/src/rogue/utilities/fileio/StreamReader.cpp b/src/rogue/utilities/fileio/StreamReader.cpp index cf7eeef1a..8a66e33fe 100644 --- a/src/rogue/utilities/fileio/StreamReader.cpp +++ b/src/rogue/utilities/fileio/StreamReader.cpp @@ -113,9 +113,9 @@ bool ruf::StreamReader::nextFile() { if (fd_ >= 0) { ::close(fd_); fd_ = -1; - } else + } else { return (false); - + } if (fdIdx_ == 0) return (false); fdIdx_++; diff --git a/src/rogue/utilities/fileio/StreamWriter.cpp b/src/rogue/utilities/fileio/StreamWriter.cpp index b4394143f..dea80b900 100644 --- a/src/rogue/utilities/fileio/StreamWriter.cpp +++ b/src/rogue/utilities/fileio/StreamWriter.cpp @@ -311,10 +311,8 @@ void ruf::StreamWriter::intWrite(void* data, uint32_t size) { } currSize_ += size; totSize_ += size; - } - // Append to buffer if non zero - else if (buffSize_ > 0 && size > 0) { + } else if (buffSize_ > 0 && size > 0) { std::memcpy(buffer_ + currBuffer_, data, size); currBuffer_ += size; } From 9e385b8bb85743842002e9b825a506499be549de Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 13:10:46 -0700 Subject: [PATCH 07/41] resolving c++ linter Line contains only semicolon. If this should be an empty statement, use {} instead. [whitespace/semicolon] --- src/rogue/protocols/packetizer/Core.cpp | 4 +--- src/rogue/protocols/packetizer/CoreV2.cpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/rogue/protocols/packetizer/Core.cpp b/src/rogue/protocols/packetizer/Core.cpp index 53a1d3fbf..fcd5bb2ee 100644 --- a/src/rogue/protocols/packetizer/Core.cpp +++ b/src/rogue/protocols/packetizer/Core.cpp @@ -50,9 +50,7 @@ void rpp::Core::setup_python() { bp::class_("Core", bp::init()) .def("transport", &rpp::Core::transport) .def("application", &rpp::Core::application) - .def("getDropCount", &rpp::Core::getDropCount) - - ; + .def("getDropCount", &rpp::Core::getDropCount); #endif } diff --git a/src/rogue/protocols/packetizer/CoreV2.cpp b/src/rogue/protocols/packetizer/CoreV2.cpp index 7aab1fd89..ac6796b75 100644 --- a/src/rogue/protocols/packetizer/CoreV2.cpp +++ b/src/rogue/protocols/packetizer/CoreV2.cpp @@ -49,9 +49,7 @@ void rpp::CoreV2::setup_python() { bp::class_("CoreV2", bp::init()) .def("transport", &rpp::CoreV2::transport) .def("application", &rpp::CoreV2::application) - .def("getDropCount", &rpp::CoreV2::getDropCount) - - ; + .def("getDropCount", &rpp::CoreV2::getDropCount); #endif } From 8d98bcf5477437e7248e9982a15bdcee1f142724 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 13:18:22 -0700 Subject: [PATCH 08/41] increase linelength to 160 (required for block.cpp) --- CPPLINT.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 4e2511eb5..2b3e9217f 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -3,7 +3,7 @@ ####################################################### # Increase the max number of characters on a given line -linelength=120 +linelength=160 # List of filters to apply filter=-legal/copyright From 4d6b91b1cadd6527df0ce33b86237343243b25b9 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 13:18:53 -0700 Subject: [PATCH 09/41] resolving c++ linter Multi-line string (...) found. This lint script doesn't do well with such strings, and may give bogus warnings. Use C++11 raw strings or concatenation instead. [readability/multiline_string] --- src/rogue/hardware/axi/AxiMemMap.cpp | 9 +++++---- src/rogue/hardware/axi/AxiStreamDma.cpp | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/rogue/hardware/axi/AxiMemMap.cpp b/src/rogue/hardware/axi/AxiMemMap.cpp index ed50c6896..3e88f88f2 100644 --- a/src/rogue/hardware/axi/AxiMemMap.cpp +++ b/src/rogue/hardware/axi/AxiMemMap.cpp @@ -61,10 +61,11 @@ rha::AxiMemMap::AxiMemMap(std::string path) : rim::Slave(4, 0xFFFFFFFF) { // Check driver version ( ApiVersion 0x05 (or less) is the 32-bit address version) if (dmaGetApiVersion(fd_) < 0x06) { throw(rogue::GeneralError("AxiMemMap::AxiMemMap", - "Bad kernel driver version detected. Please re-compile kernel driver.\n \ - Note that aes-stream-driver (v5.15.2 or earlier) and rogue (v5.11.1 or earlier) are compatible with the 32-bit address API. \ - To use later versions (64-bit address API),, you will need to upgrade both rogue and aes-stream-driver at the same time to:\n \ - \t\taes-stream-driver = v5.16.0 (or later)\n\t\trogue = v5.13.0 (or later)")); + R"(Bad kernel driver version detected. Please re-compile kernel driver. + Note that aes-stream-driver (v5.15.2 or earlier) and rogue (v5.11.1 or earlier) are compatible with the 32-bit address API. + To use later versions (64-bit address API),, you will need to upgrade both rogue and aes-stream-driver at the same time to: + \t\taes-stream-driver = v5.16.0 (or later) + \t\trogue = v5.13.0 (or later))")); } // Check for mismatch in the rogue/loaded_driver API versions diff --git a/src/rogue/hardware/axi/AxiStreamDma.cpp b/src/rogue/hardware/axi/AxiStreamDma.cpp index ba0eb55ec..b4b8f21f4 100644 --- a/src/rogue/hardware/axi/AxiStreamDma.cpp +++ b/src/rogue/hardware/axi/AxiStreamDma.cpp @@ -91,10 +91,11 @@ rha::AxiStreamDmaSharedPtr rha::AxiStreamDma::openShared(std::string path, rogue if (dmaGetApiVersion(ret->fd) < 0x06) { ::close(ret->fd); throw(rogue::GeneralError("AxiStreamDma::openShared", - "Bad kernel driver version detected. Please re-compile kernel driver.\n \ - Note that aes-stream-driver (v5.15.2 or earlier) and rogue (v5.11.1 or earlier) are compatible with the 32-bit address API. \ - To use later versions (64-bit address API),, you will need to upgrade both rogue and aes-stream-driver at the same time to:\n \ - \t\taes-stream-driver = v5.16.0 (or later)\n\t\trogue = v5.13.0 (or later)")); + R"(Bad kernel driver version detected. Please re-compile kernel driver. + Note that aes-stream-driver (v5.15.2 or earlier) and rogue (v5.11.1 or earlier) are compatible with the 32-bit address API. + To use later versions (64-bit address API),, you will need to upgrade both rogue and aes-stream-driver at the same time to: + \t\taes-stream-driver = v5.16.0 (or later) + \t\trogue = v5.13.0 (or later))")); } // Check for mismatch in the rogue/loaded_driver API versions From d45e88671ad935cfda789809a91f34f475a4d088 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 13:22:06 -0700 Subject: [PATCH 10/41] resolving c++ linter Missing space after , [whitespace/comma] --- src/rogue/hardware/axi/AxiStreamDma.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rogue/hardware/axi/AxiStreamDma.cpp b/src/rogue/hardware/axi/AxiStreamDma.cpp index b4b8f21f4..4d87c20ab 100644 --- a/src/rogue/hardware/axi/AxiStreamDma.cpp +++ b/src/rogue/hardware/axi/AxiStreamDma.cpp @@ -449,8 +449,8 @@ void rha::AxiStreamDma::retBuffer(uint8_t* data, uint32_t meta, uint32_t size) { if ( count > 100 ) count = 100; for (x=0; x < count; x++) ret[x] = retQueue_.pop() & 0x3FFFFFFF; - if ( dmaRetIndexes(fd_,count,ret) < 0 ) - throw(rogue::GeneralError("AxiStreamDma::retBuffer","AXIS Return Buffer Call Failed!!!!")); + if ( dmaRetIndexes(fd_, count, ret) < 0 ) + throw(rogue::GeneralError("AxiStreamDma::retBuffer", "AXIS Return Buffer Call Failed!!!!")); decCounter(size*count); printf("Return done\n"); From 754c7977d5fca8e8afd37763d9c490d093438f74 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 13:30:03 -0700 Subject: [PATCH 11/41] resolving c++ linter Weird number of spaces at line-start. Are you using a 2-space indent? [whitespace/indent] --- src/rogue/interfaces/memory/Emulate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rogue/interfaces/memory/Emulate.cpp b/src/rogue/interfaces/memory/Emulate.cpp index 90acfe568..de77132ed 100644 --- a/src/rogue/interfaces/memory/Emulate.cpp +++ b/src/rogue/interfaces/memory/Emulate.cpp @@ -47,9 +47,9 @@ rim::EmulatePtr rim::Emulate::create(uint32_t min, uint32_t max) { //! Create an block rim::Emulate::Emulate(uint32_t min, uint32_t max) : Slave(min, max) { - totAlloc_ = 0; - totSize_ = 0; - log_ = rogue::Logging::create("memory.Emulate"); + totAlloc_ = 0; + totSize_ = 0; + log_ = rogue::Logging::create("memory.Emulate"); } //! Destroy a block From cf1635ea5edf421d12c48113246818289e34e362 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 13:49:25 -0700 Subject: [PATCH 12/41] resolving c++ linter public: should be indented +1 space inside class [whitespace/indent] --- include/rogue/EnableSharedFromThis.h | 4 ++-- include/rogue/GeneralError.h | 2 +- include/rogue/GilRelease.h | 2 +- include/rogue/Logging.h | 4 ++-- include/rogue/Queue.h | 4 ++-- include/rogue/ScopedGil.h | 2 +- include/rogue/Version.h | 2 +- include/rogue/hardware/MemMap.h | 2 +- include/rogue/hardware/axi/AxiMemMap.h | 2 +- include/rogue/hardware/axi/AxiStreamDma.h | 4 ++-- include/rogue/interfaces/ZmqClient.h | 4 ++-- include/rogue/interfaces/ZmqServer.h | 4 ++-- include/rogue/interfaces/api/Bsp.h | 4 ++-- include/rogue/interfaces/memory/Block.h | 8 ++++---- include/rogue/interfaces/memory/Emulate.h | 2 +- include/rogue/interfaces/memory/Hub.h | 4 ++-- include/rogue/interfaces/memory/Master.h | 8 ++++---- include/rogue/interfaces/memory/Slave.h | 4 ++-- include/rogue/interfaces/memory/TcpClient.h | 2 +- include/rogue/interfaces/memory/TcpServer.h | 2 +- include/rogue/interfaces/memory/Transaction.h | 8 ++++---- include/rogue/interfaces/memory/TransactionLock.h | 2 +- include/rogue/interfaces/memory/Variable.h | 6 +++--- include/rogue/interfaces/stream/Buffer.h | 2 +- include/rogue/interfaces/stream/Fifo.h | 2 +- include/rogue/interfaces/stream/Filter.h | 2 +- include/rogue/interfaces/stream/Frame.h | 4 ++-- include/rogue/interfaces/stream/FrameAccessor.h | 4 ++-- include/rogue/interfaces/stream/FrameIterator.h | 4 ++-- include/rogue/interfaces/stream/FrameLock.h | 2 +- include/rogue/interfaces/stream/Master.h | 2 +- include/rogue/interfaces/stream/Pool.h | 4 ++-- include/rogue/interfaces/stream/RateDrop.h | 2 +- include/rogue/interfaces/stream/Slave.h | 4 ++-- include/rogue/interfaces/stream/TcpClient.h | 2 +- include/rogue/interfaces/stream/TcpCore.h | 4 ++-- include/rogue/interfaces/stream/TcpServer.h | 2 +- include/rogue/protocols/batcher/CoreV1.h | 2 +- include/rogue/protocols/batcher/Data.h | 2 +- include/rogue/protocols/batcher/InverterV1.h | 2 +- include/rogue/protocols/batcher/SplitterV1.h | 2 +- include/rogue/protocols/packetizer/Application.h | 2 +- include/rogue/protocols/packetizer/CRC.h | 6 +++--- include/rogue/protocols/packetizer/Controller.h | 4 ++-- include/rogue/protocols/packetizer/ControllerV1.h | 2 +- include/rogue/protocols/packetizer/ControllerV2.h | 2 +- include/rogue/protocols/packetizer/Core.h | 2 +- include/rogue/protocols/packetizer/CoreV2.h | 2 +- include/rogue/protocols/packetizer/Transport.h | 2 +- include/rogue/protocols/rssi/Application.h | 2 +- include/rogue/protocols/rssi/Client.h | 2 +- include/rogue/protocols/rssi/Controller.h | 4 ++-- include/rogue/protocols/rssi/Header.h | 6 +++--- include/rogue/protocols/rssi/Server.h | 2 +- include/rogue/protocols/rssi/Transport.h | 2 +- include/rogue/protocols/srp/Cmd.h | 2 +- include/rogue/protocols/srp/SrpV0.h | 2 +- include/rogue/protocols/srp/SrpV3.h | 2 +- include/rogue/protocols/udp/Client.h | 2 +- include/rogue/protocols/udp/Core.h | 4 ++-- include/rogue/protocols/udp/Server.h | 2 +- include/rogue/protocols/xilinx/JtagDriver.h | 8 ++++---- include/rogue/protocols/xilinx/Xvc.h | 4 ++-- include/rogue/protocols/xilinx/XvcConnection.h | 2 +- include/rogue/protocols/xilinx/XvcServer.h | 4 ++-- include/rogue/utilities/Prbs.h | 2 +- include/rogue/utilities/StreamUnZip.h | 2 +- include/rogue/utilities/StreamZip.h | 2 +- include/rogue/utilities/fileio/LegacyStreamReader.h | 2 +- include/rogue/utilities/fileio/LegacyStreamWriter.h | 4 ++-- include/rogue/utilities/fileio/StreamReader.h | 2 +- include/rogue/utilities/fileio/StreamWriter.h | 4 ++-- include/rogue/utilities/fileio/StreamWriterChannel.h | 2 +- 73 files changed, 113 insertions(+), 113 deletions(-) diff --git a/include/rogue/EnableSharedFromThis.h b/include/rogue/EnableSharedFromThis.h index 6c54897a7..6266d239f 100644 --- a/include/rogue/EnableSharedFromThis.h +++ b/include/rogue/EnableSharedFromThis.h @@ -28,13 +28,13 @@ namespace rogue { class EnableSharedFromThisBase : public std::enable_shared_from_this { - public: + public: virtual ~EnableSharedFromThisBase() {} }; template class EnableSharedFromThis : virtual public EnableSharedFromThisBase { - public: + public: std::shared_ptr shared_from_this() { return std::dynamic_pointer_cast(EnableSharedFromThisBase::shared_from_this()); } diff --git a/include/rogue/GeneralError.h b/include/rogue/GeneralError.h index 3a54dc259..4b61c2705 100644 --- a/include/rogue/GeneralError.h +++ b/include/rogue/GeneralError.h @@ -47,7 +47,7 @@ class GeneralError : public std::exception { char text_[BuffSize]; - public: + public: GeneralError(std::string src, std::string text); static GeneralError create(std::string src, const char* fmt, ...); diff --git a/include/rogue/GilRelease.h b/include/rogue/GilRelease.h index 6892288dd..9d637c0e9 100644 --- a/include/rogue/GilRelease.h +++ b/include/rogue/GilRelease.h @@ -34,7 +34,7 @@ class GilRelease { PyThreadState* state_; #endif - public: + public: GilRelease(); ~GilRelease(); void acquire(); diff --git a/include/rogue/Logging.h b/include/rogue/Logging.h index aeed6efa2..86b37435b 100644 --- a/include/rogue/Logging.h +++ b/include/rogue/Logging.h @@ -34,7 +34,7 @@ namespace rogue { //! Filter class LogFilter { - public: + public: std::string name_; uint32_t level_; @@ -63,7 +63,7 @@ class Logging { //! Logger name std::string name_; - public: + public: static const uint32_t Critical = 50; static const uint32_t Error = 40; static const uint32_t Thread = 35; diff --git a/include/rogue/Queue.h b/include/rogue/Queue.h index 4b26a468a..287338adb 100644 --- a/include/rogue/Queue.h +++ b/include/rogue/Queue.h @@ -30,7 +30,7 @@ namespace rogue { template class Queue { - private: + private: std::queue queue_; mutable std::mutex mtx_; std::condition_variable pushCond_; @@ -40,7 +40,7 @@ class Queue { bool busy_; bool run_; - public: + public: Queue() { max_ = 0; thold_ = 0; diff --git a/include/rogue/ScopedGil.h b/include/rogue/ScopedGil.h index bdc40525e..2f43c433d 100644 --- a/include/rogue/ScopedGil.h +++ b/include/rogue/ScopedGil.h @@ -33,7 +33,7 @@ class ScopedGil { PyGILState_STATE state_; #endif - public: + public: ScopedGil(); ~ScopedGil(); }; diff --git a/include/rogue/Version.h b/include/rogue/Version.h index 383b4ad71..18e4ce87b 100644 --- a/include/rogue/Version.h +++ b/include/rogue/Version.h @@ -39,7 +39,7 @@ class Version { static uint32_t _maint; static uint32_t _devel; - public: + public: Version() {} static std::string current(); diff --git a/include/rogue/hardware/MemMap.h b/include/rogue/hardware/MemMap.h index dfbd1775d..bb7877aa1 100644 --- a/include/rogue/hardware/MemMap.h +++ b/include/rogue/hardware/MemMap.h @@ -60,7 +60,7 @@ class MemMap : public rogue::interfaces::memory::Slave { // Queue rogue::Queue> queue_; - public: + public: //! Class factory which returns a MemMapPtr to a newly created MemMap object /** Exposed to Python as rogue.hardware.MemMap() * @param base Base address to map diff --git a/include/rogue/hardware/axi/AxiMemMap.h b/include/rogue/hardware/axi/AxiMemMap.h index 3374a531e..17f12af58 100644 --- a/include/rogue/hardware/axi/AxiMemMap.h +++ b/include/rogue/hardware/axi/AxiMemMap.h @@ -57,7 +57,7 @@ class AxiMemMap : public rogue::interfaces::memory::Slave { // Queue rogue::Queue> queue_; - public: + public: //! Class factory which returns a AxiMemMapPtr to a newly created AxiMemMap object /** Exposed to Python as rogue.hardware.axi.AxiMemMap() * @param path Path to device. i.e /dev/datadev_0 diff --git a/include/rogue/hardware/axi/AxiStreamDma.h b/include/rogue/hardware/axi/AxiStreamDma.h index 73359b7b4..2b8dee806 100644 --- a/include/rogue/hardware/axi/AxiStreamDma.h +++ b/include/rogue/hardware/axi/AxiStreamDma.h @@ -31,7 +31,7 @@ namespace axi { //! Storage class for shared memory buffers class AxiStreamDmaShared { - public: + public: AxiStreamDmaShared(std::string path); //! Shared FD @@ -112,7 +112,7 @@ class AxiStreamDma : public rogue::interfaces::stream::Master, public rogue::int //! Close shared buffer space static void closeShared(std::shared_ptr); - public: + public: //! Class factory which returns a AxiStreamDmaPtr to a newly created AxiStreamDma object /** Exposed to Python as rogue.hardware.axi.AxiStreamDma() * diff --git a/include/rogue/interfaces/ZmqClient.h b/include/rogue/interfaces/ZmqClient.h index 46af6ca2c..6e7761b6d 100644 --- a/include/rogue/interfaces/ZmqClient.h +++ b/include/rogue/interfaces/ZmqClient.h @@ -55,7 +55,7 @@ class ZmqClient { void runThread(); - public: + public: static std::shared_ptr create(std::string addr, uint16_t port, bool doString); //! Setup class in python @@ -90,7 +90,7 @@ typedef std::shared_ptr ZmqClientPtr; //! Stream slave class, wrapper to enable python overload of virtual methods class ZmqClientWrap : public rogue::interfaces::ZmqClient, public boost::python::wrapper { - public: + public: ZmqClientWrap(std::string addr, uint16_t port, bool doString); void doUpdate(boost::python::object data); diff --git a/include/rogue/interfaces/ZmqServer.h b/include/rogue/interfaces/ZmqServer.h index 75e68dbed..26436475a 100644 --- a/include/rogue/interfaces/ZmqServer.h +++ b/include/rogue/interfaces/ZmqServer.h @@ -59,7 +59,7 @@ class ZmqServer { bool tryConnect(); - public: + public: static std::shared_ptr create(std::string addr, uint16_t port); //! Setup class in python @@ -87,7 +87,7 @@ typedef std::shared_ptr ZmqServerPtr; //! Stream slave class, wrapper to enable python overload of virtual methods class ZmqServerWrap : public rogue::interfaces::ZmqServer, public boost::python::wrapper { - public: + public: ZmqServerWrap(std::string addr, uint16_t port); boost::python::object doRequest(boost::python::object data); diff --git a/include/rogue/interfaces/api/Bsp.h b/include/rogue/interfaces/api/Bsp.h index e945e3554..044f07844 100644 --- a/include/rogue/interfaces/api/Bsp.h +++ b/include/rogue/interfaces/api/Bsp.h @@ -25,12 +25,12 @@ namespace api { //! Bsp Class class Bsp { - protected: + protected: boost::python::object _obj; bool _isRoot; std::string _name; - public: + public: //! Class factory static std::shared_ptr create(boost::python::object obj); static std::shared_ptr create(std::string modName, std::string rootClass); diff --git a/include/rogue/interfaces/memory/Block.h b/include/rogue/interfaces/memory/Block.h index 37b6b2ad4..0de90793e 100644 --- a/include/rogue/interfaces/memory/Block.h +++ b/include/rogue/interfaces/memory/Block.h @@ -71,7 +71,7 @@ class Variable; //! Memory interface Block device class Block : public Master { - protected: + protected: // Mutex std::mutex mtx_; @@ -164,7 +164,7 @@ class Block : public Master { // Custom cleanup function called before delete virtual void customClean(); - public: + public: //! Class factory which returns a pointer to a Block (BlockPtr) /** Exposed to Python as rogue.interfaces.memory.Block() * @@ -248,7 +248,7 @@ class Block : public Master { //! Get block python transactions flag bool blockPyTrans(); - private: + private: //! Start a c++ transaction for this block, internal version /** Start a c++ transaction with the passed type and access range * @@ -264,7 +264,7 @@ class Block : public Master { rogue::interfaces::memory::Variable* var, int32_t index); - public: + public: //! Start a c++ transaction for this block /** Start a c++ transaction with the passed type and access range * diff --git a/include/rogue/interfaces/memory/Emulate.h b/include/rogue/interfaces/memory/Emulate.h index f3d67d6ce..9639d87e3 100644 --- a/include/rogue/interfaces/memory/Emulate.h +++ b/include/rogue/interfaces/memory/Emulate.h @@ -58,7 +58,7 @@ class Emulate : public Slave { //! Log std::shared_ptr log_; - public: + public: //! Class factory which returns a pointer to a Emulate (EmulatePtr) /** Exposed to Python as rogue.interfaces.memory.Emualte() * diff --git a/include/rogue/interfaces/memory/Hub.h b/include/rogue/interfaces/memory/Hub.h index 41ea84e51..7218c1ed0 100644 --- a/include/rogue/interfaces/memory/Hub.h +++ b/include/rogue/interfaces/memory/Hub.h @@ -67,7 +67,7 @@ class Hub : public Master, public Slave { //! Log std::shared_ptr log_; - public: + public: //! Class factory which returns a pointer to a Hub (HubPtr) /** Exposed to Python as rogue.interfaces.memory.Hub() * @@ -170,7 +170,7 @@ typedef std::shared_ptr HubPtr; // Memory Hub class, wrapper to enable python overload of virtual methods class HubWrap : public rogue::interfaces::memory::Hub, public boost::python::wrapper { - public: + public: // Constructor HubWrap(uint64_t offset, uint32_t min, uint32_t max); diff --git a/include/rogue/interfaces/memory/Master.h b/include/rogue/interfaces/memory/Master.h index 98c8cbdaf..0a73544ab 100644 --- a/include/rogue/interfaces/memory/Master.h +++ b/include/rogue/interfaces/memory/Master.h @@ -51,7 +51,7 @@ class Transaction; class Master { friend class Transaction; - private: + private: //! Alias for map typedef std::map > TransactionMap; @@ -73,7 +73,7 @@ class Master { //! Log std::shared_ptr log_; - public: + public: //! Class factory which returns a pointer to a Master (MasterPtr) /** Exposed as rogue.interfaces.memory.Master() to Python */ @@ -287,11 +287,11 @@ class Master { std::shared_ptr& operator>>( std::shared_ptr& other); - protected: + protected: //! Internal transaction uint32_t intTransaction(std::shared_ptr tran); - public: + public: //! Wait for one or more transactions to complete /** This method is called to wait on transaction completion or timeout. * Passing an id of zero will wait for all current pending transactions to diff --git a/include/rogue/interfaces/memory/Slave.h b/include/rogue/interfaces/memory/Slave.h index 7444904b1..33055d840 100644 --- a/include/rogue/interfaces/memory/Slave.h +++ b/include/rogue/interfaces/memory/Slave.h @@ -78,7 +78,7 @@ class Slave : public rogue::EnableSharedFromThis SlavePtr; // Memory slave class, wrapper to enable python overload of virtual methods class SlaveWrap : public rogue::interfaces::memory::Slave, public boost::python::wrapper { - public: + public: // Constructor SlaveWrap(uint32_t min, uint32_t max); diff --git a/include/rogue/interfaces/memory/TcpClient.h b/include/rogue/interfaces/memory/TcpClient.h index 702bc2bb8..ec5953ef2 100644 --- a/include/rogue/interfaces/memory/TcpClient.h +++ b/include/rogue/interfaces/memory/TcpClient.h @@ -72,7 +72,7 @@ class TcpClient : public rogue::interfaces::memory::Slave { // Lock std::mutex bridgeMtx_; - public: + public: //! Create a TcpClient object and return as a TcpServerPtr /**The creator takes an address and port. The passed address is the address of * the remote TcpServer to connect to, and can either be an IP address or hostname. diff --git a/include/rogue/interfaces/memory/TcpServer.h b/include/rogue/interfaces/memory/TcpServer.h index b011dcbdb..f47279281 100644 --- a/include/rogue/interfaces/memory/TcpServer.h +++ b/include/rogue/interfaces/memory/TcpServer.h @@ -66,7 +66,7 @@ class TcpServer : public rogue::interfaces::memory::Master { std::thread* thread_; bool threadEn_; - public: + public: //! Create a TcpServer object and return as a TcpServerPtr /**The creator takes an address and port. The passed address can either be * an IP address or hostname. The address string defines which network interface diff --git a/include/rogue/interfaces/memory/Transaction.h b/include/rogue/interfaces/memory/Transaction.h index fc641f067..ed6e7d8f6 100644 --- a/include/rogue/interfaces/memory/Transaction.h +++ b/include/rogue/interfaces/memory/Transaction.h @@ -61,11 +61,11 @@ class Transaction : public rogue::EnableSharedFromThis tran_; bool locked_; - public: + public: // Class factory which returns a pointer to a TransactionLock (TransactionLockPtr) static std::shared_ptr create( std::shared_ptr transaction); diff --git a/include/rogue/interfaces/memory/Variable.h b/include/rogue/interfaces/memory/Variable.h index aea597961..4d5c5e78e 100644 --- a/include/rogue/interfaces/memory/Variable.h +++ b/include/rogue/interfaces/memory/Variable.h @@ -48,7 +48,7 @@ typedef std::shared_ptr VariablePtr; class Variable { friend class Block; - protected: + protected: // Associated block rogue::interfaces::memory::Block* block_; @@ -242,7 +242,7 @@ class Variable { double (rogue::interfaces::memory::Block::*getFixed_)(rogue::interfaces::memory::Variable*, int32_t index); - public: + public: //! Class factory which returns a pointer to a Variable (VariablePtr) /** Exposed to Python as rogue.interfaces.memory.Variable() * @@ -556,7 +556,7 @@ class VariableWrap : public rogue::interfaces::memory::Variable, public boost::python::wrapper { boost::python::object model_; - public: + public: // Create a Variable VariableWrap(std::string name, std::string mode, diff --git a/include/rogue/interfaces/stream/Buffer.h b/include/rogue/interfaces/stream/Buffer.h index 6b357e29f..21346ab35 100644 --- a/include/rogue/interfaces/stream/Buffer.h +++ b/include/rogue/interfaces/stream/Buffer.h @@ -77,7 +77,7 @@ class Buffer { // Error state uint32_t error_; - public: + public: //! Alias for using uint8_t * as Buffer::iterator typedef uint8_t* iterator; diff --git a/include/rogue/interfaces/stream/Fifo.h b/include/rogue/interfaces/stream/Fifo.h index 7c0f71bd8..d4d6499f5 100644 --- a/include/rogue/interfaces/stream/Fifo.h +++ b/include/rogue/interfaces/stream/Fifo.h @@ -70,7 +70,7 @@ class Fifo : public rogue::interfaces::stream::Master, public rogue::interfaces: // Thread background void runThread(); - public: + public: //! Create a Fifo object and return as a FifoPtr /** Exposed as rogue.interfaces.stream.Fifo() to Python * @param maxDepth Set to a non-zero value to configured fixed size mode. diff --git a/include/rogue/interfaces/stream/Filter.h b/include/rogue/interfaces/stream/Filter.h index 98762bb5d..b8769491b 100644 --- a/include/rogue/interfaces/stream/Filter.h +++ b/include/rogue/interfaces/stream/Filter.h @@ -49,7 +49,7 @@ class Filter : public rogue::interfaces::stream::Master, public rogue::interface bool dropErrors_; uint8_t channel_; - public: + public: //! Create a Filter object and return as a FilterPtr /** @param dropErrors Set to True to drop errored Frames * @param channel Set channel number to allow through the filter. diff --git a/include/rogue/interfaces/stream/Frame.h b/include/rogue/interfaces/stream/Frame.h index 2291cfb01..6e72406f5 100644 --- a/include/rogue/interfaces/stream/Frame.h +++ b/include/rogue/interfaces/stream/Frame.h @@ -82,14 +82,14 @@ class Frame : public rogue::EnableSharedFromThis >::iterator as Buffer::iterator typedef std::vector >::iterator BufferIterator; diff --git a/include/rogue/interfaces/stream/FrameAccessor.h b/include/rogue/interfaces/stream/FrameAccessor.h index 22acf9eb8..a7660f63f 100644 --- a/include/rogue/interfaces/stream/FrameAccessor.h +++ b/include/rogue/interfaces/stream/FrameAccessor.h @@ -36,14 +36,14 @@ namespace stream { //! Frame Accessor template class FrameAccessor { - private: + private: // Data container T* data_; // Size value uint32_t size_; - public: + public: //! Creator FrameAccessor(rogue::interfaces::stream::FrameIterator& iter, uint32_t size) { data_ = (T*)iter.ptr(); diff --git a/include/rogue/interfaces/stream/FrameIterator.h b/include/rogue/interfaces/stream/FrameIterator.h index ef34d6e78..9bd004390 100644 --- a/include/rogue/interfaces/stream/FrameIterator.h +++ b/include/rogue/interfaces/stream/FrameIterator.h @@ -43,7 +43,7 @@ class Buffer; class FrameIterator : public std::iterator { friend class Frame; - private: + private: // Creator FrameIterator(std::shared_ptr frame, bool write, bool end); @@ -77,7 +77,7 @@ class FrameIterator : public std::iterator frame_; bool locked_; - public: + public: // Class factory which returns a pointer to a FrameLock (FrameLockPtr) /* Only called by Frame object. * Create a new Frame lock on the passed Frame. diff --git a/include/rogue/interfaces/stream/Master.h b/include/rogue/interfaces/stream/Master.h index 04e8226b3..c59d4b885 100644 --- a/include/rogue/interfaces/stream/Master.h +++ b/include/rogue/interfaces/stream/Master.h @@ -59,7 +59,7 @@ class Master : public rogue::EnableSharedFromThis defSlave_; - public: + public: //! Class factory which returns a pointer to a Master object (MasterPtr) /** Create a new Master * diff --git a/include/rogue/interfaces/stream/Pool.h b/include/rogue/interfaces/stream/Pool.h index f3772949a..4c71b139f 100644 --- a/include/rogue/interfaces/stream/Pool.h +++ b/include/rogue/interfaces/stream/Pool.h @@ -73,7 +73,7 @@ class Pool : public rogue::EnableSharedFromThis // Buffer queue count uint32_t poolSize_; - public: + public: // Class creator Pool(); @@ -154,7 +154,7 @@ class Pool : public rogue::EnableSharedFromThis */ uint32_t getPoolSize(); - protected: + protected: //! Allocate and Create a Buffer /** This method is the default Buffer allocator. The requested * buffer is created from either a malloc call or fulling a free entry from diff --git a/include/rogue/interfaces/stream/RateDrop.h b/include/rogue/interfaces/stream/RateDrop.h index e423d3360..524df7c4b 100644 --- a/include/rogue/interfaces/stream/RateDrop.h +++ b/include/rogue/interfaces/stream/RateDrop.h @@ -53,7 +53,7 @@ class RateDrop : public rogue::interfaces::stream::Master, public rogue::interfa struct timeval nextPeriod_; - public: + public: //! Create a RateDrop object and return as a RateDropPtr /** @param period Set to true to define the parameter as a period value. * @param value Period value or drop count diff --git a/include/rogue/interfaces/stream/Slave.h b/include/rogue/interfaces/stream/Slave.h index 35955348b..4258f06ce 100644 --- a/include/rogue/interfaces/stream/Slave.h +++ b/include/rogue/interfaces/stream/Slave.h @@ -61,7 +61,7 @@ class Slave : public rogue::interfaces::stream::Pool, uint64_t frameCount_; uint64_t frameBytes_; - public: + public: //! Class factory which returns a pointer to a Slave (SlavePtr) /** Create a new Slave * @@ -169,7 +169,7 @@ typedef std::shared_ptr SlavePtr; // Stream slave class, wrapper to enable python overload of virtual methods class SlaveWrap : public rogue::interfaces::stream::Slave, public boost::python::wrapper { - public: + public: // Accept frame void acceptFrame(std::shared_ptr frame); diff --git a/include/rogue/interfaces/stream/TcpClient.h b/include/rogue/interfaces/stream/TcpClient.h index a3a67313e..c941d478b 100644 --- a/include/rogue/interfaces/stream/TcpClient.h +++ b/include/rogue/interfaces/stream/TcpClient.h @@ -40,7 +40,7 @@ namespace stream { /** This class is a wrapper around TcpCore which operates in client mode. */ class TcpClient : public rogue::interfaces::stream::TcpCore { - public: + public: //! Create a TcpClient object and return as a TcpClientPtr /**The creator takes an address and port. The passed server address can either * be an IP address or hostname. The stream bridge requires two TCP ports. diff --git a/include/rogue/interfaces/stream/TcpCore.h b/include/rogue/interfaces/stream/TcpCore.h index c2adbcb2d..b71a82899 100644 --- a/include/rogue/interfaces/stream/TcpCore.h +++ b/include/rogue/interfaces/stream/TcpCore.h @@ -48,7 +48,7 @@ namespace stream { * utilized when a connection has been established. */ class TcpCore : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave { - protected: + protected: // Inbound Address std::string pullAddr_; @@ -77,7 +77,7 @@ class TcpCore : public rogue::interfaces::stream::Master, public rogue::interfac // Lock std::mutex bridgeMtx_; - public: + public: //! Create a TcpCore object and return as a TcpCorePtr /**The creator takes an address, port and server mode flag. The passed * address can either be an IP address or hostname. When running in server diff --git a/include/rogue/interfaces/stream/TcpServer.h b/include/rogue/interfaces/stream/TcpServer.h index f6813d980..9931c8b1b 100644 --- a/include/rogue/interfaces/stream/TcpServer.h +++ b/include/rogue/interfaces/stream/TcpServer.h @@ -40,7 +40,7 @@ namespace stream { /** This class is a wrapper around TcpCore which operates in server mode. */ class TcpServer : public rogue::interfaces::stream::TcpCore { - public: + public: //! Create a TcpServer object and return as a TcpServerPtr /**The creator takes an address and port. The passed address can either be * an IP address or hostname. The address string defines which network interface diff --git a/include/rogue/protocols/batcher/CoreV1.h b/include/rogue/protocols/batcher/CoreV1.h index fbae38d76..e12b1e072 100644 --- a/include/rogue/protocols/batcher/CoreV1.h +++ b/include/rogue/protocols/batcher/CoreV1.h @@ -58,7 +58,7 @@ class CoreV1 { //! Sequence number uint32_t seq_; - public: + public: //! Setup class in python static void setup_python(); diff --git a/include/rogue/protocols/batcher/Data.h b/include/rogue/protocols/batcher/Data.h index e5b8c6b16..9ef837f34 100644 --- a/include/rogue/protocols/batcher/Data.h +++ b/include/rogue/protocols/batcher/Data.h @@ -51,7 +51,7 @@ class Data { //! Last user uint8_t lUser_; - public: + public: //! Setup class in python static void setup_python(); diff --git a/include/rogue/protocols/batcher/InverterV1.h b/include/rogue/protocols/batcher/InverterV1.h index d10b8372a..2eef023c9 100644 --- a/include/rogue/protocols/batcher/InverterV1.h +++ b/include/rogue/protocols/batcher/InverterV1.h @@ -37,7 +37,7 @@ namespace batcher { //! AXI Stream FIFO class InverterV1 : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave { - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/batcher/SplitterV1.h b/include/rogue/protocols/batcher/SplitterV1.h index 6c521de3a..9037e6dd0 100644 --- a/include/rogue/protocols/batcher/SplitterV1.h +++ b/include/rogue/protocols/batcher/SplitterV1.h @@ -37,7 +37,7 @@ namespace batcher { //! AXI Stream FIFO class SplitterV1 : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave { - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/packetizer/Application.h b/include/rogue/protocols/packetizer/Application.h index b054cc6b6..fb7b4bb35 100644 --- a/include/rogue/protocols/packetizer/Application.h +++ b/include/rogue/protocols/packetizer/Application.h @@ -50,7 +50,7 @@ class Application : public rogue::interfaces::stream::Master, public rogue::inte // Application queue rogue::Queue> queue_; - public: + public: //! Class creation static std::shared_ptr create(uint8_t id); diff --git a/include/rogue/protocols/packetizer/CRC.h b/include/rogue/protocols/packetizer/CRC.h index de4cb73e0..454486a78 100644 --- a/include/rogue/protocols/packetizer/CRC.h +++ b/include/rogue/protocols/packetizer/CRC.h @@ -139,7 +139,7 @@ namespace CRCPP { performed at compile-time instead of at runtime. */ class CRC { - public: + public: // Forward declaration template struct Table; @@ -177,7 +177,7 @@ class CRC { CRCType operator[](unsigned char index) const; - private: + private: void InitTable(); Parameters parameters; ///< CRC parameters used to construct the table @@ -280,7 +280,7 @@ class CRC { CRC& operator=(CRC&& other) = delete; #endif - private: + private: #ifndef CRCPP_USE_CPP11 CRC(); CRC(const CRC& other); diff --git a/include/rogue/protocols/packetizer/Controller.h b/include/rogue/protocols/packetizer/Controller.h index b3e331cc3..8447d5455 100644 --- a/include/rogue/protocols/packetizer/Controller.h +++ b/include/rogue/protocols/packetizer/Controller.h @@ -37,7 +37,7 @@ class Header; //! Packetizer Controller Class class Controller { - protected: + protected: // parameters bool enSsi_; uint32_t appIndex_; @@ -65,7 +65,7 @@ class Controller { rogue::Queue> tranQueue_; - public: + public: //! Creator Controller(std::shared_ptr tran, std::shared_ptr* app, diff --git a/include/rogue/protocols/packetizer/ControllerV1.h b/include/rogue/protocols/packetizer/ControllerV1.h index 367e4db16..aeff2dcd0 100644 --- a/include/rogue/protocols/packetizer/ControllerV1.h +++ b/include/rogue/protocols/packetizer/ControllerV1.h @@ -42,7 +42,7 @@ class Header; //! Packetizer Controller Class class ControllerV1 : public Controller, public rogue::EnableSharedFromThis { - public: + public: //! Class creation static std::shared_ptr create( bool enSsi, diff --git a/include/rogue/protocols/packetizer/ControllerV2.h b/include/rogue/protocols/packetizer/ControllerV2.h index f0c5db841..0a2f4e88d 100644 --- a/include/rogue/protocols/packetizer/ControllerV2.h +++ b/include/rogue/protocols/packetizer/ControllerV2.h @@ -45,7 +45,7 @@ class ControllerV2 : public Controller, public rogue::EnableSharedFromThis create( bool enIbCrc, diff --git a/include/rogue/protocols/packetizer/Core.h b/include/rogue/protocols/packetizer/Core.h index e1403430b..3188a4856 100644 --- a/include/rogue/protocols/packetizer/Core.h +++ b/include/rogue/protocols/packetizer/Core.h @@ -42,7 +42,7 @@ class Core { //! Core module std::shared_ptr cntl_; - public: + public: //! Class creation static std::shared_ptr create(bool enSsi); diff --git a/include/rogue/protocols/packetizer/CoreV2.h b/include/rogue/protocols/packetizer/CoreV2.h index 3e322b2a9..9520932e8 100644 --- a/include/rogue/protocols/packetizer/CoreV2.h +++ b/include/rogue/protocols/packetizer/CoreV2.h @@ -45,7 +45,7 @@ class CoreV2 { //! Core module std::shared_ptr cntl_; - public: + public: //! Class creation static std::shared_ptr create(bool enIbCrc, bool enObCrc, bool enSsi); diff --git a/include/rogue/protocols/packetizer/Transport.h b/include/rogue/protocols/packetizer/Transport.h index 4ade68780..c2e4a08b6 100644 --- a/include/rogue/protocols/packetizer/Transport.h +++ b/include/rogue/protocols/packetizer/Transport.h @@ -43,7 +43,7 @@ class Transport : public rogue::interfaces::stream::Master, public rogue::interf //! Thread background void runThread(); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/rssi/Application.h b/include/rogue/protocols/rssi/Application.h index 4b13e7cd1..0d911684e 100644 --- a/include/rogue/protocols/rssi/Application.h +++ b/include/rogue/protocols/rssi/Application.h @@ -43,7 +43,7 @@ class Application : public rogue::interfaces::stream::Master, public rogue::inte //! Thread background void runThread(); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/rssi/Client.h b/include/rogue/protocols/rssi/Client.h index 17eac4c65..5909b7078 100644 --- a/include/rogue/protocols/rssi/Client.h +++ b/include/rogue/protocols/rssi/Client.h @@ -42,7 +42,7 @@ class Client { //! Client module std::shared_ptr cntl_; - public: + public: //! Class creation static std::shared_ptr create(uint32_t segSize); diff --git a/include/rogue/protocols/rssi/Controller.h b/include/rogue/protocols/rssi/Controller.h index 0e877e188..60b7914b7 100644 --- a/include/rogue/protocols/rssi/Controller.h +++ b/include/rogue/protocols/rssi/Controller.h @@ -135,7 +135,7 @@ class Controller : public rogue::EnableSharedFromThis create( uint32_t segSize, @@ -234,7 +234,7 @@ class Controller : public rogue::EnableSharedFromThis head, bool seqUpdate, bool txReset); diff --git a/include/rogue/protocols/rssi/Header.h b/include/rogue/protocols/rssi/Header.h index 9c4c905fd..e5afcca01 100644 --- a/include/rogue/protocols/rssi/Header.h +++ b/include/rogue/protocols/rssi/Header.h @@ -45,12 +45,12 @@ class Header { //! compute checksum uint16_t compSum(uint8_t* data, uint8_t size); - public: + public: //! Header Size static const int32_t HeaderSize = 8; static const uint32_t SynSize = 24; - private: + private: //! Frame pointer std::shared_ptr frame_; @@ -60,7 +60,7 @@ class Header { //! Transmit count uint32_t count_; - public: + public: //! Create static std::shared_ptr create( std::shared_ptr frame); diff --git a/include/rogue/protocols/rssi/Server.h b/include/rogue/protocols/rssi/Server.h index dee2837eb..3cfe3cd09 100644 --- a/include/rogue/protocols/rssi/Server.h +++ b/include/rogue/protocols/rssi/Server.h @@ -42,7 +42,7 @@ class Server { //! Server module std::shared_ptr cntl_; - public: + public: //! Class creation static std::shared_ptr create(uint32_t segSize); diff --git a/include/rogue/protocols/rssi/Transport.h b/include/rogue/protocols/rssi/Transport.h index ee6a78bff..de031f0b4 100644 --- a/include/rogue/protocols/rssi/Transport.h +++ b/include/rogue/protocols/rssi/Transport.h @@ -37,7 +37,7 @@ class Transport : public rogue::interfaces::stream::Master, public rogue::interf //! Core module std::shared_ptr cntl_; - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/srp/Cmd.h b/include/rogue/protocols/srp/Cmd.h index 7a12f3472..e3c024c9d 100644 --- a/include/rogue/protocols/srp/Cmd.h +++ b/include/rogue/protocols/srp/Cmd.h @@ -35,7 +35,7 @@ namespace srp { * carnying the SRP protocol. */ class Cmd : public rogue::interfaces::stream::Master { - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/srp/SrpV0.h b/include/rogue/protocols/srp/SrpV0.h index 58d1b5932..45d41a0a1 100644 --- a/include/rogue/protocols/srp/SrpV0.h +++ b/include/rogue/protocols/srp/SrpV0.h @@ -55,7 +55,7 @@ class SrpV0 : public rogue::interfaces::stream::Master, uint32_t& frameLen, bool tx); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/srp/SrpV3.h b/include/rogue/protocols/srp/SrpV3.h index 90959acf2..173c5822e 100644 --- a/include/rogue/protocols/srp/SrpV3.h +++ b/include/rogue/protocols/srp/SrpV3.h @@ -53,7 +53,7 @@ class SrpV3 : public rogue::interfaces::stream::Master, uint32_t& frameLen, bool tx); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/udp/Client.h b/include/rogue/protocols/udp/Client.h index af2e3d665..b5c93bc03 100644 --- a/include/rogue/protocols/udp/Client.h +++ b/include/rogue/protocols/udp/Client.h @@ -48,7 +48,7 @@ class Client : public rogue::protocols::udp::Core, //! Thread background void runThread(std::weak_ptr); - public: + public: //! Class creation static std::shared_ptr create(std::string host, uint16_t port, bool jumbo); diff --git a/include/rogue/protocols/udp/Core.h b/include/rogue/protocols/udp/Core.h index 8f0291a78..19bd47d77 100644 --- a/include/rogue/protocols/udp/Core.h +++ b/include/rogue/protocols/udp/Core.h @@ -43,7 +43,7 @@ const uint32_t MaxStdPayload = StdMTU - HdrSize; //! UDP Core class Core { - protected: + protected: std::shared_ptr udpLog_; //! Jumbo frames enables @@ -64,7 +64,7 @@ class Core { //! mutex std::mutex udpMtx_; - public: + public: //! Setup class in python static void setup_python(); diff --git a/include/rogue/protocols/udp/Server.h b/include/rogue/protocols/udp/Server.h index a1f4c1c58..4df47e361 100644 --- a/include/rogue/protocols/udp/Server.h +++ b/include/rogue/protocols/udp/Server.h @@ -49,7 +49,7 @@ class Server : public rogue::protocols::udp::Core, //! Thread background void runThread(std::weak_ptr); - public: + public: //! Class creation static std::shared_ptr create(uint16_t port, bool jumbo); diff --git a/include/rogue/protocols/xilinx/JtagDriver.h b/include/rogue/protocols/xilinx/JtagDriver.h index 80ccc6344..183ea8a4f 100644 --- a/include/rogue/protocols/xilinx/JtagDriver.h +++ b/include/rogue/protocols/xilinx/JtagDriver.h @@ -69,7 +69,7 @@ namespace xilinx { // If a timeout occurs then 'xfer' must throw a TimeoutErr(). // class JtagDriver { - protected: + protected: //! Remote port number uint16_t port_; @@ -86,7 +86,7 @@ class JtagDriver { // Log std::shared_ptr log_; - private: + private: unsigned wordSize_; unsigned memDepth_; @@ -107,7 +107,7 @@ class JtagDriver { virtual void setHdr(uint8_t* buf, Header hdr); - protected: + protected: static Header getHdr(uint8_t* buf); static const Header PVERS = 0x00000000; @@ -161,7 +161,7 @@ class JtagDriver { virtual unsigned getMemDepth(); virtual uint32_t getPeriodNs(); - public: + public: //! Class creation static std::shared_ptr create(uint16_t port); diff --git a/include/rogue/protocols/xilinx/Xvc.h b/include/rogue/protocols/xilinx/Xvc.h index 1d2454c43..de92c89ef 100644 --- a/include/rogue/protocols/xilinx/Xvc.h +++ b/include/rogue/protocols/xilinx/Xvc.h @@ -44,7 +44,7 @@ const unsigned int kMaxArgs = 3; class Xvc : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave, public rogue::protocols::xilinx::JtagDriver { - protected: + protected: unsigned mtu_; // Use rogue frames to exchange data with other rogue objects @@ -63,7 +63,7 @@ class Xvc : public rogue::interfaces::stream::Master, // TCP server for Vivado client void runThread(); - public: + public: //! Class creation static std::shared_ptr create(uint16_t port); diff --git a/include/rogue/protocols/xilinx/XvcConnection.h b/include/rogue/protocols/xilinx/XvcConnection.h index 7055267c9..dc77c7c75 100644 --- a/include/rogue/protocols/xilinx/XvcConnection.h +++ b/include/rogue/protocols/xilinx/XvcConnection.h @@ -47,7 +47,7 @@ class XvcConnection { unsigned long supVecLen_; unsigned long chunk_; - public: + public: XvcConnection(int sd, JtagDriver* drv, unsigned long maxVecLen_ = 32768); // fill rx buffer to 'n' octets (from TCP connection) diff --git a/include/rogue/protocols/xilinx/XvcServer.h b/include/rogue/protocols/xilinx/XvcServer.h index 81bc58bb3..6d7fa98a3 100644 --- a/include/rogue/protocols/xilinx/XvcServer.h +++ b/include/rogue/protocols/xilinx/XvcServer.h @@ -27,12 +27,12 @@ namespace protocols { namespace xilinx { // XVC Server (top) class class XvcServer { - private: + private: int sd_; JtagDriver* drv_; unsigned maxMsgSize_; - public: + public: XvcServer(uint16_t port, JtagDriver* drv, unsigned maxMsgSize = 32768); virtual void run(bool& threadEn, rogue::LoggingPtr log); diff --git a/include/rogue/utilities/Prbs.h b/include/rogue/utilities/Prbs.h index d7e90be6f..2dc7f1744 100644 --- a/include/rogue/utilities/Prbs.h +++ b/include/rogue/utilities/Prbs.h @@ -124,7 +124,7 @@ class Prbs : public rogue::interfaces::stream::Slave, public rogue::interfaces:: static double updateTime(struct timeval* last); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/StreamUnZip.h b/include/rogue/utilities/StreamUnZip.h index e66195936..ba07c408f 100644 --- a/include/rogue/utilities/StreamUnZip.h +++ b/include/rogue/utilities/StreamUnZip.h @@ -33,7 +33,7 @@ namespace utilities { //! Stream compressor class StreamUnZip : public rogue::interfaces::stream::Slave, public rogue::interfaces::stream::Master { - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/StreamZip.h b/include/rogue/utilities/StreamZip.h index e626eac2f..63bdeb054 100644 --- a/include/rogue/utilities/StreamZip.h +++ b/include/rogue/utilities/StreamZip.h @@ -32,7 +32,7 @@ namespace utilities { //! Stream compressor class StreamZip : public rogue::interfaces::stream::Slave, public rogue::interfaces::stream::Master { - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/fileio/LegacyStreamReader.h b/include/rogue/utilities/fileio/LegacyStreamReader.h index 78fca560f..31f0d68ea 100644 --- a/include/rogue/utilities/fileio/LegacyStreamReader.h +++ b/include/rogue/utilities/fileio/LegacyStreamReader.h @@ -64,7 +64,7 @@ class LegacyStreamReader : public rogue::interfaces::stream::Master { //! Active lock std::mutex mtx_; - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/fileio/LegacyStreamWriter.h b/include/rogue/utilities/fileio/LegacyStreamWriter.h index 881a349a8..46521001f 100644 --- a/include/rogue/utilities/fileio/LegacyStreamWriter.h +++ b/include/rogue/utilities/fileio/LegacyStreamWriter.h @@ -41,11 +41,11 @@ class StreamWriterChannel; //! Stream writer central class class LegacyStreamWriter : public StreamWriter { - protected: + protected: //! Write data to file. Called from StreamWriterChannel virtual void writeFile(uint8_t channel, std::shared_ptr frame); - public: + public: // Data types. // Count is n*32bits for type = 0, byte count for all others enum DataType { diff --git a/include/rogue/utilities/fileio/StreamReader.h b/include/rogue/utilities/fileio/StreamReader.h index b1250b096..bcda1831b 100644 --- a/include/rogue/utilities/fileio/StreamReader.h +++ b/include/rogue/utilities/fileio/StreamReader.h @@ -65,7 +65,7 @@ class StreamReader : public rogue::interfaces::stream::Master { //! Active lock std::mutex mtx_; - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/fileio/StreamWriter.h b/include/rogue/utilities/fileio/StreamWriter.h index 3b3ddc66e..323c6c7bd 100644 --- a/include/rogue/utilities/fileio/StreamWriter.h +++ b/include/rogue/utilities/fileio/StreamWriter.h @@ -54,7 +54,7 @@ class StreamWriterChannel; class StreamWriter : public rogue::EnableSharedFromThis { friend class StreamWriterChannel; - protected: + protected: // Log std::shared_ptr log_; @@ -114,7 +114,7 @@ class StreamWriter : public rogue::EnableSharedFromThis frame); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/fileio/StreamWriterChannel.h b/include/rogue/utilities/fileio/StreamWriterChannel.h index 183a8d308..392bcede7 100644 --- a/include/rogue/utilities/fileio/StreamWriterChannel.h +++ b/include/rogue/utilities/fileio/StreamWriterChannel.h @@ -50,7 +50,7 @@ class StreamWriterChannel : public rogue::interfaces::stream::Slave { //! Condition variable for frameCount_ updates std::condition_variable cond_; - public: + public: //! Class creation static std::shared_ptr create( std::shared_ptr writer, From 16245490cff8cd36fffaae1c08477e518da3bf50 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 13:51:27 -0700 Subject: [PATCH 13/41] resolving c++ linter Weird number of spaces at line-start. Are you using a 2-space indent? [whitespace/indent] --- include/rogue/hardware/drivers/DmaDriver.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/rogue/hardware/drivers/DmaDriver.h b/include/rogue/hardware/drivers/DmaDriver.h index e1da0b910..8ab200a7c 100644 --- a/include/rogue/hardware/drivers/DmaDriver.h +++ b/include/rogue/hardware/drivers/DmaDriver.h @@ -644,12 +644,12 @@ static inline ssize_t dmaGetBuffCount(int32_t fd) { * Returns: The DMA Driver's Git Version string */ static inline std::string dmaGetGitVersion(int32_t fd) { - char gitv[32] = {0}; // Initialize with zeros to ensure null-termination - if (ioctl(fd, DMA_Get_GITV, gitv) < 0) { + char gitv[32] = {0}; // Initialize with zeros to ensure null-termination + if (ioctl(fd, DMA_Get_GITV, gitv) < 0) { return ""; - } - gitv[32 - 1] = '\0'; // Ensure null-termination - return std::string(gitv); + } + gitv[32 - 1] = '\0'; // Ensure null-termination + return std::string(gitv); } /** From dc079e46c0ceb758521c278266f796f2e77ca728 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 14:04:52 -0700 Subject: [PATCH 14/41] resolving c++ linter At least two spaces is best between code and comments [whitespace/comments] --- include/rogue/hardware/drivers/DmaDriver.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/rogue/hardware/drivers/DmaDriver.h b/include/rogue/hardware/drivers/DmaDriver.h index 8ab200a7c..dbbf96e94 100644 --- a/include/rogue/hardware/drivers/DmaDriver.h +++ b/include/rogue/hardware/drivers/DmaDriver.h @@ -644,11 +644,11 @@ static inline ssize_t dmaGetBuffCount(int32_t fd) { * Returns: The DMA Driver's Git Version string */ static inline std::string dmaGetGitVersion(int32_t fd) { - char gitv[32] = {0}; // Initialize with zeros to ensure null-termination + char gitv[32] = {0}; // Initialize with zeros to ensure null-termination if (ioctl(fd, DMA_Get_GITV, gitv) < 0) { - return ""; + return ""; } - gitv[32 - 1] = '\0'; // Ensure null-termination + gitv[32 - 1] = '\0'; // Ensure null-termination return std::string(gitv); } From d09afc6f33b68dae738cbeefbdfcc386c7946bbf Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 14:18:57 -0700 Subject: [PATCH 15/41] resolving c++ linter Using C-style cast. Use reinterpret_cast(...) instead [readability/casting] --- include/rogue/hardware/drivers/DmaDriver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rogue/hardware/drivers/DmaDriver.h b/include/rogue/hardware/drivers/DmaDriver.h index dbbf96e94..ba172880d 100644 --- a/include/rogue/hardware/drivers/DmaDriver.h +++ b/include/rogue/hardware/drivers/DmaDriver.h @@ -676,7 +676,7 @@ static inline void** dmaMapDma(int32_t fd, uint32_t* count, uint32_t* size) { if (count != NULL) *count = bCount; if (size != NULL) *size = bSize; - if ((ret = (void**)malloc(sizeof(void*) * bCount)) == 0) return (NULL); + if ((ret = reinterpret_cast(malloc(sizeof(void*) * bCount))) == 0) return (NULL); // Attempt to map gCount = 0; From 5f0c5dd4e19327fb6676ba4c3dea693ed885e0ef Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 14:25:36 -0700 Subject: [PATCH 16/41] Disable the build/header_guard check --- CPPLINT.cfg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 2b3e9217f..0b65006ac 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -15,3 +15,8 @@ filter=-build/c++11 # Disable the build/include_order check # Required for #include "rogue/Directives.h" to be at start filter=-build/include_order + +# Disable the build/header_guard check +# Note changing header guard has wrong style +# E.g. from __ROGUE_UTILITIES_FILEIO_MODULE_H__ to INCLUDE_ROGUE_UTILITIES_MODULE_H_ +filter=-build/header_guard From 459ae15c613142767f1b7c2ab7b5bc2ef770406f Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 15:02:53 -0700 Subject: [PATCH 17/41] resolving c++ linter Redundant blank line at the start of a code block should be deleted. [whitespace/blank_line] --- include/rogue/interfaces/memory/Emulate.h | 1 - src/rogue/interfaces/memory/Block.cpp | 17 +++-------------- src/rogue/interfaces/memory/Variable.cpp | 5 ----- 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/include/rogue/interfaces/memory/Emulate.h b/include/rogue/interfaces/memory/Emulate.h index 9639d87e3..a6009a820 100644 --- a/include/rogue/interfaces/memory/Emulate.h +++ b/include/rogue/interfaces/memory/Emulate.h @@ -44,7 +44,6 @@ namespace memory { * and write transactions. */ class Emulate : public Slave { - // Map to store 4K address space chunks MAP_TYPE memMap_; diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index c89f630c0..4582f5723 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -276,10 +276,7 @@ void rim::Block::startTransaction(uint32_t type, bool forceWr, bool check, rim:: try { if (check || retryCount_ > 0) checkTransaction(); - - // Success - count = retryCount_; - + count = retryCount_; // Success } catch (rogue::GeneralError err) { fWr = true; // Stale state is now lost @@ -319,10 +316,7 @@ void rim::Block::startTransactionPy(uint32_t type, bool forceWr, bool check, rim try { if (check || retryCount_ > 0) upd = checkTransaction(); - - // Success - count = retryCount_; - + count = retryCount_; // Success } catch (rogue::GeneralError err) { fWr = true; // Stale state is now lost @@ -475,9 +469,7 @@ void rim::Block::addVariables(std::vector variables) { // Update variable masks for standard variable if ((*vit)->numValues_ == 0 ) { - for (x = 0; x < (*vit)->bitOffset_.size(); x++) { - // Variable allows overlaps, add to overlap enable mask if ((*vit)->overlapEn_) { setBits(oleMask, (*vit)->bitOffset_[x], (*vit)->bitSize_[x]); @@ -514,10 +506,8 @@ void rim::Block::addVariables(std::vector variables) { } // List variables - } else{ - + } else { for (x = 0; x < (*vit)->numValues_; x++) { - // Variable allows overlaps, add to overlap enable mask if ((*vit)->overlapEn_) { setBits(oleMask, x * (*vit)->valueStride_ + (*vit)->bitOffset_[0], (*vit)->valueBits_); @@ -645,7 +635,6 @@ void rim::Block::setBytes(const uint8_t* data, rim::Variable* var, uint32_t inde // List variable if (var->numValues_ != 0) { - // Verify range if (index < 0 || index >= var->numValues_) throw(rogue::GeneralError::create("Block::setBytes", diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index a565e5983..c5c858eb2 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -169,7 +169,6 @@ rim::Variable::Variable(std::string name, // Not a list variable if (numValues_ == 0) { - // Compute bit total bitTotal_ = bitSize_[0]; for (x = 1; x < bitSize_.size(); x++) bitTotal_ += bitSize_[x]; @@ -187,7 +186,6 @@ rim::Variable::Variable(std::string name, // List variables } else { - // Compute bit total bitTotal_ = bitSize_[0]; @@ -208,7 +206,6 @@ rim::Variable::Variable(std::string name, // Determine if fast byte copies can be utilized // Bit offset vector must have one entry, the offset must be byte aligned and the total number of bits must be byte aligned if ((bitOffset_.size() == 1) && (bitOffset_[0] % 8 == 0) && (bitSize_[0] % 8 == 0)) { - // Standard variable if (numValues_ == 0) { fastByte_ = (uint32_t*)malloc(sizeof(uint32_t)); @@ -459,7 +456,6 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { // Standard variable if ( numValues_ == 0 ) { - // Compute total bit range of accessed bytes varBytes_ = (int)std::ceil((float)(bitOffset_[bitOffset_.size() - 1] + bitSize_[bitSize_.size() - 1]) / ((float)minSize * 8.0)) * minSize; @@ -472,7 +468,6 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { // List variable } else { - for (x = 0; x < numValues_; x++) { lowTranByte_[x] = (uint32_t)std::floor(((float)bitOffset_[0] + (float)x * (float)valueStride_) / ((float)minSize * 8.0)) * minSize; highTranByte_[x] = (uint32_t)std::ceil(((float)bitOffset_[0] + (float)x * (float)valueStride_ + valueBits_) / ((float)minSize * 8.0)) * minSize - 1; From 7fda4ac864d9b58d883aa8740df169b667f26b73 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 15:16:31 -0700 Subject: [PATCH 18/41] resolving c++ linter Empty loop bodies should use {} or continue [whitespace/empty_loop_body] --- src/rogue/hardware/axi/AxiStreamDma.cpp | 5 +---- src/rogue/protocols/udp/Client.cpp | 5 +---- src/rogue/protocols/udp/Server.cpp | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/rogue/hardware/axi/AxiStreamDma.cpp b/src/rogue/hardware/axi/AxiStreamDma.cpp index 4d87c20ab..8ba1b2271 100644 --- a/src/rogue/hardware/axi/AxiStreamDma.cpp +++ b/src/rogue/hardware/axi/AxiStreamDma.cpp @@ -416,10 +416,7 @@ void rha::AxiStreamDma::acceptFrame(ris::FramePtr frame) { throw(rogue::GeneralError("AxiStreamDma::acceptFrame", "AXIS Write Call Failed!!!!")); } } - } - - // Exit out if return flag was set false - while (res == 0); + } while (res == 0); // Exit out if return flag was set false } } diff --git a/src/rogue/protocols/udp/Client.cpp b/src/rogue/protocols/udp/Client.cpp index c8de9d9f4..6a60c0add 100644 --- a/src/rogue/protocols/udp/Client.cpp +++ b/src/rogue/protocols/udp/Client.cpp @@ -176,10 +176,7 @@ void rpu::Client::acceptFrame(ris::FramePtr frame) { } else if ((res = sendmsg(fd_, &msg, 0)) < 0) { udpLog_->warning("UDP Write Call Failed"); } - } - - // Continue while write result was zero - while (res == 0); + } while (res == 0); // Continue while write result was zero } } diff --git a/src/rogue/protocols/udp/Server.cpp b/src/rogue/protocols/udp/Server.cpp index 19ea6e198..61fae1617 100644 --- a/src/rogue/protocols/udp/Server.cpp +++ b/src/rogue/protocols/udp/Server.cpp @@ -177,10 +177,7 @@ void rpu::Server::acceptFrame(ris::FramePtr frame) { } else if ((res = sendmsg(fd_, &msg, 0)) < 0) { udpLog_->warning("UDP Write Call Failed"); } - } - - // Continue while write result was zero - while (res == 0); + } while (res == 0); // Continue while write result was zero } } From 7d6cf39184a3558e0cf90ecbd33a280958fc2877 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 15:20:09 -0700 Subject: [PATCH 19/41] resolving c++ linter An else should appear on the same line as the preceding } [whitespace/newline] --- src/rogue/hardware/axi/AxiStreamDma.cpp | 4 ++-- src/rogue/interfaces/memory/TcpClient.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rogue/hardware/axi/AxiStreamDma.cpp b/src/rogue/hardware/axi/AxiStreamDma.cpp index 8ba1b2271..2101a900e 100644 --- a/src/rogue/hardware/axi/AxiStreamDma.cpp +++ b/src/rogue/hardware/axi/AxiStreamDma.cpp @@ -460,11 +460,11 @@ void rha::AxiStreamDma::retBuffer(uint8_t* data, uint32_t meta, uint32_t size) { #endif } decCounter(size); - } // Buffer is allocated from Pool class - else + } else { Pool::retBuffer(data, meta, size); + } } //! Run thread diff --git a/src/rogue/interfaces/memory/TcpClient.cpp b/src/rogue/interfaces/memory/TcpClient.cpp index 6a470c2b0..d2e1dd779 100644 --- a/src/rogue/interfaces/memory/TcpClient.cpp +++ b/src/rogue/interfaces/memory/TcpClient.cpp @@ -175,11 +175,11 @@ void rim::TcpClient::doTransaction(rim::TransactionPtr tran) { msgCnt = 5; zmq_msg_init_size(&(msg[4]), size); std::memcpy(zmq_msg_data(&(msg[4])), tran->begin(), size); - } // Read transaction - else + } else { msgCnt = 4; + } bridgeLog_->debug("Requested transaction id=%" PRIu32 ", addr=0x%" PRIx64 ", size=%" PRIu32 ", type=%" PRIu32 ", cnt=%" PRIu32 ", port: %s", From 104d935259ecb2ea3dc69eef29ab82b68d0d7c72 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 15:24:23 -0700 Subject: [PATCH 20/41] resolving c++ linter Extra space before ( in function call [whitespace/parens] --- src/rogue/interfaces/memory/Block.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index 4582f5723..0ab55e79e 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -174,11 +174,10 @@ void rim::Block::intStartTransaction(uint32_t type, bool forceWr, bool check, ri std::vector::iterator vit; // Check for valid combinations - if ((type == rim::Write and ((mode_ == "RO") || (!stale_ && !forceWr))) || - (type == rim::Post and (mode_ == "RO")) || (type == rim::Read and ((mode_ == "WO") || stale_)) || - (type == rim::Verify and ((mode_ == "WO") || (mode_ == "RO") || stale_ || !verifyReq_))) + if ((type == rim::Write && ((mode_ == "RO") || (!stale_ && !forceWr))) || + (type == rim::Post && (mode_ == "RO")) || (type == rim::Read && ((mode_ == "WO") || stale_)) || + (type == rim::Verify && ((mode_ == "WO") || (mode_ == "RO") || stale_ || !verifyReq_))) return; - { rogue::GilRelease noGil; std::lock_guard lock(mtx_); From b38fc55ca85e4d485b8a66368be6b1c612fbe2fa Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 15:26:33 -0700 Subject: [PATCH 21/41] resolving c++ linter Mismatching spaces inside () in if [whitespace/parens] --- src/rogue/interfaces/memory/Block.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index 0ab55e79e..83b9e21fa 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -467,7 +467,7 @@ void rim::Block::addVariables(std::vector variables) { if (mode_ != (*vit)->mode_) mode_ = "RW"; // Update variable masks for standard variable - if ((*vit)->numValues_ == 0 ) { + if ((*vit)->numValues_ == 0) { for (x = 0; x < (*vit)->bitOffset_.size(); x++) { // Variable allows overlaps, add to overlap enable mask if ((*vit)->overlapEn_) { From 71067995483ad46fd52ccef0fa8b649c6d845d3a Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 15:42:09 -0700 Subject: [PATCH 22/41] resolving c++ linter Add #include for XXX [build/include_what_you_use] --- include/rogue/hardware/axi/AxiMemMap.h | 1 + include/rogue/hardware/axi/AxiStreamDma.h | 1 + include/rogue/interfaces/ZmqClient.h | 1 + include/rogue/interfaces/ZmqServer.h | 1 + include/rogue/interfaces/api/Bsp.h | 4 ++++ include/rogue/interfaces/memory/Block.h | 1 + include/rogue/interfaces/memory/Hub.h | 2 ++ include/rogue/interfaces/memory/Master.h | 1 + include/rogue/interfaces/memory/Slave.h | 1 + include/rogue/interfaces/memory/TcpClient.h | 1 + include/rogue/interfaces/memory/TcpServer.h | 1 + include/rogue/interfaces/memory/Transaction.h | 1 + include/rogue/interfaces/stream/Pool.h | 1 + include/rogue/interfaces/stream/Slave.h | 1 + include/rogue/interfaces/stream/TcpClient.h | 1 + include/rogue/interfaces/stream/TcpCore.h | 1 + include/rogue/interfaces/stream/TcpServer.h | 1 + include/rogue/protocols/batcher/CoreV1.h | 1 + include/rogue/protocols/rssi/Header.h | 1 + include/rogue/protocols/udp/Client.h | 1 + include/rogue/protocols/xilinx/XvcConnection.h | 2 ++ include/rogue/utilities/fileio/LegacyStreamReader.h | 1 + include/rogue/utilities/fileio/StreamReader.h | 1 + include/rogue/utilities/fileio/StreamWriter.h | 1 + 24 files changed, 29 insertions(+) diff --git a/include/rogue/hardware/axi/AxiMemMap.h b/include/rogue/hardware/axi/AxiMemMap.h index 17f12af58..21def17d3 100644 --- a/include/rogue/hardware/axi/AxiMemMap.h +++ b/include/rogue/hardware/axi/AxiMemMap.h @@ -23,6 +23,7 @@ #include #include #include +#include #include "rogue/Logging.h" #include "rogue/Queue.h" diff --git a/include/rogue/hardware/axi/AxiStreamDma.h b/include/rogue/hardware/axi/AxiStreamDma.h index 2b8dee806..c3686a4ed 100644 --- a/include/rogue/hardware/axi/AxiStreamDma.h +++ b/include/rogue/hardware/axi/AxiStreamDma.h @@ -20,6 +20,7 @@ #include #include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Master.h" diff --git a/include/rogue/interfaces/ZmqClient.h b/include/rogue/interfaces/ZmqClient.h index 6e7761b6d..32d6a49c3 100644 --- a/include/rogue/interfaces/ZmqClient.h +++ b/include/rogue/interfaces/ZmqClient.h @@ -20,6 +20,7 @@ #include #include +#include #include "rogue/Logging.h" diff --git a/include/rogue/interfaces/ZmqServer.h b/include/rogue/interfaces/ZmqServer.h index 26436475a..e4e5f4925 100644 --- a/include/rogue/interfaces/ZmqServer.h +++ b/include/rogue/interfaces/ZmqServer.h @@ -20,6 +20,7 @@ #include #include +#include #include "rogue/Logging.h" diff --git a/include/rogue/interfaces/api/Bsp.h b/include/rogue/interfaces/api/Bsp.h index 044f07844..8d315b4c5 100644 --- a/include/rogue/interfaces/api/Bsp.h +++ b/include/rogue/interfaces/api/Bsp.h @@ -16,8 +16,12 @@ **/ #ifndef __ROGUE_INTERFACE_API_BSP_H__ #define __ROGUE_INTERFACE_API_BSP_H__ + #include + +#include #include +#include namespace rogue { namespace interfaces { diff --git a/include/rogue/interfaces/memory/Block.h b/include/rogue/interfaces/memory/Block.h index 0de90793e..83e941f94 100644 --- a/include/rogue/interfaces/memory/Block.h +++ b/include/rogue/interfaces/memory/Block.h @@ -25,6 +25,7 @@ #include #include #include +#include #include "rogue/interfaces/memory/Master.h" diff --git a/include/rogue/interfaces/memory/Hub.h b/include/rogue/interfaces/memory/Hub.h index 7218c1ed0..7d7ee2bc4 100644 --- a/include/rogue/interfaces/memory/Hub.h +++ b/include/rogue/interfaces/memory/Hub.h @@ -26,7 +26,9 @@ #include +#include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/memory/Master.h" diff --git a/include/rogue/interfaces/memory/Master.h b/include/rogue/interfaces/memory/Master.h index 0a73544ab..0b47b55c8 100644 --- a/include/rogue/interfaces/memory/Master.h +++ b/include/rogue/interfaces/memory/Master.h @@ -28,6 +28,7 @@ #include #include #include +#include #include "rogue/Logging.h" diff --git a/include/rogue/interfaces/memory/Slave.h b/include/rogue/interfaces/memory/Slave.h index 33055d840..d40301a3f 100644 --- a/include/rogue/interfaces/memory/Slave.h +++ b/include/rogue/interfaces/memory/Slave.h @@ -26,6 +26,7 @@ #include #include #include +#include #include "rogue/EnableSharedFromThis.h" #include "rogue/interfaces/memory/Master.h" diff --git a/include/rogue/interfaces/memory/TcpClient.h b/include/rogue/interfaces/memory/TcpClient.h index ec5953ef2..7eccbaaae 100644 --- a/include/rogue/interfaces/memory/TcpClient.h +++ b/include/rogue/interfaces/memory/TcpClient.h @@ -25,6 +25,7 @@ #include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/memory/Slave.h" diff --git a/include/rogue/interfaces/memory/TcpServer.h b/include/rogue/interfaces/memory/TcpServer.h index f47279281..e758b389c 100644 --- a/include/rogue/interfaces/memory/TcpServer.h +++ b/include/rogue/interfaces/memory/TcpServer.h @@ -25,6 +25,7 @@ #include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/memory/Master.h" diff --git a/include/rogue/interfaces/memory/Transaction.h b/include/rogue/interfaces/memory/Transaction.h index ed6e7d8f6..0625ab9e5 100644 --- a/include/rogue/interfaces/memory/Transaction.h +++ b/include/rogue/interfaces/memory/Transaction.h @@ -28,6 +28,7 @@ #include #include #include +#include #include "rogue/EnableSharedFromThis.h" #include "rogue/Logging.h" diff --git a/include/rogue/interfaces/stream/Pool.h b/include/rogue/interfaces/stream/Pool.h index 4c71b139f..8046f6f0e 100644 --- a/include/rogue/interfaces/stream/Pool.h +++ b/include/rogue/interfaces/stream/Pool.h @@ -25,6 +25,7 @@ #include #include +#include #include "rogue/EnableSharedFromThis.h" #include "rogue/Queue.h" diff --git a/include/rogue/interfaces/stream/Slave.h b/include/rogue/interfaces/stream/Slave.h index 4258f06ce..f2568bea8 100644 --- a/include/rogue/interfaces/stream/Slave.h +++ b/include/rogue/interfaces/stream/Slave.h @@ -26,6 +26,7 @@ #include #include +#include #include "rogue/EnableSharedFromThis.h" #include "rogue/Logging.h" diff --git a/include/rogue/interfaces/stream/TcpClient.h b/include/rogue/interfaces/stream/TcpClient.h index c941d478b..56a011f0f 100644 --- a/include/rogue/interfaces/stream/TcpClient.h +++ b/include/rogue/interfaces/stream/TcpClient.h @@ -25,6 +25,7 @@ #include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Frame.h" diff --git a/include/rogue/interfaces/stream/TcpCore.h b/include/rogue/interfaces/stream/TcpCore.h index b71a82899..edc7d064d 100644 --- a/include/rogue/interfaces/stream/TcpCore.h +++ b/include/rogue/interfaces/stream/TcpCore.h @@ -25,6 +25,7 @@ #include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Frame.h" diff --git a/include/rogue/interfaces/stream/TcpServer.h b/include/rogue/interfaces/stream/TcpServer.h index 9931c8b1b..d39ce552f 100644 --- a/include/rogue/interfaces/stream/TcpServer.h +++ b/include/rogue/interfaces/stream/TcpServer.h @@ -25,6 +25,7 @@ #include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Frame.h" diff --git a/include/rogue/protocols/batcher/CoreV1.h b/include/rogue/protocols/batcher/CoreV1.h index e12b1e072..e2f5fbae9 100644 --- a/include/rogue/protocols/batcher/CoreV1.h +++ b/include/rogue/protocols/batcher/CoreV1.h @@ -26,6 +26,7 @@ #include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Frame.h" diff --git a/include/rogue/protocols/rssi/Header.h b/include/rogue/protocols/rssi/Header.h index e5afcca01..ba3ac6850 100644 --- a/include/rogue/protocols/rssi/Header.h +++ b/include/rogue/protocols/rssi/Header.h @@ -21,6 +21,7 @@ #include #include +#include #include "rogue/interfaces/stream/Frame.h" diff --git a/include/rogue/protocols/udp/Client.h b/include/rogue/protocols/udp/Client.h index b5c93bc03..211feddc4 100644 --- a/include/rogue/protocols/udp/Client.h +++ b/include/rogue/protocols/udp/Client.h @@ -26,6 +26,7 @@ #include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Master.h" diff --git a/include/rogue/protocols/xilinx/XvcConnection.h b/include/rogue/protocols/xilinx/XvcConnection.h index dc77c7c75..70e4ee4ed 100644 --- a/include/rogue/protocols/xilinx/XvcConnection.h +++ b/include/rogue/protocols/xilinx/XvcConnection.h @@ -21,6 +21,8 @@ #include #include +#include + #include "rogue/GeneralError.h" #include "rogue/protocols/xilinx/JtagDriver.h" diff --git a/include/rogue/utilities/fileio/LegacyStreamReader.h b/include/rogue/utilities/fileio/LegacyStreamReader.h index 31f0d68ea..c3b080b49 100644 --- a/include/rogue/utilities/fileio/LegacyStreamReader.h +++ b/include/rogue/utilities/fileio/LegacyStreamReader.h @@ -24,6 +24,7 @@ #include #include #include +#include #include "rogue/interfaces/stream/Master.h" diff --git a/include/rogue/utilities/fileio/StreamReader.h b/include/rogue/utilities/fileio/StreamReader.h index bcda1831b..234f87dda 100644 --- a/include/rogue/utilities/fileio/StreamReader.h +++ b/include/rogue/utilities/fileio/StreamReader.h @@ -25,6 +25,7 @@ #include #include #include +#include #include "rogue/interfaces/stream/Master.h" diff --git a/include/rogue/utilities/fileio/StreamWriter.h b/include/rogue/utilities/fileio/StreamWriter.h index 323c6c7bd..c38c60b7f 100644 --- a/include/rogue/utilities/fileio/StreamWriter.h +++ b/include/rogue/utilities/fileio/StreamWriter.h @@ -39,6 +39,7 @@ #include #include #include +#include #include "rogue/EnableSharedFromThis.h" #include "rogue/Logging.h" From 49a7451778dcf26a321b7d47d089b7ff4e61a537 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 18:38:37 -0700 Subject: [PATCH 23/41] resolving c++ linter Using C-style cast. Use static_cast(...) instead [readability/casting] --- .../rogue/interfaces/stream/FrameAccessor.h | 2 +- src/rogue/GeneralError.cpp | 2 +- src/rogue/hardware/MemMap.cpp | 8 +-- src/rogue/hardware/axi/AxiMemMap.cpp | 2 +- src/rogue/interfaces/ZmqClient.cpp | 4 +- src/rogue/interfaces/memory/Block.cpp | 52 +++++++++---------- src/rogue/interfaces/memory/Emulate.cpp | 2 +- src/rogue/interfaces/memory/Hub.cpp | 2 +- src/rogue/interfaces/memory/Master.cpp | 10 ++-- src/rogue/interfaces/memory/TcpClient.cpp | 2 +- src/rogue/interfaces/memory/TcpServer.cpp | 2 +- src/rogue/interfaces/memory/Transaction.cpp | 4 +- src/rogue/interfaces/memory/Variable.cpp | 30 +++++------ src/rogue/interfaces/stream/Buffer.cpp | 2 +- src/rogue/interfaces/stream/Frame.cpp | 4 +- src/rogue/interfaces/stream/Pool.cpp | 2 +- src/rogue/interfaces/stream/TcpCore.cpp | 4 +- src/rogue/protocols/rssi/Controller.cpp | 2 +- src/rogue/protocols/rssi/Header.cpp | 8 +-- src/rogue/protocols/udp/Core.cpp | 2 +- src/rogue/protocols/xilinx/JtagDriver.cpp | 2 +- src/rogue/protocols/xilinx/XvcConnection.cpp | 2 +- src/rogue/utilities/Prbs.cpp | 16 +++--- src/rogue/utilities/StreamUnZip.cpp | 8 +-- src/rogue/utilities/StreamZip.cpp | 8 +-- src/rogue/utilities/fileio/StreamWriter.cpp | 2 +- 26 files changed, 92 insertions(+), 92 deletions(-) diff --git a/include/rogue/interfaces/stream/FrameAccessor.h b/include/rogue/interfaces/stream/FrameAccessor.h index a7660f63f..9fb0483fb 100644 --- a/include/rogue/interfaces/stream/FrameAccessor.h +++ b/include/rogue/interfaces/stream/FrameAccessor.h @@ -46,7 +46,7 @@ class FrameAccessor { public: //! Creator FrameAccessor(rogue::interfaces::stream::FrameIterator& iter, uint32_t size) { - data_ = (T*)iter.ptr(); + data_ = reinterpret_cast(iter.ptr()); size_ = size; if (size * sizeof(T) > iter.remBuffer()) diff --git a/src/rogue/GeneralError.cpp b/src/rogue/GeneralError.cpp index 3bc634287..2fb2413f0 100644 --- a/src/rogue/GeneralError.cpp +++ b/src/rogue/GeneralError.cpp @@ -55,7 +55,7 @@ void rogue::GeneralError::setup_python() { bp::class_("GeneralError", bp::init()); - PyObject* typeObj = PyErr_NewException((char*)"rogue.GeneralError", PyExc_Exception, 0); + PyObject* typeObj = PyErr_NewException(const_cast("rogue.GeneralError"), PyExc_Exception, 0); bp::scope().attr("GeneralError") = bp::handle<>(bp::borrowed(typeObj)); rogue::generalErrorObj = typeObj; diff --git a/src/rogue/hardware/MemMap.cpp b/src/rogue/hardware/MemMap.cpp index 9279b1056..a2b6e8e26 100644 --- a/src/rogue/hardware/MemMap.cpp +++ b/src/rogue/hardware/MemMap.cpp @@ -60,7 +60,7 @@ rh::MemMap::MemMap(uint64_t base, uint32_t size) : rim::Slave(4, 0xFFFFFFFF) { if (fd_ < 0) throw(rogue::GeneralError::create("MemMap::MemMap", "Failed to open device file: %s", MAP_DEVICE)); - if ((map_ = (uint8_t*)mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_, base)) == (void*)-1) + if ((map_ = reinterpret_cast(mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_, base))) == reinterpret_cast(-1)) throw(rogue::GeneralError::create("MemMap::MemMap", "Failed to map memory to user space.")); log_->debug("Created map to 0x%" PRIx64 " with size 0x%" PRIx32, base, size); @@ -81,7 +81,7 @@ void rh::MemMap::stop() { threadEn_ = false; queue_.stop(); thread_->join(); - munmap((void*)map_, size_); + munmap(reinterpret_cast(const_cast(map_)), size_); ::close(fd_); } } @@ -129,8 +129,8 @@ void rh::MemMap::runThread() { continue; } - tPtr = (uint32_t*)tran->begin(); - mPtr = (uint32_t*)(map_ + tran->address()); + tPtr = reinterpret_cast(tran->begin()); + mPtr = const_cast(reinterpret_cast(map_ + tran->address())); while (count != tran->size()) { // Write or post diff --git a/src/rogue/hardware/axi/AxiMemMap.cpp b/src/rogue/hardware/axi/AxiMemMap.cpp index 3e88f88f2..012a8b668 100644 --- a/src/rogue/hardware/axi/AxiMemMap.cpp +++ b/src/rogue/hardware/axi/AxiMemMap.cpp @@ -114,7 +114,7 @@ void rha::AxiMemMap::runThread() { uint8_t* ptr; dataSize = sizeof(uint32_t); - ptr = (uint8_t*)(&data); + ptr = reinterpret_cast(&data); log_->logThreadId(); diff --git a/src/rogue/interfaces/ZmqClient.cpp b/src/rogue/interfaces/ZmqClient.cpp index cd0bba1b1..ad8aaae00 100644 --- a/src/rogue/interfaces/ZmqClient.cpp +++ b/src/rogue/interfaces/ZmqClient.cpp @@ -187,7 +187,7 @@ std::string rogue::interfaces::ZmqClient::sendString(std::string path, std::stri while (1) { zmq_msg_init(&msg); if (zmq_recvmsg(this->zmqReq_, &msg, 0) <= 0) { - seconds += (float)timeout_ / 1000.0; + seconds += static_cast(timeout_) / 1000.0; if (waitRetry_) { log_->error("Timeout waiting for response after %f Seconds, server may be busy! Waiting...", seconds); zmq_msg_close(&msg); @@ -249,7 +249,7 @@ bp::object rogue::interfaces::ZmqClient::send(bp::object value) { while (1) { zmq_msg_init(&rxMsg); if (zmq_recvmsg(this->zmqReq_, &rxMsg, 0) <= 0) { - seconds += (float)timeout_ / 1000.0; + seconds += static_cast(timeout_) / 1000.0; if (waitRetry_) { log_->error("Timeout waiting for response after %f Seconds, server may be busy! Waiting...", seconds); diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index 83b9e21fa..c47b5bc3b 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -99,13 +99,13 @@ rim::Block::Block(uint64_t offset, uint32_t size) { verifyBase_ = 0; // Verify Range verifySize_ = 0; // Verify Range - blockData_ = (uint8_t*)malloc(size_); + blockData_ = reinterpret_cast(malloc(size_)); memset(blockData_, 0, size_); - verifyData_ = (uint8_t*)malloc(size_); + verifyData_ = reinterpret_cast(malloc(size_)); memset(verifyData_, 0, size_); - verifyMask_ = (uint8_t*)malloc(size_); + verifyMask_ = reinterpret_cast(malloc(size_)); memset(verifyMask_, 0, size_); } @@ -625,11 +625,11 @@ void rim::Block::setBytes(const uint8_t* data, rim::Variable* var, uint32_t inde // Change byte order, need to make a copy if (var->byteReverse_) { - buff = (uint8_t*)malloc(var->valueBytes_); + buff = reinterpret_cast(malloc(var->valueBytes_)); memcpy(buff, data, var->valueBytes_); reverseBytes(buff, var->valueBytes_); } else { - buff = (uint8_t*)data; + buff = const_cast(reinterpret_cast(data)); } // List variable @@ -770,7 +770,7 @@ void rim::Block::setPyFunc(bp::object& value, rim::Variable* var, int32_t index) "Failed to extract byte array for %s", var->name_.c_str())); - setBytes((uint8_t*)valueBuf.buf, var, index + x); + setBytes(reinterpret_cast(valueBuf.buf), var, index + x); PyBuffer_Release(&valueBuf); } @@ -784,7 +784,7 @@ void rim::Block::setPyFunc(bp::object& value, rim::Variable* var, int32_t index) "Failed to extract byte array from pyFunc return value for %s", var->name_.c_str())); - setBytes((uint8_t*)valueBuf.buf, var, index); + setBytes(reinterpret_cast(valueBuf.buf), var, index); PyBuffer_Release(&valueBuf); } } @@ -838,7 +838,7 @@ void rim::Block::setByteArrayPy(bp::object& value, rim::Variable* var, int32_t i "Failed to extract byte array for %s", var->name_.c_str())); - setBytes((uint8_t*)valueBuf.buf, var, index); + setBytes(reinterpret_cast(valueBuf.buf), var, index); PyBuffer_Release(&valueBuf); } @@ -1021,14 +1021,14 @@ void rim::Block::setUInt(const uint64_t& val, rim::Variable* var, int32_t index) var->minValue_, var->maxValue_)); - setBytes((uint8_t*)&val, var, index); + setBytes(reinterpret_cast(const_cast(&val)), var, index); } // Get data using unsigned int uint64_t rim::Block::getUInt(rim::Variable* var, int32_t index) { uint64_t tmp = 0; - getBytes((uint8_t*)&tmp, var, index); + getBytes(reinterpret_cast(&tmp), var, index); return tmp; } @@ -1180,14 +1180,14 @@ void rim::Block::setInt(const int64_t& val, rim::Variable* var, int32_t index) { var->maxValue_)); // This works because all bits between the msb and bit 64 are set to '1' for a negative value - setBytes((uint8_t*)&val, var, index); + setBytes(reinterpret_cast(const_cast(&val)), var, index); } // Get data using int int64_t rim::Block::getInt(rim::Variable* var, int32_t index) { int64_t tmp = 0; - getBytes((uint8_t*)&tmp, var, index); + getBytes(reinterpret_cast(&tmp), var, index); if (var->valueBits_ != 64) { if (tmp >= (uint64_t)pow(2, var->valueBits_ - 1)) tmp -= (uint64_t)pow(2, var->valueBits_); @@ -1314,14 +1314,14 @@ bp::object rim::Block::getBoolPy(rim::Variable* var, int32_t index) { // Set data using bool void rim::Block::setBool(const bool& value, rim::Variable* var, int32_t index) { uint8_t val = (uint8_t)value; - setBytes((uint8_t*)&val, var, index); + setBytes(reinterpret_cast(&val), var, index); } // Get data using bool bool rim::Block::getBool(rim::Variable* var, int32_t index) { uint8_t tmp = 0; - getBytes((uint8_t*)&tmp, var, index); + getBytes(reinterpret_cast(&tmp), var, index); return tmp ? true : false; } @@ -1380,7 +1380,7 @@ void rim::Block::setString(const std::string& value, rim::Variable* var, int32_t memset(getBuffer, 0, var->valueBytes_); - strncpy((char*)getBuffer, value.c_str(), var->valueBytes_ - 1); + strncpy(reinterpret_cast(getBuffer), value.c_str(), var->valueBytes_ - 1); setBytes(getBuffer, var, index); } @@ -1398,7 +1398,7 @@ void rim::Block::getString(rim::Variable* var, std::string& retString, int32_t i memset(getBuffer, 0, var->valueBytes_ + 1); - getBytes((uint8_t*)getBuffer, var, index); + getBytes(reinterpret_cast(getBuffer), var, index); retString = getBuffer; } @@ -1536,14 +1536,14 @@ void rim::Block::setFloat(const float& val, rim::Variable* var, int32_t index) { var->minValue_, var->maxValue_)); - setBytes((uint8_t*)&val, var, index); + setBytes(reinterpret_cast(const_cast(&val)), var, index); } // Get data using float float rim::Block::getFloat(rim::Variable* var, int32_t index) { float tmp = 0; - getBytes((uint8_t*)&tmp, var, index); + getBytes(reinterpret_cast(&tmp), var, index); return tmp; } @@ -1681,14 +1681,14 @@ void rim::Block::setDouble(const double& val, rim::Variable* var, int32_t index) var->minValue_, var->maxValue_)); - setBytes((uint8_t*)&val, var, index); + setBytes(reinterpret_cast(const_cast(&val)), var, index); } // Get data using double double rim::Block::getDouble(rim::Variable* var, int32_t index) { double tmp = 0; - getBytes((uint8_t*)&tmp, var, index); + getBytes(reinterpret_cast(&tmp), var, index); return tmp; } @@ -1831,7 +1831,7 @@ void rim::Block::setFixed(const double& val, rim::Variable* var, int32_t index) // Check for positive edge case uint64_t mask = 1 << (var->valueBits_ - 1); if (val > 0 && ((fPoint & mask) != 0)) { fPoint -= 1; } - setBytes((uint8_t*)&fPoint, var, index); + setBytes(reinterpret_cast(&fPoint), var, index); } // Get data using fixed point @@ -1839,12 +1839,12 @@ double rim::Block::getFixed(rim::Variable* var, int32_t index) { int64_t fPoint = 0; double tmp; - getBytes((uint8_t*)&fPoint, var, index); + getBytes(reinterpret_cast(&fPoint), var, index); // Do two-complement if negative if ((fPoint & (1 << (var->valueBits_ - 1))) != 0) { fPoint = fPoint - (1 << var->valueBits_); } // Convert to float - tmp = (double)fPoint; + tmp = static_cast(fPoint); tmp = tmp / pow(2, var->binPoint_); return tmp; } @@ -1880,7 +1880,7 @@ void rim::Block::rateTest() { gettimeofday(&etime, NULL); timersub(&etime, &stime, &dtime); - durr = dtime.tv_sec + (float)dtime.tv_usec / 1.0e6; + durr = dtime.tv_sec + static_cast(dtime.tv_usec) / 1.0e6; rate = count / durr; printf("\nBlock c++ raw: Read %" PRIu64 " times in %f seconds. Rate = %f\n", count, durr, rate); @@ -1888,13 +1888,13 @@ void rim::Block::rateTest() { gettimeofday(&stime, NULL); waitTransaction(0); for (x = 0; x < count; ++x) { - reqTransaction(0, 4, (uint8_t*)&count, rim::Write); + reqTransaction(0, 4, reinterpret_cast(&count), rim::Write); waitTransaction(0); } gettimeofday(&etime, NULL); timersub(&etime, &stime, &dtime); - durr = dtime.tv_sec + (float)dtime.tv_usec / 1.0e6; + durr = dtime.tv_sec + static_cast(dtime.tv_usec) / 1.0e6; rate = count / durr; printf("\nBlock c++ raw: Wrote %" PRIu64 " times in %f seconds. Rate = %f\n", count, durr, rate); diff --git a/src/rogue/interfaces/memory/Emulate.cpp b/src/rogue/interfaces/memory/Emulate.cpp index de77132ed..903f9b315 100644 --- a/src/rogue/interfaces/memory/Emulate.cpp +++ b/src/rogue/interfaces/memory/Emulate.cpp @@ -87,7 +87,7 @@ void rim::Emulate::doTransaction(rim::TransactionPtr tran) { addr += size4k; if (memMap_.find(addr4k) == memMap_.end()) { - memMap_.insert(std::make_pair(addr4k, (uint8_t*)malloc(0x1000))); + memMap_.insert(std::make_pair(addr4k, reinterpret_cast(malloc(0x1000)))); totSize_ += 0x1000; totAlloc_ ++; log_->debug("Allocating block at 0x%x. Total Blocks %i, Total Size = %i", addr4k, totAlloc_, totSize_); diff --git a/src/rogue/interfaces/memory/Hub.cpp b/src/rogue/interfaces/memory/Hub.cpp index ea4c51250..7a89d07bf 100644 --- a/src/rogue/interfaces/memory/Hub.cpp +++ b/src/rogue/interfaces/memory/Hub.cpp @@ -125,7 +125,7 @@ void rim::Hub::doTransaction(rim::TransactionPtr tran) { for (unsigned int i = 0; i < numberOfTransactions; ++i) { rim::TransactionPtr subTran = tran->createSubTransaction(); - subTran->iter_ = (uint8_t*)(tran->begin() + i * maxAccess); + subTran->iter_ = reinterpret_cast(tran->begin() + i * maxAccess); if (tran->size() >= ((i + 1) * maxAccess)) { subTran->size_ = maxAccess; } else { diff --git a/src/rogue/interfaces/memory/Master.cpp b/src/rogue/interfaces/memory/Master.cpp index 18d8c1008..c64491762 100644 --- a/src/rogue/interfaces/memory/Master.cpp +++ b/src/rogue/interfaces/memory/Master.cpp @@ -155,7 +155,7 @@ void rim::Master::setTimeout(uint64_t timeout) { uint32_t rim::Master::reqTransaction(uint64_t address, uint32_t size, void* data, uint32_t type) { rim::TransactionPtr tran = rim::Transaction::create(sumTime_); - tran->iter_ = (uint8_t*)data; + tran->iter_ = reinterpret_cast(data); tran->size_ = size; tran->address_ = address; tran->type_ = type; @@ -197,7 +197,7 @@ uint32_t rim::Master::reqTransactionPy(uint64_t address, } tran->pyValid_ = true; - tran->iter_ = ((uint8_t*)tran->pyBuf_.buf) + offset; + tran->iter_ = reinterpret_cast(tran->pyBuf_.buf) + offset; tran->type_ = type; tran->address_ = address; @@ -335,7 +335,7 @@ void rim::Master::copyBitsPy(boost::python::object dst, srcBuf.len * 8)); } - copyBits((uint8_t*)dstBuf.buf, dstLsb, (uint8_t*)srcBuf.buf, srcLsb, size); + copyBits(reinterpret_cast(dstBuf.buf), dstLsb, reinterpret_cast(srcBuf.buf), srcLsb, size); PyBuffer_Release(&srcBuf); PyBuffer_Release(&dstBuf); @@ -392,7 +392,7 @@ void rim::Master::setBitsPy(boost::python::object dst, uint32_t lsb, uint32_t si dstBuf.len * 8)); } - setBits((uint8_t*)dstBuf.buf, lsb, size); + setBits(reinterpret_cast(dstBuf.buf), lsb, size); PyBuffer_Release(&dstBuf); } @@ -453,7 +453,7 @@ bool rim::Master::anyBitsPy(boost::python::object dst, uint32_t lsb, uint32_t si dstBuf.len * 8)); } - ret = anyBits((uint8_t*)dstBuf.buf, lsb, size); + ret = anyBits(reinterpret_cast(dstBuf.buf), lsb, size); PyBuffer_Release(&dstBuf); return ret; diff --git a/src/rogue/interfaces/memory/TcpClient.cpp b/src/rogue/interfaces/memory/TcpClient.cpp index d2e1dd779..eca03a6f1 100644 --- a/src/rogue/interfaces/memory/TcpClient.cpp +++ b/src/rogue/interfaces/memory/TcpClient.cpp @@ -259,7 +259,7 @@ void rim::TcpClient::runThread() { std::memcpy(&type, zmq_msg_data(&(msg[3])), 4); memset(result, 0, 1000); - std::strncpy(result, (char*)zmq_msg_data(&(msg[5])), zmq_msg_size(&(msg[5]))); + std::strncpy(result, reinterpret_cast(zmq_msg_data(&(msg[5]))), zmq_msg_size(&(msg[5]))); // Find Transaction if ((tran = getTransaction(id)) == NULL) { diff --git a/src/rogue/interfaces/memory/TcpServer.cpp b/src/rogue/interfaces/memory/TcpServer.cpp index 1c144a27b..b58fd7777 100644 --- a/src/rogue/interfaces/memory/TcpServer.cpp +++ b/src/rogue/interfaces/memory/TcpServer.cpp @@ -195,7 +195,7 @@ void rim::TcpServer::runThread() { } // Data pointer - data = (uint8_t*)zmq_msg_data(&(msg[4])); + data = reinterpret_cast(zmq_msg_data(&(msg[4]))); bridgeLog_->debug("Starting transaction id=%" PRIu32 ", addr=0x%" PRIx64 ", size=%" PRIu32 ", type=%" PRIu32, diff --git a/src/rogue/interfaces/memory/Transaction.cpp b/src/rogue/interfaces/memory/Transaction.cpp index 497b8ec94..cb5b4b748 100644 --- a/src/rogue/interfaces/memory/Transaction.cpp +++ b/src/rogue/interfaces/memory/Transaction.cpp @@ -318,7 +318,7 @@ void rim::Transaction::setData(boost::python::object p, uint32_t offset) { size_)); } - std::memcpy(begin() + offset, (uint8_t*)pyBuf.buf, count); + std::memcpy(begin() + offset, reinterpret_cast(pyBuf.buf), count); PyBuffer_Release(&pyBuf); } @@ -341,7 +341,7 @@ void rim::Transaction::getData(boost::python::object p, uint32_t offset) { size_)); } - std::memcpy((uint8_t*)pyBuf.buf, begin() + offset, count); + std::memcpy(reinterpret_cast(pyBuf.buf), begin() + offset, count); PyBuffer_Release(&pyBuf); } diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index c5c858eb2..c29f1f47e 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -174,10 +174,10 @@ rim::Variable::Variable(std::string name, for (x = 1; x < bitSize_.size(); x++) bitTotal_ += bitSize_[x]; // Compute rounded up byte size - byteSize_ = (int)std::ceil((float)bitTotal_ / 8.0); + byteSize_ = static_cast(std::ceil(static_cast(bitTotal_) / 8.0)); - lowTranByte_ = (uint32_t*)malloc(sizeof(uint32_t)); - highTranByte_ = (uint32_t*)malloc(sizeof(uint32_t)); + lowTranByte_ = reinterpret_cast(malloc(sizeof(uint32_t))); + highTranByte_ = reinterpret_cast(malloc(sizeof(uint32_t))); // Init remaining fields valueBytes_ = byteSize_; @@ -190,14 +190,14 @@ rim::Variable::Variable(std::string name, bitTotal_ = bitSize_[0]; // Compute rounded up byte size - byteSize_ = (int)std::ceil((float)bitTotal_ / 8.0); + byteSize_ = static_cast(std::ceil(static_cast(bitTotal_) / 8.0)); // Compute total bit range of accessed bits - valueBytes_ = (uint32_t)std::ceil((float)(valueBits_) / 8.0); + valueBytes_ = static_cast(std::ceil(static_cast(valueBits_) / 8.0)); // High and low byte tracking - lowTranByte_ = (uint32_t*)malloc(numValues_ * sizeof(uint32_t)); - highTranByte_ = (uint32_t*)malloc(numValues_ * sizeof(uint32_t)); + lowTranByte_ = reinterpret_cast(malloc(numValues_ * sizeof(uint32_t))); + highTranByte_ = reinterpret_cast(malloc(numValues_ * sizeof(uint32_t))); } // Byte array for fast copies @@ -208,11 +208,11 @@ rim::Variable::Variable(std::string name, if ((bitOffset_.size() == 1) && (bitOffset_[0] % 8 == 0) && (bitSize_[0] % 8 == 0)) { // Standard variable if (numValues_ == 0) { - fastByte_ = (uint32_t*)malloc(sizeof(uint32_t)); + fastByte_ = reinterpret_cast(malloc(sizeof(uint32_t))); // List variable } else if ((valueBits_ % 8) == 0 && (valueStride_ % 8) == 0) { - fastByte_ = (uint32_t*)malloc(numValues_ * sizeof(uint32_t)); + fastByte_ = reinterpret_cast(malloc(numValues_ * sizeof(uint32_t))); } } stale_ = false; @@ -457,10 +457,10 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { // Standard variable if ( numValues_ == 0 ) { // Compute total bit range of accessed bytes - varBytes_ = (int)std::ceil((float)(bitOffset_[bitOffset_.size() - 1] + bitSize_[bitSize_.size() - 1]) / ((float)minSize * 8.0)) * minSize; + varBytes_ = static_cast(std::ceil(static_cast(bitOffset_[bitOffset_.size() - 1] + bitSize_[bitSize_.size() - 1]) / (static_cast(minSize) * 8.0))) * minSize; // Compute the lowest byte, aligned to min access - lowTranByte_[0] = (int)std::floor((float)bitOffset_[0] / ((float)minSize * 8.0)) * minSize; + lowTranByte_[0] = static_cast(std::floor(static_cast(bitOffset_[0]) / (static_cast(minSize) * 8.0))) * minSize; // Compute the highest byte, aligned to min access highTranByte_[0] = varBytes_ - 1; @@ -469,8 +469,8 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { // List variable } else { for (x = 0; x < numValues_; x++) { - lowTranByte_[x] = (uint32_t)std::floor(((float)bitOffset_[0] + (float)x * (float)valueStride_) / ((float)minSize * 8.0)) * minSize; - highTranByte_[x] = (uint32_t)std::ceil(((float)bitOffset_[0] + (float)x * (float)valueStride_ + valueBits_) / ((float)minSize * 8.0)) * minSize - 1; + lowTranByte_[x] = static_cast(std::floor((static_cast(bitOffset_[0]) + static_cast(x) * static_cast(valueStride_)) / (static_cast(minSize) * 8.0))) * minSize; + highTranByte_[x] = static_cast(std::ceil((static_cast(bitOffset_[0]) + static_cast(x) * static_cast(valueStride_) + valueBits_) / (static_cast(minSize) * 8.0))) * minSize - 1; } // Compute total bit range of accessed bytes @@ -640,7 +640,7 @@ void rim::Variable::rateTest() { gettimeofday(&etime, NULL); timersub(&etime, &stime, &dtime); - durr = dtime.tv_sec + (float)dtime.tv_usec / 1.0e6; + durr = dtime.tv_sec + static_cast(dtime.tv_usec) / 1.0e6; rate = count / durr; printf("\nVariable c++ get: Read %" PRIu64 " times in %f seconds. Rate = %f\n", count, durr, rate); @@ -650,7 +650,7 @@ void rim::Variable::rateTest() { gettimeofday(&etime, NULL); timersub(&etime, &stime, &dtime); - durr = dtime.tv_sec + (float)dtime.tv_usec / 1.0e6; + durr = dtime.tv_sec + static_cast(dtime.tv_usec) / 1.0e6; rate = count / durr; printf("\nVariable c++ set: Wrote %" PRIu64 " times in %f seconds. Rate = %f\n", count, durr, rate); diff --git a/src/rogue/interfaces/stream/Buffer.cpp b/src/rogue/interfaces/stream/Buffer.cpp index aec737b89..4f63e7674 100644 --- a/src/rogue/interfaces/stream/Buffer.cpp +++ b/src/rogue/interfaces/stream/Buffer.cpp @@ -48,7 +48,7 @@ ris::BufferPtr ris::Buffer::create(ris::PoolPtr source, void* data, uint32_t met */ ris::Buffer::Buffer(ris::PoolPtr source, void* data, uint32_t meta, uint32_t size, uint32_t alloc) { source_ = source; - data_ = (uint8_t*)data; + data_ = reinterpret_cast(data); meta_ = meta; rawSize_ = size; allocSize_ = alloc; diff --git a/src/rogue/interfaces/stream/Frame.cpp b/src/rogue/interfaces/stream/Frame.cpp index 67e47a154..176d9a164 100644 --- a/src/rogue/interfaces/stream/Frame.cpp +++ b/src/rogue/interfaces/stream/Frame.cpp @@ -370,7 +370,7 @@ void ris::Frame::readPy(boost::python::object p, uint32_t offset) { } ris::FrameIterator beg = this->begin() + offset; - ris::fromFrame(beg, count, (uint8_t*)pyBuf.buf); + ris::fromFrame(beg, count, reinterpret_cast(pyBuf.buf)); PyBuffer_Release(&pyBuf); } @@ -396,7 +396,7 @@ void ris::Frame::writePy(boost::python::object p, uint32_t offset) { minPayload(offset + count); ris::FrameIterator beg = this->begin() + offset; - ris::toFrame(beg, count, (uint8_t*)pyBuf.buf); + ris::toFrame(beg, count, reinterpret_cast(pyBuf.buf)); PyBuffer_Release(&pyBuf); } diff --git a/src/rogue/interfaces/stream/Pool.cpp b/src/rogue/interfaces/stream/Pool.cpp index 698a3a17f..52237d34b 100644 --- a/src/rogue/interfaces/stream/Pool.cpp +++ b/src/rogue/interfaces/stream/Pool.cpp @@ -159,7 +159,7 @@ ris::BufferPtr ris::Pool::allocBuffer(uint32_t size, uint32_t* total) { if (dataQ_.size() > 0) { data = dataQ_.front(); dataQ_.pop(); - } else if ((data = (uint8_t*)malloc(bAlloc)) == NULL) { + } else if ((data = reinterpret_cast(malloc(bAlloc))) == NULL) { throw( rogue::GeneralError::create("Pool::allocBuffer", "Failed to allocate buffer with size = %" PRIu32, bAlloc)); } diff --git a/src/rogue/interfaces/stream/TcpCore.cpp b/src/rogue/interfaces/stream/TcpCore.cpp index c4cab4c4a..00a82294c 100644 --- a/src/rogue/interfaces/stream/TcpCore.cpp +++ b/src/rogue/interfaces/stream/TcpCore.cpp @@ -202,7 +202,7 @@ void ris::TcpCore::acceptFrame(ris::FramePtr frame) { // Copy data ris::FrameIterator iter = frame->begin(); - data = (uint8_t*)zmq_msg_data(&(msg[3])); + data = reinterpret_cast(zmq_msg_data(&(msg[3]))); ris::fromFrame(iter, frame->getPayload(), data); // Send data @@ -267,7 +267,7 @@ void ris::TcpCore::runThread() { std::memcpy(&err, zmq_msg_data(&(msg[2])), 1); // Get message info - data = (uint8_t*)zmq_msg_data(&(msg[3])); + data = reinterpret_cast(zmq_msg_data(&(msg[3]))); size = zmq_msg_size(&(msg[3])); // Generate frame diff --git a/src/rogue/protocols/rssi/Controller.cpp b/src/rogue/protocols/rssi/Controller.cpp index fa621df96..952975269 100644 --- a/src/rogue/protocols/rssi/Controller.cpp +++ b/src/rogue/protocols/rssi/Controller.cpp @@ -703,7 +703,7 @@ int8_t rpr::Controller::retransmit(uint8_t id) { //! Convert rssi time to microseconds void rpr::Controller::convTime(struct timeval& tme, uint32_t rssiTime) { float units = std::pow(10, -TimeoutUnit); - float value = units * (float)rssiTime; + float value = units * static_cast(rssiTime); uint32_t usec = (uint32_t)(value / 1e-6); diff --git a/src/rogue/protocols/rssi/Header.cpp b/src/rogue/protocols/rssi/Header.cpp index 4cb157933..db4f7f316 100644 --- a/src/rogue/protocols/rssi/Header.cpp +++ b/src/rogue/protocols/rssi/Header.cpp @@ -40,22 +40,22 @@ namespace ris = rogue::interfaces::stream; //! Set 16-bit uint value void rpr::Header::setUInt16(uint8_t* data, uint8_t byte, uint16_t value) { - *((uint16_t*)(&(data[byte]))) = htons(value); + *reinterpret_cast(&data[byte]) = htons(value); } //! Get 16-bit uint value uint16_t rpr::Header::getUInt16(uint8_t* data, uint8_t byte) { - return (ntohs(*((uint16_t*)(&(data[byte]))))); + return ntohs(*reinterpret_cast(&data[byte])); } //! Set 32-bit uint value void rpr::Header::setUInt32(uint8_t* data, uint8_t byte, uint32_t value) { - *((uint32_t*)(&(data[byte]))) = htonl(value); + *reinterpret_cast(&(data[byte])) = htonl(value); } //! Get 32-bit uint value uint32_t rpr::Header::getUInt32(uint8_t* data, uint8_t byte) { - return (ntohl(*((uint32_t*)(&(data[byte]))))); + return ntohl(*reinterpret_cast(&(data[byte]))); } //! compute checksum diff --git a/src/rogue/protocols/udp/Core.cpp b/src/rogue/protocols/udp/Core.cpp index 260dd3e57..f736439a0 100644 --- a/src/rogue/protocols/udp/Core.cpp +++ b/src/rogue/protocols/udp/Core.cpp @@ -57,7 +57,7 @@ bool rpu::Core::setRxBufferCount(uint32_t count) { uint32_t per = (jumbo_) ? (JumboMTU) : (StdMTU); uint32_t size = count * per; - setsockopt(fd_, SOL_SOCKET, SO_RCVBUF, (char*)&size, sizeof(size)); + setsockopt(fd_, SOL_SOCKET, SO_RCVBUF, reinterpret_cast(&size), sizeof(size)); getsockopt(fd_, SOL_SOCKET, SO_RCVBUF, &rwin, &rwin_size); if (size > rwin) { diff --git a/src/rogue/protocols/xilinx/JtagDriver.cpp b/src/rogue/protocols/xilinx/JtagDriver.cpp index c44bec19e..c76cc379f 100644 --- a/src/rogue/protocols/xilinx/JtagDriver.cpp +++ b/src/rogue/protocols/xilinx/JtagDriver.cpp @@ -131,7 +131,7 @@ uint32_t rpx::JtagDriver::cvtPerNs(Header reply) { if (0 == rawVal) { return UNKNOWN_PERIOD; } - tmp = ((double)rawVal) * 4.0 / 256.0; + tmp = static_cast(rawVal) * 4.0 / 256.0; return (uint32_t)round(pow(10.0, tmp) * 1.0E9 / REF_FREQ_HZ()); } diff --git a/src/rogue/protocols/xilinx/XvcConnection.cpp b/src/rogue/protocols/xilinx/XvcConnection.cpp index e479fd119..cd2220e81 100644 --- a/src/rogue/protocols/xilinx/XvcConnection.cpp +++ b/src/rogue/protocols/xilinx/XvcConnection.cpp @@ -164,7 +164,7 @@ void rpx::XvcConnection::run() { drv_->query(); // informs the driver that there is a new connection - tl_ = sprintf((char*)&txb_[0], "xvcServer_v1.0:%ld\n", maxVecLen_); + tl_ = sprintf(reinterpret_cast(&txb_[0]), "xvcServer_v1.0:%ld\n", maxVecLen_); bump(8); } else if (0 == ::memcmp(rp_, "se", 2)) { diff --git a/src/rogue/utilities/Prbs.cpp b/src/rogue/utilities/Prbs.cpp index 4fde1d73b..50ae4e87e 100644 --- a/src/rogue/utilities/Prbs.cpp +++ b/src/rogue/utilities/Prbs.cpp @@ -81,7 +81,7 @@ ru::Prbs::Prbs() { // Init 4 taps tapCnt_ = 4; - taps_ = (uint8_t*)malloc(sizeof(uint8_t) * tapCnt_); + taps_ = reinterpret_cast(malloc(sizeof(uint8_t) * tapCnt_)); taps_[0] = 1; taps_[1] = 2; taps_[2] = 6; @@ -121,7 +121,7 @@ double ru::Prbs::updateTime(struct timeval* last) { timersub(&now, last, &per); if (timercmp(&per, &cmp, >)) { - ret = (float)per.tv_sec + (float(per.tv_usec) / 1e6); + ret = static_cast(per.tv_sec) + static_cast(per.tv_usec) / 1e6; gettimeofday(last, NULL); } else { ret = 0.0; @@ -149,7 +149,7 @@ void ru::Prbs::setTaps(uint32_t tapCnt, uint8_t* taps) { free(taps_); tapCnt_ = tapCnt; - taps_ = (uint8_t*)malloc(sizeof(uint8_t) * tapCnt); + taps_ = reinterpret_cast(malloc(sizeof(uint8_t) * tapCnt)); for (i = 0; i < tapCnt_; i++) taps_[i] = taps[i]; } @@ -163,7 +163,7 @@ void ru::Prbs::setTapsPy(boost::python::object p) { if (PyObject_GetBuffer(p.ptr(), &pyBuf, PyBUF_SIMPLE) < 0) throw(rogue::GeneralError("Prbs::setTapsPy", "Python Buffer Error")); - setTaps(pyBuf.len, (uint8_t*)pyBuf.buf); + setTaps(pyBuf.len, reinterpret_cast(pyBuf.buf)); PyBuffer_Release(&pyBuf); } @@ -387,8 +387,8 @@ void ru::Prbs::genFrame(uint32_t size) { txBytes_ += size; if ((per = updateTime(&lastTxTime_)) > 0.0) { - txRate_ = (float)(txCount_ - lastTxCount_) / per; - txBw_ = (float)(txBytes_ - lastTxBytes_) / per; + txRate_ = static_cast(txCount_ - lastTxCount_) / per; + txBw_ = static_cast(txBytes_ - lastTxBytes_) / per; lastTxCount_ = txCount_; lastTxBytes_ = txBytes_; } @@ -498,8 +498,8 @@ void ru::Prbs::acceptFrame(ris::FramePtr frame) { rxBytes_ += size; if ((per = updateTime(&lastRxTime_)) > 0.0) { - rxRate_ = (float)(rxCount_ - lastRxCount_) / per; - rxBw_ = (float)(rxBytes_ - lastRxBytes_) / per; + rxRate_ = static_cast(rxCount_ - lastRxCount_) / per; + rxBw_ = static_cast(rxBytes_ - lastRxBytes_) / per; lastRxCount_ = rxCount_; lastRxBytes_ = rxBytes_; } diff --git a/src/rogue/utilities/StreamUnZip.cpp b/src/rogue/utilities/StreamUnZip.cpp index a683d90c9..ed52e6c0f 100644 --- a/src/rogue/utilities/StreamUnZip.cpp +++ b/src/rogue/utilities/StreamUnZip.cpp @@ -80,11 +80,11 @@ void ru::StreamUnZip::acceptFrame(ris::FramePtr frame) { // Setup decompression pointers rBuff = frame->beginBuffer(); - strm.next_in = (char*)(*rBuff)->begin(); + strm.next_in = reinterpret_cast((*rBuff)->begin()); strm.avail_in = (*rBuff)->getPayload(); wBuff = newFrame->beginBuffer(); - strm.next_out = (char*)(*wBuff)->begin(); + strm.next_out = reinterpret_cast((*wBuff)->begin()); strm.avail_out = (*wBuff)->getAvailable(); // Use the iterators to move data @@ -99,7 +99,7 @@ void ru::StreamUnZip::acceptFrame(ris::FramePtr frame) { // Update read buffer if necessary if (strm.avail_in == 0) { ++rBuff; - strm.next_in = (char*)(*rBuff)->begin(); + strm.next_in = reinterpret_cast((*rBuff)->begin()); strm.avail_in = (*rBuff)->getPayload(); } @@ -112,7 +112,7 @@ void ru::StreamUnZip::acceptFrame(ris::FramePtr frame) { } else { ++wBuff; } - strm.next_out = (char*)(*wBuff)->begin(); + strm.next_out = reinterpret_cast((*wBuff)->begin()); strm.avail_out = (*wBuff)->getAvailable(); } } while (1); diff --git a/src/rogue/utilities/StreamZip.cpp b/src/rogue/utilities/StreamZip.cpp index e6477c828..ffe3ca557 100644 --- a/src/rogue/utilities/StreamZip.cpp +++ b/src/rogue/utilities/StreamZip.cpp @@ -80,11 +80,11 @@ void ru::StreamZip::acceptFrame(ris::FramePtr frame) { // Setup decompression pointers rBuff = frame->beginBuffer(); - strm.next_in = (char*)(*rBuff)->begin(); + strm.next_in = reinterpret_cast((*rBuff)->begin()); strm.avail_in = (*rBuff)->getPayload(); wBuff = newFrame->beginBuffer(); - strm.next_out = (char*)(*wBuff)->begin(); + strm.next_out = reinterpret_cast((*wBuff)->begin()); strm.avail_out = (*wBuff)->getAvailable(); // Use the iterators to move data @@ -96,7 +96,7 @@ void ru::StreamZip::acceptFrame(ris::FramePtr frame) { // Update read buffer if necessary if (strm.avail_in == 0 && (!done)) { if (++rBuff != frame->endBuffer()) { - strm.next_in = (char*)(*rBuff)->begin(); + strm.next_in = reinterpret_cast((*rBuff)->begin()); strm.avail_in = (*rBuff)->getPayload(); } else { done = true; @@ -112,7 +112,7 @@ void ru::StreamZip::acceptFrame(ris::FramePtr frame) { } else { ++wBuff; } - strm.next_out = (char*)(*wBuff)->begin(); + strm.next_out = reinterpret_cast((*wBuff)->begin()); strm.avail_out = (*wBuff)->getAvailable(); } } while (ret != BZ_STREAM_END); diff --git a/src/rogue/utilities/fileio/StreamWriter.cpp b/src/rogue/utilities/fileio/StreamWriter.cpp index dea80b900..f7425b245 100644 --- a/src/rogue/utilities/fileio/StreamWriter.cpp +++ b/src/rogue/utilities/fileio/StreamWriter.cpp @@ -177,7 +177,7 @@ void ruf::StreamWriter::setBufferSize(uint32_t size) { // Buffer is enabled if (size != 0) { // Create new buffer - if ((buffer_ = (uint8_t*)malloc(size)) == NULL) + if ((buffer_ = reinterpret_cast(malloc(size))) == NULL) throw(rogue::GeneralError::create("StreamWriter::setBufferSize", "Failed to allocate buffer with size = %" PRIu32, size)); From 251dab601588cf118484af04eb7cb0d70e00da27 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 18:57:12 -0700 Subject: [PATCH 24/41] resolving c++ linter Never use XXXX. Use snprintf instead. [runtime/printf] --- src/rogue/Logging.cpp | 2 +- src/rogue/interfaces/memory/Transaction.cpp | 2 +- src/rogue/interfaces/stream/Slave.cpp | 4 ++-- src/rogue/protocols/xilinx/XvcConnection.cpp | 2 +- src/rogue/utilities/Prbs.cpp | 7 ++++--- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/rogue/Logging.cpp b/src/rogue/Logging.cpp index 5feac4d73..5d5f55ad2 100644 --- a/src/rogue/Logging.cpp +++ b/src/rogue/Logging.cpp @@ -105,7 +105,7 @@ void rogue::Logging::intLog(uint32_t level, const char* fmt, va_list args) { struct timeval tme; char buffer[1000]; - vsnprintf(buffer, 1000, fmt, args); + vsnprintf(buffer, sizeof(buffer), fmt, args); gettimeofday(&tme, NULL); printf("%l" PRIi32 ".%06l" PRIi32 ":%s: %s\n", tme.tv_sec, tme.tv_usec, name_.c_str(), buffer); } diff --git a/src/rogue/interfaces/memory/Transaction.cpp b/src/rogue/interfaces/memory/Transaction.cpp index cb5b4b748..2b78ed5b3 100644 --- a/src/rogue/interfaces/memory/Transaction.cpp +++ b/src/rogue/interfaces/memory/Transaction.cpp @@ -217,7 +217,7 @@ void rim::Transaction::error(const char* fmt, ...) { char buffer[10000]; va_start(args, fmt); - vsnprintf(buffer, 10000, fmt, args); + vsnprintf(buffer, sizeof(buffer), fmt, args); va_end(args); errorStr(std::string(buffer)); diff --git a/src/rogue/interfaces/stream/Slave.cpp b/src/rogue/interfaces/stream/Slave.cpp index 085ccb5f9..1fd7cca17 100644 --- a/src/rogue/interfaces/stream/Slave.cpp +++ b/src/rogue/interfaces/stream/Slave.cpp @@ -88,7 +88,7 @@ void ris::Slave::acceptFrame(ris::FramePtr frame) { char buffer[1000]; log_->critical("Got Size=%" PRIu32 ", Error=%" PRIu8 ", Data:", frame->getPayload(), frame->getError()); - sprintf(buffer, " "); + snprintf(buffer, sizeof(buffer), " "); count = 0; for (it = frame->begin(); (count < debug_) && (it != frame->end()); ++it) { @@ -98,7 +98,7 @@ void ris::Slave::acceptFrame(ris::FramePtr frame) { snprintf(buffer + strlen(buffer), 1000 - strlen(buffer), " 0x%.2x", val); if (((count + 1) % 8) == 0) { log_->critical(buffer); - sprintf(buffer, " "); + snprintf(buffer, sizeof(buffer), " "); } } diff --git a/src/rogue/protocols/xilinx/XvcConnection.cpp b/src/rogue/protocols/xilinx/XvcConnection.cpp index cd2220e81..b232b6935 100644 --- a/src/rogue/protocols/xilinx/XvcConnection.cpp +++ b/src/rogue/protocols/xilinx/XvcConnection.cpp @@ -164,7 +164,7 @@ void rpx::XvcConnection::run() { drv_->query(); // informs the driver that there is a new connection - tl_ = sprintf(reinterpret_cast(&txb_[0]), "xvcServer_v1.0:%ld\n", maxVecLen_); + tl_ = snprintf(reinterpret_cast(&txb_[0]), sizeof(txb_), "xvcServer_v1.0:%ld\n", maxVecLen_); bump(8); } else if (0 == ::memcmp(rp_, "se", 2)) { diff --git a/src/rogue/utilities/Prbs.cpp b/src/rogue/utilities/Prbs.cpp index 50ae4e87e..ba426c9bb 100644 --- a/src/rogue/utilities/Prbs.cpp +++ b/src/rogue/utilities/Prbs.cpp @@ -471,19 +471,20 @@ void ru::Prbs::acceptFrame(ris::FramePtr frame) { flfsr(expData); if (!std::equal(frIter, frIter + byteWidth_, expData)) { - sprintf(debugA, + snprintf(debugA, sizeof(debugA), "Bad value at index %" PRIu32 ". count=%" PRIu32 ", size=%" PRIu32, pos, rxCount_, (size / byteWidth_) - 1); + for (x = 0; x < byteWidth_; x++) { - sprintf(debugB, + snprintf(debugB, sizeof(debugB), "\n %" PRIu32 ":%" PRIu32 " Got=0x%" PRIx8 " Exp=0x%" PRIx8, pos, x, *(frIter + x), *(expData + x)); - strcat(debugA, debugB); + snprintf(debugA + strlen(debugA), sizeof(debugA) - strlen(debugA), "%s", debugB); } rxLog_->warning(debugA); rxErrCount_++; From d881466cae950fd6c29ee497c3a96bc3c58e5edb Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 19:03:12 -0700 Subject: [PATCH 25/41] resolving c++ linter Use operator XXX instead of YYY [readability/alt_tokens] --- src/rogue/interfaces/memory/Transaction.cpp | 4 ++-- src/rogue/utilities/Prbs.cpp | 2 +- src/rogue/utilities/fileio/LegacyStreamWriter.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rogue/interfaces/memory/Transaction.cpp b/src/rogue/interfaces/memory/Transaction.cpp index 2b78ed5b3..ecf4b1729 100644 --- a/src/rogue/interfaces/memory/Transaction.cpp +++ b/src/rogue/interfaces/memory/Transaction.cpp @@ -174,7 +174,7 @@ void rim::Transaction::done() { parentTran->subTranMap_.erase(id_); // If this is the last sub-transaction, notify parent transaction it is all done - if (parentTran->subTranMap_.empty() and parentTran->doneCreatingSubTransactions_) parentTran->done(); + if (parentTran->subTranMap_.empty() && parentTran->doneCreatingSubTransactions_) parentTran->done(); } } } @@ -203,7 +203,7 @@ void rim::Transaction::errorStr(std::string error) { parentTran->subTranMap_.erase(id_); // If this is the last sub-transaction, notify parent transaction it is all done - if (parentTran->subTranMap_.empty() and parentTran->doneCreatingSubTransactions_) + if (parentTran->subTranMap_.empty() && parentTran->doneCreatingSubTransactions_) parentTran->error("Transaction error. Subtransaction %" PRIu32 " failed with error: %s.\n", id_, error.c_str()); diff --git a/src/rogue/utilities/Prbs.cpp b/src/rogue/utilities/Prbs.cpp index ba426c9bb..1390f4825 100644 --- a/src/rogue/utilities/Prbs.cpp +++ b/src/rogue/utilities/Prbs.cpp @@ -412,7 +412,7 @@ void ru::Prbs::acceptFrame(ris::FramePtr frame) { rogue::GilRelease noGil; - while (not rxEnable_) usleep(10000); + while (!rxEnable_) usleep(10000); ris::FrameLockPtr fLock = frame->lock(); std::lock_guard lock(pMtx_); diff --git a/src/rogue/utilities/fileio/LegacyStreamWriter.cpp b/src/rogue/utilities/fileio/LegacyStreamWriter.cpp index 144bb2a47..4b8b6b605 100644 --- a/src/rogue/utilities/fileio/LegacyStreamWriter.cpp +++ b/src/rogue/utilities/fileio/LegacyStreamWriter.cpp @@ -101,7 +101,7 @@ void ruf::LegacyStreamWriter::writeFile(uint8_t channel, std::shared_ptrgetPayload() == 0) return; - if (channel != RawData and channel != YamlData) { + if (channel != RawData && channel != YamlData) { throw(rogue::GeneralError("LegacyStreamWriter::writeFile", "Invalid channel")); } From 99eb02a7c57316f6a8f8c111adbbeb4505dc7822 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Fri, 28 Jun 2024 19:22:35 -0700 Subject: [PATCH 26/41] resolving c++ linter Use int16/int64/etc, rather than the C type long [runtime/int] --- include/rogue/protocols/xilinx/JtagDriver.h | 8 ++++---- include/rogue/protocols/xilinx/Xvc.h | 2 +- include/rogue/protocols/xilinx/XvcConnection.h | 16 ++++++++-------- src/rogue/interfaces/ZmqClient.cpp | 4 ++-- src/rogue/interfaces/ZmqServer.cpp | 6 +++--- src/rogue/interfaces/memory/TcpClient.cpp | 4 ++-- src/rogue/interfaces/memory/TcpServer.cpp | 4 ++-- src/rogue/interfaces/stream/TcpCore.cpp | 8 ++++---- src/rogue/protocols/xilinx/JtagDriver.cpp | 12 ++++++------ src/rogue/protocols/xilinx/Xvc.cpp | 4 ++-- src/rogue/protocols/xilinx/XvcConnection.cpp | 18 +++++++++--------- 11 files changed, 43 insertions(+), 43 deletions(-) diff --git a/include/rogue/protocols/xilinx/JtagDriver.h b/include/rogue/protocols/xilinx/JtagDriver.h index 183ea8a4f..ab4a2a776 100644 --- a/include/rogue/protocols/xilinx/JtagDriver.h +++ b/include/rogue/protocols/xilinx/JtagDriver.h @@ -131,7 +131,7 @@ class JtagDriver { static Xid getXid(Header x); static uint32_t getCmd(Header x); static unsigned getErr(Header x); - static unsigned long getLen(Header x); + static uint64_t getLen(Header x); // returns error message or NULL (unknown error) static const char* getMsg(unsigned error); @@ -191,7 +191,7 @@ class JtagDriver { // if 0 then no the target does not have memory and if // there is reliable transport there is no limit to vector // length. - virtual unsigned long query(); + virtual uint64_t query(); // Max. vector size (in bytes) this driver supports - may be different // from what the target supports and the minimum will be used... @@ -199,7 +199,7 @@ class JtagDriver { // must handle typically contains two vectors and a header, so // the driver must consider this when computing the max. supported // vector size) - virtual unsigned long getMaxVectorSize() { + virtual uint64_t getMaxVectorSize() { return 0; } @@ -207,7 +207,7 @@ class JtagDriver { // send tms and tdi vectors of length numBits (each) and receive tdo // little-endian (first send/received at lowest offset) - virtual void sendVectors(unsigned long numBits, uint8_t* tms, uint8_t* tdi, uint8_t* tdo); + virtual void sendVectors(uint64_t numBits, uint8_t* tms, uint8_t* tdi, uint8_t* tdo); virtual void dumpInfo(FILE* f = stdout); diff --git a/include/rogue/protocols/xilinx/Xvc.h b/include/rogue/protocols/xilinx/Xvc.h index de92c89ef..4882032f0 100644 --- a/include/rogue/protocols/xilinx/Xvc.h +++ b/include/rogue/protocols/xilinx/Xvc.h @@ -85,7 +85,7 @@ class Xvc : public rogue::interfaces::stream::Master, // Receive frame void acceptFrame(std::shared_ptr frame); - virtual unsigned long getMaxVectorSize() final; + virtual uint64_t getMaxVectorSize() final; virtual int xfer(uint8_t* txBuffer, unsigned txBytes, diff --git a/include/rogue/protocols/xilinx/XvcConnection.h b/include/rogue/protocols/xilinx/XvcConnection.h index 70e4ee4ed..20b7b5989 100644 --- a/include/rogue/protocols/xilinx/XvcConnection.h +++ b/include/rogue/protocols/xilinx/XvcConnection.h @@ -41,25 +41,25 @@ class XvcConnection { uint8_t* rp_; vector rxb_; - unsigned long rl_; - unsigned long tl_; + uint64_t rl_; + uint64_t tl_; vector txb_; - unsigned long maxVecLen_; - unsigned long supVecLen_; - unsigned long chunk_; + uint64_t maxVecLen_; + uint64_t supVecLen_; + uint64_t chunk_; public: - XvcConnection(int sd, JtagDriver* drv, unsigned long maxVecLen_ = 32768); + XvcConnection(int sd, JtagDriver* drv, uint64_t maxVecLen_ = 32768); // fill rx buffer to 'n' octets (from TCP connection) - virtual void fill(unsigned long n); + virtual void fill(uint64_t n); // send tx buffer to TCP connection virtual void flush(); // discard 'n' octets from rx buffer (mark as consumed) - virtual void bump(unsigned long n); + virtual void bump(uint64_t n); // (re)allocated buffers virtual void allocBufs(); diff --git a/src/rogue/interfaces/ZmqClient.cpp b/src/rogue/interfaces/ZmqClient.cpp index ad8aaae00..beb835860 100644 --- a/src/rogue/interfaces/ZmqClient.cpp +++ b/src/rogue/interfaces/ZmqClient.cpp @@ -74,7 +74,7 @@ rogue::interfaces::ZmqClient::ZmqClient(std::string addr, uint16_t port, bool do temp = "tcp://"; temp.append(addr); temp.append(":"); - temp.append(std::to_string(static_cast(port))); + temp.append(std::to_string(static_cast(port))); if (zmq_setsockopt(this->zmqSub_, ZMQ_SUBSCRIBE, "", 0) != 0) throw(rogue::GeneralError("ZmqClient::ZmqClient", "Failed to set socket subscribe")); @@ -98,7 +98,7 @@ rogue::interfaces::ZmqClient::ZmqClient(std::string addr, uint16_t port, bool do temp = "tcp://"; temp.append(addr); temp.append(":"); - temp.append(std::to_string(static_cast(reqPort))); + temp.append(std::to_string(static_cast(reqPort))); waitRetry_ = false; // Don't keep waiting after timeout timeout_ = 1000; // 1 second diff --git a/src/rogue/interfaces/ZmqServer.cpp b/src/rogue/interfaces/ZmqServer.cpp index 61413cfbf..f1dd999eb 100644 --- a/src/rogue/interfaces/ZmqServer.cpp +++ b/src/rogue/interfaces/ZmqServer.cpp @@ -163,7 +163,7 @@ bool rogue::interfaces::ZmqServer::tryConnect() { temp = "tcp://"; temp.append(this->addr_); temp.append(":"); - temp.append(std::to_string(static_cast(this->basePort_))); + temp.append(std::to_string(static_cast(this->basePort_))); if (zmq_bind(this->zmqPub_, temp.c_str()) < 0) { zmq_close(this->zmqPub_); @@ -177,7 +177,7 @@ bool rogue::interfaces::ZmqServer::tryConnect() { temp = "tcp://"; temp.append(this->addr_); temp.append(":"); - temp.append(std::to_string(static_cast(this->basePort_ + 1))); + temp.append(std::to_string(static_cast(this->basePort_ + 1))); if (zmq_bind(this->zmqRep_, temp.c_str()) < 0) { zmq_close(this->zmqPub_); @@ -191,7 +191,7 @@ bool rogue::interfaces::ZmqServer::tryConnect() { temp = "tcp://"; temp.append(this->addr_); temp.append(":"); - temp.append(std::to_string(static_cast(this->basePort_ + 2))); + temp.append(std::to_string(static_cast(this->basePort_ + 2))); if (zmq_bind(this->zmqStr_, temp.c_str()) < 0) { zmq_close(this->zmqPub_); diff --git a/src/rogue/interfaces/memory/TcpClient.cpp b/src/rogue/interfaces/memory/TcpClient.cpp index eca03a6f1..971ff7151 100644 --- a/src/rogue/interfaces/memory/TcpClient.cpp +++ b/src/rogue/interfaces/memory/TcpClient.cpp @@ -75,8 +75,8 @@ rim::TcpClient::TcpClient(std::string addr, uint16_t port) : rim::Slave(4, 0xFFF if (zmq_setsockopt(this->zmqReq_, ZMQ_IMMEDIATE, &opt, sizeof(int32_t)) != 0) throw(rogue::GeneralError("memory::TcpClient::TcpClient", "Failed to set socket immediate")); - this->respAddr_.append(std::to_string(static_cast(port + 1))); - this->reqAddr_.append(std::to_string(static_cast(port))); + this->respAddr_.append(std::to_string(static_cast(port + 1))); + this->reqAddr_.append(std::to_string(static_cast(port))); this->bridgeLog_->debug("Creating response client port: %s", this->respAddr_.c_str()); diff --git a/src/rogue/interfaces/memory/TcpServer.cpp b/src/rogue/interfaces/memory/TcpServer.cpp index b58fd7777..971b3ae1f 100644 --- a/src/rogue/interfaces/memory/TcpServer.cpp +++ b/src/rogue/interfaces/memory/TcpServer.cpp @@ -68,8 +68,8 @@ rim::TcpServer::TcpServer(std::string addr, uint16_t port) { this->zmqResp_ = zmq_socket(this->zmqCtx_, ZMQ_PUSH); this->zmqReq_ = zmq_socket(this->zmqCtx_, ZMQ_PULL); - this->respAddr_.append(std::to_string(static_cast(port + 1))); - this->reqAddr_.append(std::to_string(static_cast(port))); + this->respAddr_.append(std::to_string(static_cast(port + 1))); + this->reqAddr_.append(std::to_string(static_cast(port))); this->bridgeLog_->debug("Creating response client port: %s", this->respAddr_.c_str()); diff --git a/src/rogue/interfaces/stream/TcpCore.cpp b/src/rogue/interfaces/stream/TcpCore.cpp index 00a82294c..d0e13482b 100644 --- a/src/rogue/interfaces/stream/TcpCore.cpp +++ b/src/rogue/interfaces/stream/TcpCore.cpp @@ -92,8 +92,8 @@ ris::TcpCore::TcpCore(std::string addr, uint16_t port, bool server) { // Server mode if (server) { - this->pullAddr_.append(std::to_string(static_cast(port))); - this->pushAddr_.append(std::to_string(static_cast(port + 1))); + this->pullAddr_.append(std::to_string(static_cast(port))); + this->pushAddr_.append(std::to_string(static_cast(port + 1))); this->bridgeLog_->debug("Creating pull server port: %s", this->pullAddr_.c_str()); @@ -115,8 +115,8 @@ ris::TcpCore::TcpCore(std::string addr, uint16_t port, bool server) { // Client mode } else { - this->pullAddr_.append(std::to_string(static_cast(port + 1))); - this->pushAddr_.append(std::to_string(static_cast(port))); + this->pullAddr_.append(std::to_string(static_cast(port + 1))); + this->pushAddr_.append(std::to_string(static_cast(port))); this->bridgeLog_->debug("Creating pull client port: %s", this->pullAddr_.c_str()); diff --git a/src/rogue/protocols/xilinx/JtagDriver.cpp b/src/rogue/protocols/xilinx/JtagDriver.cpp index c76cc379f..da6dfb552 100644 --- a/src/rogue/protocols/xilinx/JtagDriver.cpp +++ b/src/rogue/protocols/xilinx/JtagDriver.cpp @@ -82,7 +82,7 @@ unsigned rpx::JtagDriver::getErr(Header x) { return (x & ERR_MASK) >> ERR_SHIFT; } -unsigned long rpx::JtagDriver::getLen(Header x) { +uint64_t rpx::JtagDriver::getLen(Header x) { if (getCmd(x) != CMD_S) throw( rogue::GeneralError::create("JtagDriver::getLen()", "Cannot extract length from non-shift command header")); @@ -207,7 +207,7 @@ int rpx::JtagDriver::xferRel(uint8_t* txb, unsigned txBytes, Header* phdr, uint8 return (0); } -unsigned long rpx::JtagDriver::query() { +uint64_t rpx::JtagDriver::query() { Header hdr; unsigned siz; @@ -228,7 +228,7 @@ unsigned long rpx::JtagDriver::query() { log_->debug("Query result: wordSize %" PRId32 ", memDepth %" PRId32 ", period %l" PRId32 "ns\n", wordSize_, memDepth_, - (unsigned long)periodNs_); + (uint64_t)periodNs_); if (0 == memDepth_) retry_ = 0; @@ -255,9 +255,9 @@ uint32_t rpx::JtagDriver::setPeriodNs(uint32_t requestedPeriod) { return UNKNOWN_PERIOD == currentPeriod ? requestedPeriod : currentPeriod; } -void rpx::JtagDriver::sendVectors(unsigned long bits, uint8_t* tms, uint8_t* tdi, uint8_t* tdo) { +void rpx::JtagDriver::sendVectors(uint64_t bits, uint8_t* tms, uint8_t* tdi, uint8_t* tdo) { unsigned wsz = getWordSize(); - unsigned long bytesCeil = (bits + 8 - 1) / 8; + uint64_t bytesCeil = (bits + 8 - 1) / 8; unsigned wholeWords = bytesCeil / wsz; unsigned wholeWordBytes = wholeWords * wsz; unsigned wordCeilBytes = ((bytesCeil + wsz - 1) / wsz) * wsz; @@ -292,7 +292,7 @@ void rpx::JtagDriver::dumpInfo(FILE* f) { fprintf(f, "Word size: %d\n", getWordSize()); fprintf(f, "Target Memory Depth (bytes) %d\n", getWordSize() * getMemDepth()); fprintf(f, "Max. Vector Length (bytes) %ld\n", getMaxVectorSize()); - fprintf(f, "TCK Period (ns) %ld\n", (unsigned long)getPeriodNs()); + fprintf(f, "TCK Period (ns) %ld\n", (uint64_t)getPeriodNs()); } void rpx::JtagDriver::setup_python() { diff --git a/src/rogue/protocols/xilinx/Xvc.cpp b/src/rogue/protocols/xilinx/Xvc.cpp index 3dc08e2ae..a859d66fb 100644 --- a/src/rogue/protocols/xilinx/Xvc.cpp +++ b/src/rogue/protocols/xilinx/Xvc.cpp @@ -121,9 +121,9 @@ void rpx::Xvc::acceptFrame(ris::FramePtr frame) { // All we need to do is ensure that as soon as the new frame comes in, it's stored in the queue. } -unsigned long rpx::Xvc::getMaxVectorSize() { +uint64_t rpx::Xvc::getMaxVectorSize() { // MTU lim; 2*vector size + header must fit! - unsigned long mtuLim = (mtu_ - getWordSize()) / 2; + uint64_t mtuLim = (mtu_ - getWordSize()) / 2; return mtuLim; } diff --git a/src/rogue/protocols/xilinx/XvcConnection.cpp b/src/rogue/protocols/xilinx/XvcConnection.cpp index b232b6935..549cb45c9 100644 --- a/src/rogue/protocols/xilinx/XvcConnection.cpp +++ b/src/rogue/protocols/xilinx/XvcConnection.cpp @@ -22,7 +22,7 @@ namespace rpx = rogue::protocols::xilinx; -rpx::XvcConnection::XvcConnection(int sd, JtagDriver* drv, unsigned long maxVecLen) +rpx::XvcConnection::XvcConnection(int sd, JtagDriver* drv, uint64_t maxVecLen) : drv_(drv), maxVecLen_(maxVecLen), supVecLen_(0) { @@ -67,10 +67,10 @@ ssize_t rpx::XvcConnection::readTo(void* buf, size_t count) { } // fill rx buffer to 'n' octets -void rpx::XvcConnection::fill(unsigned long n) { +void rpx::XvcConnection::fill(uint64_t n) { uint8_t* p = rp_ + rl_; int got; - unsigned long k = n; + uint64_t k = n; if (n <= rl_) return; @@ -87,15 +87,15 @@ void rpx::XvcConnection::fill(unsigned long n) { } // mark 'n' octets as 'consumed' -void rpx::XvcConnection::bump(unsigned long n) { +void rpx::XvcConnection::bump(uint64_t n) { rp_ += n; rl_ -= n; if (rl_ == 0) { rp_ = &rxb_[0]; } } void rpx::XvcConnection::allocBufs() { - unsigned long tgtVecLen; - unsigned long overhead = 128; // headers and such; + uint64_t tgtVecLen; + uint64_t overhead = 128; // headers and such; // Determine the vector size supported by the target tgtVecLen = drv_->query(); @@ -142,9 +142,9 @@ void rpx::XvcConnection::flush() { void rpx::XvcConnection::run() { int got; uint32_t bits, bitsLeft, bitsSent; - unsigned long bytes; - unsigned long vecLen; - unsigned long off; + uint64_t bytes; + uint64_t vecLen; + uint64_t off; allocBufs(); From 1a961419a1596b4fce0046583698b2f3a305358a Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Sat, 29 Jun 2024 08:25:12 -0700 Subject: [PATCH 27/41] increase linelength to 250 for Variables.cpp --- CPPLINT.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 0b65006ac..74bca2b52 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -3,7 +3,7 @@ ####################################################### # Increase the max number of characters on a given line -linelength=160 +linelength=250 # List of filters to apply filter=-legal/copyright From c0ab7dfafb84f60e9bef53b6d2cac87d9cf73834 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Sat, 29 Jun 2024 08:30:00 -0700 Subject: [PATCH 28/41] disable [runtime/arrays] filter --- CPPLINT.cfg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 74bca2b52..4ecb984aa 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -20,3 +20,9 @@ filter=-build/include_order # Note changing header guard has wrong style # E.g. from __ROGUE_UTILITIES_FILEIO_MODULE_H__ to INCLUDE_ROGUE_UTILITIES_MODULE_H_ filter=-build/header_guard + +# Disable runtime/arrays +# Impacts Blocks.cpp and Variable.cpp only +# Something we should consider fixing in the future +filter=-runtime/arrays + From 41a72ba036f727619950b7274d862c8a2c1b2009 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Sat, 29 Jun 2024 08:37:37 -0700 Subject: [PATCH 29/41] resolving c++ linter Extra space for operator ++; [whitespace/operators] --- src/rogue/interfaces/memory/Emulate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rogue/interfaces/memory/Emulate.cpp b/src/rogue/interfaces/memory/Emulate.cpp index 903f9b315..bcb1b88bd 100644 --- a/src/rogue/interfaces/memory/Emulate.cpp +++ b/src/rogue/interfaces/memory/Emulate.cpp @@ -89,7 +89,7 @@ void rim::Emulate::doTransaction(rim::TransactionPtr tran) { if (memMap_.find(addr4k) == memMap_.end()) { memMap_.insert(std::make_pair(addr4k, reinterpret_cast(malloc(0x1000)))); totSize_ += 0x1000; - totAlloc_ ++; + totAlloc_++; log_->debug("Allocating block at 0x%x. Total Blocks %i, Total Size = %i", addr4k, totAlloc_, totSize_); } From cfe949b3f908c73da900d44596d1444d06c0293c Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Sat, 29 Jun 2024 08:37:55 -0700 Subject: [PATCH 30/41] adding [runtime/references] filter --- CPPLINT.cfg | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CPPLINT.cfg b/CPPLINT.cfg index 4ecb984aa..c4d3e4dc7 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -22,7 +22,9 @@ filter=-build/include_order filter=-build/header_guard # Disable runtime/arrays -# Impacts Blocks.cpp and Variable.cpp only -# Something we should consider fixing in the future +# TODO: We should fix in the future filter=-runtime/arrays +# Disable runtime/references +# TODO: We should fix in the future +filter=-runtime/references From 2eb68276612d9bbfeb797d4d409ecd5bffe5414a Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Sat, 29 Jun 2024 08:40:40 -0700 Subject: [PATCH 31/41] resolving c++ linter 'sys/syscall.h' already included at ./src/rogue/Logging.cpp:27 [build/include] --- src/rogue/Logging.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/rogue/Logging.cpp b/src/rogue/Logging.cpp index 5d5f55ad2..483a7840a 100644 --- a/src/rogue/Logging.cpp +++ b/src/rogue/Logging.cpp @@ -24,7 +24,6 @@ #include #include #include -#include #include #include From ce84209f6fa69294c95f70a1856db5af057f5923 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Sat, 29 Jun 2024 08:43:12 -0700 Subject: [PATCH 32/41] resolving c++ linter Storage-class specifier (static, extern, typedef, etc) should be at the beginning of the declaration. [build/storage_class] --- include/rogue/utilities/Prbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rogue/utilities/Prbs.h b/include/rogue/utilities/Prbs.h index 2dc7f1744..65006a7b0 100644 --- a/include/rogue/utilities/Prbs.h +++ b/include/rogue/utilities/Prbs.h @@ -36,7 +36,7 @@ namespace utilities { */ class Prbs : public rogue::interfaces::stream::Slave, public rogue::interfaces::stream::Master { //! Max size - const static uint32_t MaxBytes = 64; + static const uint32_t MaxBytes = 64; //! PRBS taps uint8_t* taps_; From 9d43d45879948052a3f7c8019c9956ae421c29f9 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Sat, 29 Jun 2024 09:02:45 -0700 Subject: [PATCH 33/41] resolving c++ linter Single-parameter constructors should be marked explicit. [runtime/explicit] --- include/rogue/Logging.h | 2 +- include/rogue/hardware/axi/AxiMemMap.h | 2 +- include/rogue/hardware/axi/AxiStreamDma.h | 2 +- include/rogue/interfaces/api/Bsp.h | 2 +- include/rogue/interfaces/memory/Transaction.h | 2 +- include/rogue/interfaces/memory/TransactionLock.h | 2 +- include/rogue/interfaces/stream/FrameLock.h | 2 +- include/rogue/protocols/packetizer/Application.h | 2 +- include/rogue/protocols/packetizer/CRC.h | 4 ++-- include/rogue/protocols/packetizer/Core.h | 2 +- include/rogue/protocols/rssi/Client.h | 2 +- include/rogue/protocols/rssi/Header.h | 2 +- include/rogue/protocols/rssi/Server.h | 2 +- include/rogue/protocols/udp/Core.h | 2 +- include/rogue/protocols/xilinx/JtagDriver.h | 2 +- include/rogue/protocols/xilinx/Xvc.h | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/rogue/Logging.h b/include/rogue/Logging.h index 86b37435b..e31cac408 100644 --- a/include/rogue/Logging.h +++ b/include/rogue/Logging.h @@ -73,7 +73,7 @@ class Logging { static std::shared_ptr create(std::string name, bool quiet = false); - Logging(std::string name, bool quiet = false); + explicit Logging(std::string name, bool quiet = false); ~Logging(); static void setLevel(uint32_t level); diff --git a/include/rogue/hardware/axi/AxiMemMap.h b/include/rogue/hardware/axi/AxiMemMap.h index 21def17d3..b9cfcfcf1 100644 --- a/include/rogue/hardware/axi/AxiMemMap.h +++ b/include/rogue/hardware/axi/AxiMemMap.h @@ -70,7 +70,7 @@ class AxiMemMap : public rogue::interfaces::memory::Slave { static void setup_python(); // Class Creator - AxiMemMap(std::string path); + explicit AxiMemMap(std::string path); // Destructor ~AxiMemMap(); diff --git a/include/rogue/hardware/axi/AxiStreamDma.h b/include/rogue/hardware/axi/AxiStreamDma.h index c3686a4ed..be40a52f7 100644 --- a/include/rogue/hardware/axi/AxiStreamDma.h +++ b/include/rogue/hardware/axi/AxiStreamDma.h @@ -33,7 +33,7 @@ namespace axi { //! Storage class for shared memory buffers class AxiStreamDmaShared { public: - AxiStreamDmaShared(std::string path); + explicit AxiStreamDmaShared(std::string path); //! Shared FD int32_t fd; diff --git a/include/rogue/interfaces/api/Bsp.h b/include/rogue/interfaces/api/Bsp.h index 8d315b4c5..ceb655553 100644 --- a/include/rogue/interfaces/api/Bsp.h +++ b/include/rogue/interfaces/api/Bsp.h @@ -40,7 +40,7 @@ class Bsp { static std::shared_ptr create(std::string modName, std::string rootClass); //! Create the object - Bsp(boost::python::object obj); + explicit Bsp(boost::python::object obj); Bsp(std::string modName, std::string rootClass); ~Bsp(); diff --git a/include/rogue/interfaces/memory/Transaction.h b/include/rogue/interfaces/memory/Transaction.h index 0625ab9e5..85f4e1937 100644 --- a/include/rogue/interfaces/memory/Transaction.h +++ b/include/rogue/interfaces/memory/Transaction.h @@ -147,7 +147,7 @@ class Transaction : public rogue::EnableSharedFromThis transaction); // Transaction lock constructor - TransactionLock(std::shared_ptr transaction); + explicit TransactionLock(std::shared_ptr transaction); // Setup class for use in python static void setup_python(); diff --git a/include/rogue/interfaces/stream/FrameLock.h b/include/rogue/interfaces/stream/FrameLock.h index 72920e75d..418080326 100644 --- a/include/rogue/interfaces/stream/FrameLock.h +++ b/include/rogue/interfaces/stream/FrameLock.h @@ -54,7 +54,7 @@ class FrameLock { std::shared_ptr frame); // Frame lock constructor - FrameLock(std::shared_ptr frame); + explicit FrameLock(std::shared_ptr frame); // Setup class for use in python static void setup_python(); diff --git a/include/rogue/protocols/packetizer/Application.h b/include/rogue/protocols/packetizer/Application.h index fb7b4bb35..7527ddc28 100644 --- a/include/rogue/protocols/packetizer/Application.h +++ b/include/rogue/protocols/packetizer/Application.h @@ -58,7 +58,7 @@ class Application : public rogue::interfaces::stream::Master, public rogue::inte static void setup_python(); //! Creator - Application(uint8_t id); + explicit Application(uint8_t id); //! Destructor ~Application(); diff --git a/include/rogue/protocols/packetizer/CRC.h b/include/rogue/protocols/packetizer/CRC.h index 454486a78..be930b550 100644 --- a/include/rogue/protocols/packetizer/CRC.h +++ b/include/rogue/protocols/packetizer/CRC.h @@ -165,10 +165,10 @@ class CRC { template struct Table { // Constructors are intentionally NOT marked explicit. - Table(const Parameters& parameters); + Table(const Parameters& parameters); //NOLINT #ifdef CRCPP_USE_CPP11 - Table(Parameters&& parameters); + Table(Parameters&& parameters); //NOLINT #endif const Parameters& GetParameters() const; diff --git a/include/rogue/protocols/packetizer/Core.h b/include/rogue/protocols/packetizer/Core.h index 3188a4856..f43fd09a8 100644 --- a/include/rogue/protocols/packetizer/Core.h +++ b/include/rogue/protocols/packetizer/Core.h @@ -50,7 +50,7 @@ class Core { static void setup_python(); //! Creator - Core(bool enSsi); + explicit Core(bool enSsi); //! Destructor ~Core(); diff --git a/include/rogue/protocols/rssi/Client.h b/include/rogue/protocols/rssi/Client.h index 5909b7078..c998d5d9b 100644 --- a/include/rogue/protocols/rssi/Client.h +++ b/include/rogue/protocols/rssi/Client.h @@ -50,7 +50,7 @@ class Client { static void setup_python(); //! Creator - Client(uint32_t segSize); + explicit Client(uint32_t segSize); //! Destructor ~Client(); diff --git a/include/rogue/protocols/rssi/Header.h b/include/rogue/protocols/rssi/Header.h index ba3ac6850..607e1d242 100644 --- a/include/rogue/protocols/rssi/Header.h +++ b/include/rogue/protocols/rssi/Header.h @@ -67,7 +67,7 @@ class Header { std::shared_ptr frame); //! Creator - Header(std::shared_ptr frame); + explicit Header(std::shared_ptr frame); //! Destructor ~Header(); diff --git a/include/rogue/protocols/rssi/Server.h b/include/rogue/protocols/rssi/Server.h index 3cfe3cd09..265d8821f 100644 --- a/include/rogue/protocols/rssi/Server.h +++ b/include/rogue/protocols/rssi/Server.h @@ -50,7 +50,7 @@ class Server { static void setup_python(); //! Creator - Server(uint32_t segSize); + explicit Server(uint32_t segSize); //! Destructor ~Server(); diff --git a/include/rogue/protocols/udp/Core.h b/include/rogue/protocols/udp/Core.h index 19bd47d77..d361c3f1c 100644 --- a/include/rogue/protocols/udp/Core.h +++ b/include/rogue/protocols/udp/Core.h @@ -69,7 +69,7 @@ class Core { static void setup_python(); //! Creator - Core(bool jumbo); + explicit Core(bool jumbo); //! Destructor ~Core(); diff --git a/include/rogue/protocols/xilinx/JtagDriver.h b/include/rogue/protocols/xilinx/JtagDriver.h index ab4a2a776..9806ff471 100644 --- a/include/rogue/protocols/xilinx/JtagDriver.h +++ b/include/rogue/protocols/xilinx/JtagDriver.h @@ -168,7 +168,7 @@ class JtagDriver { //! Setup class in python static void setup_python(); - JtagDriver(uint16_t port); + explicit JtagDriver(uint16_t port); // initialization after full construction virtual void init(); diff --git a/include/rogue/protocols/xilinx/Xvc.h b/include/rogue/protocols/xilinx/Xvc.h index 4882032f0..14d4096b2 100644 --- a/include/rogue/protocols/xilinx/Xvc.h +++ b/include/rogue/protocols/xilinx/Xvc.h @@ -71,7 +71,7 @@ class Xvc : public rogue::interfaces::stream::Master, static void setup_python(); //! Creator - Xvc(uint16_t port); + explicit Xvc(uint16_t port); //! Destructor ~Xvc(); From 34236a7e851144e88837ae521edf184285e0f69a Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Sat, 29 Jun 2024 09:05:49 -0700 Subject: [PATCH 34/41] resolving c++ linter 'virtual' is redundant since function is already declared as 'final' [readability/inheritance] --- include/rogue/protocols/xilinx/Xvc.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/rogue/protocols/xilinx/Xvc.h b/include/rogue/protocols/xilinx/Xvc.h index 14d4096b2..c81a010ba 100644 --- a/include/rogue/protocols/xilinx/Xvc.h +++ b/include/rogue/protocols/xilinx/Xvc.h @@ -85,14 +85,14 @@ class Xvc : public rogue::interfaces::stream::Master, // Receive frame void acceptFrame(std::shared_ptr frame); - virtual uint64_t getMaxVectorSize() final; - - virtual int xfer(uint8_t* txBuffer, - unsigned txBytes, - uint8_t* hdBuffer, - unsigned hdBytes, - uint8_t* rxBuffer, - unsigned rxBytes) final; + uint64_t getMaxVectorSize() final; + + int xfer(uint8_t* txBuffer, + unsigned txBytes, + uint8_t* hdBuffer, + unsigned hdBytes, + uint8_t* rxBuffer, + unsigned rxBytes) final; }; // Convenience From a8322ae7e797c4cb0186218bd81670cccd43cfb2 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Sat, 29 Jun 2024 09:08:25 -0700 Subject: [PATCH 35/41] resolving c++ linter Namespace should be terminated with '// namespace CRCPP' [readability/namespace] --- include/rogue/protocols/packetizer/CRC.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rogue/protocols/packetizer/CRC.h b/include/rogue/protocols/packetizer/CRC.h index be930b550..d28cfdfb7 100644 --- a/include/rogue/protocols/packetizer/CRC.h +++ b/include/rogue/protocols/packetizer/CRC.h @@ -1658,7 +1658,7 @@ inline const CRC::Parameters& CRC::CRC_64() { #endif // CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS #ifdef CRCPP_USE_NAMESPACE -} +} //NOLINT #endif #endif // CRCPP_CRC_H_ From d0cbc4bcad59475260833870eed96112cd8554da Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Sun, 7 Jul 2024 17:15:25 -0700 Subject: [PATCH 36/41] polishing the code headers to be the same formating across all cpp/h/py files --- include/rogue/Directives.h | 5 +-- include/rogue/EnableSharedFromThis.h | 5 +-- include/rogue/GeneralError.h | 5 +-- include/rogue/GilRelease.h | 5 +-- include/rogue/Helpers.h | 5 +-- include/rogue/Logging.h | 5 +-- include/rogue/Queue.h | 5 +-- include/rogue/ScopedGil.h | 5 +-- include/rogue/Version.h | 5 +-- include/rogue/hardware/MemMap.h | 10 +++--- include/rogue/hardware/axi/AxiMemMap.h | 10 +++--- include/rogue/hardware/axi/AxiStreamDma.h | 9 ++++-- include/rogue/hardware/axi/module.h | 5 +-- include/rogue/hardware/module.h | 4 +-- include/rogue/interfaces/ZmqClient.h | 10 +++--- include/rogue/interfaces/ZmqServer.h | 10 +++--- include/rogue/interfaces/api/Bsp.h | 10 +++--- include/rogue/interfaces/memory/Block.h | 4 +-- include/rogue/interfaces/memory/Constants.h | 5 +-- include/rogue/interfaces/memory/Emulate.h | 4 +-- include/rogue/interfaces/memory/Hub.h | 6 +--- include/rogue/interfaces/memory/Master.h | 6 +--- include/rogue/interfaces/memory/Slave.h | 5 +-- include/rogue/interfaces/memory/TcpClient.h | 5 +-- include/rogue/interfaces/memory/TcpServer.h | 5 +-- include/rogue/interfaces/memory/Transaction.h | 5 +-- .../rogue/interfaces/memory/TransactionLock.h | 5 +-- include/rogue/interfaces/memory/Variable.h | 4 +-- include/rogue/interfaces/memory/module.h | 4 +-- include/rogue/interfaces/module.h | 4 +-- include/rogue/interfaces/stream/Buffer.h | 6 +--- include/rogue/interfaces/stream/Fifo.h | 8 ++--- include/rogue/interfaces/stream/Filter.h | 8 ++--- include/rogue/interfaces/stream/Frame.h | 7 +---- .../rogue/interfaces/stream/FrameAccessor.h | 5 +-- .../rogue/interfaces/stream/FrameIterator.h | 5 +-- include/rogue/interfaces/stream/FrameLock.h | 5 +-- include/rogue/interfaces/stream/Master.h | 6 +--- include/rogue/interfaces/stream/Pool.h | 5 +-- include/rogue/interfaces/stream/RateDrop.h | 8 ++--- include/rogue/interfaces/stream/Slave.h | 6 +--- include/rogue/interfaces/stream/TcpClient.h | 5 +-- include/rogue/interfaces/stream/TcpCore.h | 5 +-- include/rogue/interfaces/stream/TcpServer.h | 5 +-- include/rogue/interfaces/stream/module.h | 4 +-- include/rogue/module.h | 4 +-- include/rogue/protocols/batcher/CoreV1.h | 10 ++---- include/rogue/protocols/batcher/Data.h | 8 ++--- include/rogue/protocols/batcher/InverterV1.h | 10 ++---- include/rogue/protocols/batcher/SplitterV1.h | 10 ++---- include/rogue/protocols/batcher/module.h | 4 +-- include/rogue/protocols/module.h | 4 +-- .../rogue/protocols/packetizer/Application.h | 4 +-- .../rogue/protocols/packetizer/Controller.h | 4 +-- .../rogue/protocols/packetizer/ControllerV1.h | 5 +-- .../rogue/protocols/packetizer/ControllerV2.h | 5 +-- include/rogue/protocols/packetizer/Core.h | 4 +-- include/rogue/protocols/packetizer/CoreV2.h | 5 +-- .../rogue/protocols/packetizer/Transport.h | 4 +-- include/rogue/protocols/packetizer/module.h | 4 +-- include/rogue/protocols/rssi/Application.h | 4 +-- include/rogue/protocols/rssi/Client.h | 8 ++--- include/rogue/protocols/rssi/Controller.h | 9 ++---- include/rogue/protocols/rssi/Header.h | 4 +-- include/rogue/protocols/rssi/Server.h | 10 +++--- include/rogue/protocols/rssi/Transport.h | 4 +-- include/rogue/protocols/rssi/module.h | 4 +-- include/rogue/protocols/srp/Cmd.h | 8 ++--- include/rogue/protocols/srp/SrpV0.h | 8 ++--- include/rogue/protocols/srp/SrpV3.h | 8 ++--- include/rogue/protocols/srp/module.h | 4 +-- include/rogue/protocols/udp/Client.h | 4 +-- include/rogue/protocols/udp/Core.h | 4 +-- include/rogue/protocols/udp/Server.h | 4 +-- include/rogue/protocols/udp/module.h | 4 +-- include/rogue/protocols/xilinx/JtagDriver.h | 31 ++++++++++--------- include/rogue/protocols/xilinx/Xvc.h | 4 +-- .../rogue/protocols/xilinx/XvcConnection.h | 31 ++++++++++--------- include/rogue/protocols/xilinx/XvcServer.h | 31 ++++++++++--------- include/rogue/protocols/xilinx/module.h | 4 +-- include/rogue/utilities/Prbs.h | 6 ++-- include/rogue/utilities/StreamUnZip.h | 6 ++-- include/rogue/utilities/StreamZip.h | 6 ++-- .../utilities/fileio/LegacyStreamReader.h | 6 ++-- .../utilities/fileio/LegacyStreamWriter.h | 6 ++-- include/rogue/utilities/fileio/StreamReader.h | 6 ++-- include/rogue/utilities/fileio/StreamWriter.h | 6 ++-- .../utilities/fileio/StreamWriterChannel.h | 6 ++-- include/rogue/utilities/fileio/module.h | 4 +-- include/rogue/utilities/module.h | 4 +-- python/pyrogue/_Block.py | 5 +-- python/pyrogue/_Command.py | 5 ++- python/pyrogue/_DataReceiver.py | 5 ++- python/pyrogue/_DataWriter.py | 5 ++- python/pyrogue/_Device.py | 5 ++- python/pyrogue/_HelperFunctions.py | 5 +++ python/pyrogue/_Model.py | 5 ++- python/pyrogue/_Node.py | 5 ++- python/pyrogue/_PollQueue.py | 5 ++- python/pyrogue/_Process.py | 5 ++- python/pyrogue/_Root.py | 5 ++- python/pyrogue/_RunControl.py | 5 ++- python/pyrogue/_Variable.py | 5 ++- python/pyrogue/__init__.py | 2 ++ python/pyrogue/__main__.py | 2 ++ python/pyrogue/examples/_AxiVersion.py | 4 +-- python/pyrogue/examples/_ExampleRoot.py | 9 ++++-- python/pyrogue/examples/_LargeDevice.py | 9 ++++-- python/pyrogue/examples/__init__.py | 2 ++ python/pyrogue/examples/__main__.py | 9 ++++-- python/pyrogue/hardware/axi/__init__.py | 2 ++ python/pyrogue/interfaces/_SimpleClient.py | 3 +- python/pyrogue/interfaces/_SqlLogging.py | 5 ++- python/pyrogue/interfaces/_Virtual.py | 5 ++- python/pyrogue/interfaces/_ZmqServer.py | 5 ++- python/pyrogue/interfaces/__init__.py | 2 ++ python/pyrogue/interfaces/simulation.py | 2 +- python/pyrogue/interfaces/stream/_Fifo.py | 2 +- python/pyrogue/interfaces/stream/_Variable.py | 2 +- python/pyrogue/interfaces/stream/__init__.py | 2 ++ python/pyrogue/protocols/_Network.py | 4 +-- python/pyrogue/protocols/__init__.py | 2 ++ python/pyrogue/protocols/_uart.py | 4 +-- python/pyrogue/protocols/epicsV4.py | 6 ++-- python/pyrogue/protocols/gpib.py | 2 +- python/pyrogue/pydm/TimePlotTop.py | 6 ++-- python/pyrogue/pydm/__init__.py | 5 ++- python/pyrogue/pydm/data_plugins/__init__.py | 2 +- .../pyrogue/pydm/data_plugins/rogue_plugin.py | 5 ++- python/pyrogue/pydm/pydmTop.py | 6 ++-- python/pyrogue/pydm/rogue_plugin.py | 5 ++- python/pyrogue/pydm/tools/__init__.py | 2 +- .../pyrogue/pydm/tools/generic_file_tool.py | 5 ++- python/pyrogue/pydm/tools/node_info_tool.py | 5 ++- python/pyrogue/pydm/tools/read_node_tool.py | 5 ++- .../pyrogue/pydm/tools/read_recursive_tool.py | 5 ++- python/pyrogue/pydm/tools/write_node_tool.py | 5 ++- .../pydm/tools/write_recursive_tool.py | 6 ++-- python/pyrogue/pydm/widgets/__init__.py | 4 ++- python/pyrogue/pydm/widgets/data_writer.py | 5 ++- python/pyrogue/pydm/widgets/debug_tree.py | 5 ++- python/pyrogue/pydm/widgets/designer.py | 5 ++- python/pyrogue/pydm/widgets/label.py | 14 +++++++++ python/pyrogue/pydm/widgets/line_edit.py | 14 +++++++++ python/pyrogue/pydm/widgets/plot.py | 5 ++- python/pyrogue/pydm/widgets/process.py | 5 ++- python/pyrogue/pydm/widgets/root_control.py | 5 ++- python/pyrogue/pydm/widgets/run_control.py | 5 ++- python/pyrogue/pydm/widgets/system_log.py | 5 ++- python/pyrogue/pydm/widgets/system_window.py | 5 ++- python/pyrogue/pydm/widgets/time_plotter.py | 6 ++-- python/pyrogue/utilities/__init__.py | 2 ++ python/pyrogue/utilities/cpsw.py | 2 +- .../pyrogue/utilities/fileio/_FileReader.py | 2 +- .../pyrogue/utilities/fileio/_StreamReader.py | 2 +- .../pyrogue/utilities/fileio/_StreamWriter.py | 2 +- python/pyrogue/utilities/fileio/__init__.py | 2 ++ .../pyrogue/utilities/hls/_RegInterfParser.py | 2 ++ python/pyrogue/utilities/hls/__init__.py | 2 ++ python/pyrogue/utilities/prbs.py | 2 +- scripts/updateDrivers.sh | 6 ++-- src/CMakeLists.txt | 3 -- src/package.cpp | 7 +---- src/rogue/CMakeLists.txt | 5 +-- src/rogue/GeneralError.cpp | 5 +-- src/rogue/GilRelease.cpp | 5 +-- src/rogue/Logging.cpp | 5 +-- src/rogue/ScopedGil.cpp | 5 +-- src/rogue/Version.cpp | 5 +-- src/rogue/hardware/CMakeLists.txt | 5 +-- src/rogue/hardware/MemMap.cpp | 10 +++--- src/rogue/hardware/axi/AxiMemMap.cpp | 10 +++--- src/rogue/hardware/axi/AxiStreamDma.cpp | 5 +-- src/rogue/hardware/axi/CMakeLists.txt | 5 +-- src/rogue/hardware/axi/module.cpp | 5 +-- src/rogue/hardware/module.cpp | 7 +---- src/rogue/interfaces/CMakeLists.txt | 5 +-- src/rogue/interfaces/ZmqClient.cpp | 10 +++--- src/rogue/interfaces/ZmqServer.cpp | 10 +++--- src/rogue/interfaces/api/Bsp.cpp | 10 +++--- src/rogue/interfaces/api/CMakeLists.txt | 5 +-- src/rogue/interfaces/memory/Block.cpp | 10 +++--- src/rogue/interfaces/memory/CMakeLists.txt | 5 +-- src/rogue/interfaces/memory/Emulate.cpp | 4 +-- src/rogue/interfaces/memory/Hub.cpp | 7 +---- src/rogue/interfaces/memory/Master.cpp | 5 +-- src/rogue/interfaces/memory/Slave.cpp | 5 +-- src/rogue/interfaces/memory/TcpClient.cpp | 5 +-- src/rogue/interfaces/memory/TcpServer.cpp | 5 +-- src/rogue/interfaces/memory/Transaction.cpp | 7 +---- .../interfaces/memory/TransactionLock.cpp | 5 +-- src/rogue/interfaces/memory/Variable.cpp | 4 +-- src/rogue/interfaces/memory/module.cpp | 5 +-- src/rogue/interfaces/module.cpp | 7 +---- src/rogue/interfaces/stream/Buffer.cpp | 8 +---- src/rogue/interfaces/stream/CMakeLists.txt | 5 +-- src/rogue/interfaces/stream/Fifo.cpp | 8 ++--- src/rogue/interfaces/stream/Filter.cpp | 8 ++--- src/rogue/interfaces/stream/Frame.cpp | 6 +--- src/rogue/interfaces/stream/FrameIterator.cpp | 5 +-- src/rogue/interfaces/stream/FrameLock.cpp | 5 +-- src/rogue/interfaces/stream/Master.cpp | 5 +-- src/rogue/interfaces/stream/Pool.cpp | 5 +-- src/rogue/interfaces/stream/RateDrop.cpp | 8 ++--- src/rogue/interfaces/stream/Slave.cpp | 5 +-- src/rogue/interfaces/stream/TcpClient.cpp | 5 +-- src/rogue/interfaces/stream/TcpCore.cpp | 5 +-- src/rogue/interfaces/stream/TcpServer.cpp | 5 +-- src/rogue/interfaces/stream/module.cpp | 7 +---- src/rogue/module.cpp | 7 +---- src/rogue/protocols/CMakeLists.txt | 5 +-- src/rogue/protocols/batcher/CMakeLists.txt | 5 +-- src/rogue/protocols/batcher/CoreV1.cpp | 8 ++--- src/rogue/protocols/batcher/Data.cpp | 17 +++++----- src/rogue/protocols/batcher/InverterV1.cpp | 17 +++++----- src/rogue/protocols/batcher/SplitterV1.cpp | 17 +++++----- src/rogue/protocols/batcher/module.cpp | 7 +---- src/rogue/protocols/module.cpp | 7 +---- .../protocols/packetizer/Application.cpp | 6 +--- src/rogue/protocols/packetizer/CMakeLists.txt | 5 +-- src/rogue/protocols/packetizer/Controller.cpp | 6 +--- .../protocols/packetizer/ControllerV1.cpp | 5 +-- .../protocols/packetizer/ControllerV2.cpp | 5 +-- src/rogue/protocols/packetizer/Core.cpp | 6 +--- src/rogue/protocols/packetizer/CoreV2.cpp | 5 +-- src/rogue/protocols/packetizer/Transport.cpp | 6 +--- src/rogue/protocols/packetizer/module.cpp | 7 +---- src/rogue/protocols/rssi/Application.cpp | 6 +--- src/rogue/protocols/rssi/CMakeLists.txt | 5 +-- src/rogue/protocols/rssi/Client.cpp | 8 ++--- src/rogue/protocols/rssi/Controller.cpp | 7 +---- src/rogue/protocols/rssi/Header.cpp | 6 +--- src/rogue/protocols/rssi/Server.cpp | 10 +++--- src/rogue/protocols/rssi/Transport.cpp | 6 +--- src/rogue/protocols/rssi/module.cpp | 7 +---- src/rogue/protocols/srp/CMakeLists.txt | 5 +-- src/rogue/protocols/srp/Cmd.cpp | 9 ++---- src/rogue/protocols/srp/SrpV0.cpp | 9 ++---- src/rogue/protocols/srp/SrpV3.cpp | 9 ++---- src/rogue/protocols/srp/module.cpp | 7 +---- src/rogue/protocols/udp/CMakeLists.txt | 5 +-- src/rogue/protocols/udp/Client.cpp | 6 +--- src/rogue/protocols/udp/Core.cpp | 5 +-- src/rogue/protocols/udp/Server.cpp | 5 +-- src/rogue/protocols/udp/module.cpp | 7 +---- src/rogue/protocols/xilinx/CMakeLists.txt | 5 +-- src/rogue/protocols/xilinx/JtagDriver.cpp | 31 ++++++++++--------- src/rogue/protocols/xilinx/Xvc.cpp | 6 +--- src/rogue/protocols/xilinx/XvcConnection.cpp | 31 ++++++++++--------- src/rogue/protocols/xilinx/XvcServer.cpp | 31 ++++++++++--------- src/rogue/protocols/xilinx/module.cpp | 7 +---- src/rogue/utilities/CMakeLists.txt | 5 +-- src/rogue/utilities/Prbs.cpp | 9 ++---- src/rogue/utilities/StreamUnZip.cpp | 6 ++-- src/rogue/utilities/StreamZip.cpp | 6 ++-- src/rogue/utilities/fileio/CMakeLists.txt | 5 +-- .../utilities/fileio/LegacyStreamReader.cpp | 6 ++-- .../utilities/fileio/LegacyStreamWriter.cpp | 9 ++---- src/rogue/utilities/fileio/StreamReader.cpp | 9 ++---- src/rogue/utilities/fileio/StreamWriter.cpp | 9 ++---- .../utilities/fileio/StreamWriterChannel.cpp | 9 ++---- src/rogue/utilities/fileio/module.cpp | 9 ++---- src/rogue/utilities/module.cpp | 7 +---- 263 files changed, 683 insertions(+), 982 deletions(-) diff --git a/include/rogue/Directives.h b/include/rogue/Directives.h index f0c7218f8..3f4f5cf65 100644 --- a/include/rogue/Directives.h +++ b/include/rogue/Directives.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Common Directives * ---------------------------------------------------------------------------- - * File : Directives.h - * Created : 2023-02-13 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Common Directives For Rogue diff --git a/include/rogue/EnableSharedFromThis.h b/include/rogue/EnableSharedFromThis.h index 6266d239f..68ebcb244 100644 --- a/include/rogue/EnableSharedFromThis.h +++ b/include/rogue/EnableSharedFromThis.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Common virtual class to enable shared_from_this() calls. * ---------------------------------------------------------------------------- - * File : EnableSharedFromThis.h - * Created : 2019-11-15 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * This is a common parent class that must be used instead of std::enable_shared_from_this diff --git a/include/rogue/GeneralError.h b/include/rogue/GeneralError.h index 4b61c2705..8e509729f 100644 --- a/include/rogue/GeneralError.h +++ b/include/rogue/GeneralError.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : General Error * ---------------------------------------------------------------------------- - * File : GeneralError.h - * Created : 2017-12-05 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * General exception for Rogue diff --git a/include/rogue/GilRelease.h b/include/rogue/GilRelease.h index 9d637c0e9..a8b3d5432 100644 --- a/include/rogue/GilRelease.h +++ b/include/rogue/GilRelease.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Release GIL within scope. * ---------------------------------------------------------------------------- - * File : GilRelease.h - * Created : 2017-02-28 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Release GIL for the scope of this class. diff --git a/include/rogue/Helpers.h b/include/rogue/Helpers.h index 5cfcc476a..eb66c093b 100644 --- a/include/rogue/Helpers.h +++ b/include/rogue/Helpers.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Helpful Functions * ---------------------------------------------------------------------------- - * File : Helpers.h - * Created : 2018-11-28 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Helper functions for Rogue diff --git a/include/rogue/Logging.h b/include/rogue/Logging.h index e31cac408..5acf77757 100644 --- a/include/rogue/Logging.h +++ b/include/rogue/Logging.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Logging interface * ---------------------------------------------------------------------------- - * File : Logging.h - * Created : 2017-02-28 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Logging interface for pyrogue diff --git a/include/rogue/Queue.h b/include/rogue/Queue.h index 287338adb..109b00fd1 100644 --- a/include/rogue/Queue.h +++ b/include/rogue/Queue.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : General Queue * ---------------------------------------------------------------------------- - * File : Queue.h - * Created : 2017-01-18 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * General queue for Rogue diff --git a/include/rogue/ScopedGil.h b/include/rogue/ScopedGil.h index 2f43c433d..c1488aca3 100644 --- a/include/rogue/ScopedGil.h +++ b/include/rogue/ScopedGil.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Scoped GIL * ---------------------------------------------------------------------------- - * File : ScopedGil.h - * Created : 2017-02-28 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Acquire the GIL for the scope of this class. diff --git a/include/rogue/Version.h b/include/rogue/Version.h index 18e4ce87b..54bb29c9f 100644 --- a/include/rogue/Version.h +++ b/include/rogue/Version.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Rogue Version * ---------------------------------------------------------------------------- - * File : Version.h - * Created : 2017-05-17 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Version helpers for Rogue diff --git a/include/rogue/hardware/MemMap.h b/include/rogue/hardware/MemMap.h index bb7877aa1..bcb314654 100644 --- a/include/rogue/hardware/MemMap.h +++ b/include/rogue/hardware/MemMap.h @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : Raw Memory Mapped Access * ---------------------------------------------------------------------------- - * File : MemMap.h - * Created : 2019-11-18 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * Raw Memory Mapped Access * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #ifndef __ROGUE_HARDWARE_MEM_MAP_H__ #define __ROGUE_HARDWARE_MEM_MAP_H__ #include "rogue/Directives.h" diff --git a/include/rogue/hardware/axi/AxiMemMap.h b/include/rogue/hardware/axi/AxiMemMap.h index b9cfcfcf1..3bb93d837 100644 --- a/include/rogue/hardware/axi/AxiMemMap.h +++ b/include/rogue/hardware/axi/AxiMemMap.h @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : AXI Memory Mapped Access * ---------------------------------------------------------------------------- - * File : AxiMemMap.h - * Created : 2017-03-21 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * AXI Memory Mapped Access * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #ifndef __ROGUE_HARDWARE_AXI_MEM_MAP_H__ #define __ROGUE_HARDWARE_AXI_MEM_MAP_H__ #include "rogue/Directives.h" diff --git a/include/rogue/hardware/axi/AxiStreamDma.h b/include/rogue/hardware/axi/AxiStreamDma.h index be40a52f7..f1714438a 100644 --- a/include/rogue/hardware/axi/AxiStreamDma.h +++ b/include/rogue/hardware/axi/AxiStreamDma.h @@ -1,6 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : AxiStreamDma Interface Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * AxiStreamDma Interface Class * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -10,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #ifndef __ROGUE_HARDWARE_AXI_AXI_STREAM_DMA_H__ #define __ROGUE_HARDWARE_AXI_AXI_STREAM_DMA_H__ #include "rogue/Directives.h" diff --git a/include/rogue/hardware/axi/module.h b/include/rogue/hardware/axi/module.h index d4be7c5b2..893a83370 100644 --- a/include/rogue/hardware/axi/module.h +++ b/include/rogue/hardware/axi/module.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.h - * Created : 2017-03-21 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/hardware/module.h b/include/rogue/hardware/module.h index 7e8ece178..7995233f1 100644 --- a/include/rogue/hardware/module.h +++ b/include/rogue/hardware/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/interfaces/ZmqClient.h b/include/rogue/interfaces/ZmqClient.h index 32d6a49c3..e64c5a185 100644 --- a/include/rogue/interfaces/ZmqClient.h +++ b/include/rogue/interfaces/ZmqClient.h @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : Rogue ZMQ Control Interface * ---------------------------------------------------------------------------- - * File : ZmqClient.h - * Created : 2019-05-02 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * Rogue ZMQ Control Interface * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #ifndef __ROGUE_ZMQ_CLIENT_H__ #define __ROGUE_ZMQ_CLIENT_H__ #include "rogue/Directives.h" diff --git a/include/rogue/interfaces/ZmqServer.h b/include/rogue/interfaces/ZmqServer.h index e4e5f4925..05a9517d6 100644 --- a/include/rogue/interfaces/ZmqServer.h +++ b/include/rogue/interfaces/ZmqServer.h @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : Rogue ZMQ Control Interface * ---------------------------------------------------------------------------- - * File : ZmqServer.h - * Created : 2019-05-02 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * Rogue ZMQ Control Interface * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #ifndef __ROGUE_ZMQ_SERVER_H__ #define __ROGUE_ZMQ_SERVER_H__ #include "rogue/Directives.h" diff --git a/include/rogue/interfaces/api/Bsp.h b/include/rogue/interfaces/api/Bsp.h index ceb655553..4fde63456 100644 --- a/include/rogue/interfaces/api/Bsp.h +++ b/include/rogue/interfaces/api/Bsp.h @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : C++ API Bsp * ---------------------------------------------------------------------------- - * File : Bsp.h - * Created : 2023-04-17 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * C++ API BSP (Board Support Package) * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #ifndef __ROGUE_INTERFACE_API_BSP_H__ #define __ROGUE_INTERFACE_API_BSP_H__ diff --git a/include/rogue/interfaces/memory/Block.h b/include/rogue/interfaces/memory/Block.h index 83e941f94..9350397f2 100644 --- a/include/rogue/interfaces/memory/Block.h +++ b/include/rogue/interfaces/memory/Block.h @@ -1,8 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Block * ---------------------------------------------------------------------------- - * File : Block.h + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Interface between RemoteVariables and lower level memory transactions. diff --git a/include/rogue/interfaces/memory/Constants.h b/include/rogue/interfaces/memory/Constants.h index 3017cf786..d54013c3e 100644 --- a/include/rogue/interfaces/memory/Constants.h +++ b/include/rogue/interfaces/memory/Constants.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Master * ---------------------------------------------------------------------------- - * File : Constants.h - * Created : 2016-12-05 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory error and transaction constants. diff --git a/include/rogue/interfaces/memory/Emulate.h b/include/rogue/interfaces/memory/Emulate.h index a6009a820..7a3381f99 100644 --- a/include/rogue/interfaces/memory/Emulate.h +++ b/include/rogue/interfaces/memory/Emulate.h @@ -1,8 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory slave emulator * ---------------------------------------------------------------------------- - * File : Emulator.h + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * A memory space emulator. Allows user to test a Rogue tree without real hardware. diff --git a/include/rogue/interfaces/memory/Hub.h b/include/rogue/interfaces/memory/Hub.h index 7d7ee2bc4..8111f75f5 100644 --- a/include/rogue/interfaces/memory/Hub.h +++ b/include/rogue/interfaces/memory/Hub.h @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Hub Hub * ---------------------------------------------------------------------------- - * File : Hub.h - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-09-20 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * A memory interface hub. Accepts requests from multiple masters and forwards diff --git a/include/rogue/interfaces/memory/Master.h b/include/rogue/interfaces/memory/Master.h index 0b47b55c8..1e89022b6 100644 --- a/include/rogue/interfaces/memory/Master.h +++ b/include/rogue/interfaces/memory/Master.h @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Master * ---------------------------------------------------------------------------- - * File : Master.h - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-09-20 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory master interface. diff --git a/include/rogue/interfaces/memory/Slave.h b/include/rogue/interfaces/memory/Slave.h index d40301a3f..d6e567393 100644 --- a/include/rogue/interfaces/memory/Slave.h +++ b/include/rogue/interfaces/memory/Slave.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Slave * ---------------------------------------------------------------------------- - * File : Slave.h - * Created : 2016-09-20 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory slave interface. diff --git a/include/rogue/interfaces/memory/TcpClient.h b/include/rogue/interfaces/memory/TcpClient.h index 7eccbaaae..f13b232ba 100644 --- a/include/rogue/interfaces/memory/TcpClient.h +++ b/include/rogue/interfaces/memory/TcpClient.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Client Network Bridge * ---------------------------------------------------------------------------- - * File : TcpClient.h - * Created : 2019-01-30 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory Client Network Bridge diff --git a/include/rogue/interfaces/memory/TcpServer.h b/include/rogue/interfaces/memory/TcpServer.h index e758b389c..b3e6f5335 100644 --- a/include/rogue/interfaces/memory/TcpServer.h +++ b/include/rogue/interfaces/memory/TcpServer.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Server Network Bridge * ---------------------------------------------------------------------------- - * File : TcpServer.h - * Created : 2019-01-30 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory Server Network Bridge diff --git a/include/rogue/interfaces/memory/Transaction.h b/include/rogue/interfaces/memory/Transaction.h index 85f4e1937..6c99a263f 100644 --- a/include/rogue/interfaces/memory/Transaction.h +++ b/include/rogue/interfaces/memory/Transaction.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Transaction * ---------------------------------------------------------------------------- - * File : Transaction.h - * Created : 2019-03-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory Transaction diff --git a/include/rogue/interfaces/memory/TransactionLock.h b/include/rogue/interfaces/memory/TransactionLock.h index 94e91f9f9..5173ae8c9 100644 --- a/include/rogue/interfaces/memory/TransactionLock.h +++ b/include/rogue/interfaces/memory/TransactionLock.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Transaction Lock * ---------------------------------------------------------------------------- - * File : TransactionLock.h - * Created : 2018-03-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory Transaction lock diff --git a/include/rogue/interfaces/memory/Variable.h b/include/rogue/interfaces/memory/Variable.h index 4d5c5e78e..bef3eec76 100644 --- a/include/rogue/interfaces/memory/Variable.h +++ b/include/rogue/interfaces/memory/Variable.h @@ -1,8 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Variable * ---------------------------------------------------------------------------- - * File : Variable.h + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Base class for RemoteVariable as well as direct C++ access diff --git a/include/rogue/interfaces/memory/module.h b/include/rogue/interfaces/memory/module.h index a1bf9fb73..ac37a9ab5 100644 --- a/include/rogue/interfaces/memory/module.h +++ b/include/rogue/interfaces/memory/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module For Memory Interface + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/interfaces/module.h b/include/rogue/interfaces/module.h index 34b7ba318..6fecddb0c 100644 --- a/include/rogue/interfaces/module.h +++ b/include/rogue/interfaces/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/interfaces/stream/Buffer.h b/include/rogue/interfaces/stream/Buffer.h index 21346ab35..302339d2e 100644 --- a/include/rogue/interfaces/stream/Buffer.h +++ b/include/rogue/interfaces/stream/Buffer.h @@ -1,13 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream Buffer Container * ---------------------------------------------------------------------------- - * File : Buffer.h - * Author : Ryan Herbst, rherbst@slac.stanford.edu + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream frame container - * Some concepts borrowed from CPSW by Till Straumann * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/include/rogue/interfaces/stream/Fifo.h b/include/rogue/interfaces/stream/Fifo.h index d4d6499f5..9a8d96669 100644 --- a/include/rogue/interfaces/stream/Fifo.h +++ b/include/rogue/interfaces/stream/Fifo.h @@ -1,11 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : AXI Stream FIFO * ---------------------------------------------------------------------------- - * File : Fifo.h - * Author : Ryan Herbst - * Created : 02/02/2018 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * AXI Stream FIFO *----------------------------------------------------------------------------- diff --git a/include/rogue/interfaces/stream/Filter.h b/include/rogue/interfaces/stream/Filter.h index b8769491b..863af9629 100644 --- a/include/rogue/interfaces/stream/Filter.h +++ b/include/rogue/interfaces/stream/Filter.h @@ -1,11 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Stream Filter * ---------------------------------------------------------------------------- - * File : Filter.h - * Author : Ryan Herbst - * Created : 11/01/2018 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * AXI Stream Filter *----------------------------------------------------------------------------- diff --git a/include/rogue/interfaces/stream/Frame.h b/include/rogue/interfaces/stream/Frame.h index 6e72406f5..7f27e69b7 100644 --- a/include/rogue/interfaces/stream/Frame.h +++ b/include/rogue/interfaces/stream/Frame.h @@ -1,14 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream frame container * ---------------------------------------------------------------------------- - * File : Frame.h - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-09-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream frame container - * Some concepts borrowed from CPSW by Till Straumann * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/include/rogue/interfaces/stream/FrameAccessor.h b/include/rogue/interfaces/stream/FrameAccessor.h index 9fb0483fb..090f54577 100644 --- a/include/rogue/interfaces/stream/FrameAccessor.h +++ b/include/rogue/interfaces/stream/FrameAccessor.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream frame accessor * ---------------------------------------------------------------------------- - * File : FrameAccessor.h - * Created : 2018-03-06 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream frame iterator diff --git a/include/rogue/interfaces/stream/FrameIterator.h b/include/rogue/interfaces/stream/FrameIterator.h index 9bd004390..cd04a665e 100644 --- a/include/rogue/interfaces/stream/FrameIterator.h +++ b/include/rogue/interfaces/stream/FrameIterator.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream frame iterator * ---------------------------------------------------------------------------- - * File : FrameIterator.h - * Created : 2018-03-06 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream frame iterator diff --git a/include/rogue/interfaces/stream/FrameLock.h b/include/rogue/interfaces/stream/FrameLock.h index 418080326..00f07a83a 100644 --- a/include/rogue/interfaces/stream/FrameLock.h +++ b/include/rogue/interfaces/stream/FrameLock.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Frame Lock * ---------------------------------------------------------------------------- - * File : FrameLock.h - * Created : 2018-03-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory Frame lock diff --git a/include/rogue/interfaces/stream/Master.h b/include/rogue/interfaces/stream/Master.h index c59d4b885..0c6788533 100644 --- a/include/rogue/interfaces/stream/Master.h +++ b/include/rogue/interfaces/stream/Master.h @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream interface master * ---------------------------------------------------------------------------- - * File : Master.h - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-09-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream interface master diff --git a/include/rogue/interfaces/stream/Pool.h b/include/rogue/interfaces/stream/Pool.h index 8046f6f0e..54a2a0ffa 100644 --- a/include/rogue/interfaces/stream/Pool.h +++ b/include/rogue/interfaces/stream/Pool.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream memory pool * ---------------------------------------------------------------------------- - * File : Pool.h - * Created : 2016-09-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream memory pool diff --git a/include/rogue/interfaces/stream/RateDrop.h b/include/rogue/interfaces/stream/RateDrop.h index 524df7c4b..9d11a0b41 100644 --- a/include/rogue/interfaces/stream/RateDrop.h +++ b/include/rogue/interfaces/stream/RateDrop.h @@ -1,11 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Stream Interface Rate Drop * ---------------------------------------------------------------------------- - * File : RateDrop.h - * Author : Ryan Herbst - * Created : 08/25/2020 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Drops frames at a specified rate. *----------------------------------------------------------------------------- diff --git a/include/rogue/interfaces/stream/Slave.h b/include/rogue/interfaces/stream/Slave.h index f2568bea8..88d6d9e76 100644 --- a/include/rogue/interfaces/stream/Slave.h +++ b/include/rogue/interfaces/stream/Slave.h @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream interface slave * ---------------------------------------------------------------------------- - * File : Slave.h - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-09-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream interface slave diff --git a/include/rogue/interfaces/stream/TcpClient.h b/include/rogue/interfaces/stream/TcpClient.h index 56a011f0f..d7d635d11 100644 --- a/include/rogue/interfaces/stream/TcpClient.h +++ b/include/rogue/interfaces/stream/TcpClient.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream Network Client * ---------------------------------------------------------------------------- - * File : TcpClient.h - * Created : 2019-01-30 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream Network Client diff --git a/include/rogue/interfaces/stream/TcpCore.h b/include/rogue/interfaces/stream/TcpCore.h index edc7d064d..8dcc56340 100644 --- a/include/rogue/interfaces/stream/TcpCore.h +++ b/include/rogue/interfaces/stream/TcpCore.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream Network Core * ---------------------------------------------------------------------------- - * File : TcpCore.h - * Created : 2019-01-30 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream Network Core diff --git a/include/rogue/interfaces/stream/TcpServer.h b/include/rogue/interfaces/stream/TcpServer.h index d39ce552f..f1a8ce844 100644 --- a/include/rogue/interfaces/stream/TcpServer.h +++ b/include/rogue/interfaces/stream/TcpServer.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream Network Server * ---------------------------------------------------------------------------- - * File : TcpServer.h - * Created : 2019-01-30 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream Network Server diff --git a/include/rogue/interfaces/stream/module.h b/include/rogue/interfaces/stream/module.h index b49708bc4..cd07f3221 100644 --- a/include/rogue/interfaces/stream/module.h +++ b/include/rogue/interfaces/stream/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module For Stream Interface + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/module.h b/include/rogue/module.h index 8daddb871..ac45ffa45 100644 --- a/include/rogue/module.h +++ b/include/rogue/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/protocols/batcher/CoreV1.h b/include/rogue/protocols/batcher/CoreV1.h index e2f5fbae9..b4bb79711 100644 --- a/include/rogue/protocols/batcher/CoreV1.h +++ b/include/rogue/protocols/batcher/CoreV1.h @@ -1,13 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Batcher Version 1, Core * ---------------------------------------------------------------------------- - * File : Core.h - * Author : Ryan Herbst - * Created : 10/26/2018 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : - * AXI Batcher V1 + * SLAC AXI Batcher V1 *----------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/include/rogue/protocols/batcher/Data.h b/include/rogue/protocols/batcher/Data.h index 9ef837f34..79a461253 100644 --- a/include/rogue/protocols/batcher/Data.h +++ b/include/rogue/protocols/batcher/Data.h @@ -1,11 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Batcher Data Container * ---------------------------------------------------------------------------- - * File : Data.h - * Author : Ryan Herbst - * Created : 02/08/2019 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * AXI Batcher Data *----------------------------------------------------------------------------- diff --git a/include/rogue/protocols/batcher/InverterV1.h b/include/rogue/protocols/batcher/InverterV1.h index 2eef023c9..55a4984a2 100644 --- a/include/rogue/protocols/batcher/InverterV1.h +++ b/include/rogue/protocols/batcher/InverterV1.h @@ -1,13 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Inverter Version 1 * ---------------------------------------------------------------------------- - * File : InverterV1.h - * Author : Ryan Herbst - * Created : 10/26/2018 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : - * AXI Inverter V1 + * SLAC AXI Inverter V1 *----------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/include/rogue/protocols/batcher/SplitterV1.h b/include/rogue/protocols/batcher/SplitterV1.h index 9037e6dd0..6ea0a922a 100644 --- a/include/rogue/protocols/batcher/SplitterV1.h +++ b/include/rogue/protocols/batcher/SplitterV1.h @@ -1,13 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Splitter Version 1 * ---------------------------------------------------------------------------- - * File : SplitterV1.h - * Author : Ryan Herbst - * Created : 10/26/2018 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : - * AXI Splitter V1 + * SLAC AXI Splitter V1 *----------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/include/rogue/protocols/batcher/module.h b/include/rogue/protocols/batcher/module.h index a9a8a7aca..3e5bc4f77 100644 --- a/include/rogue/protocols/batcher/module.h +++ b/include/rogue/protocols/batcher/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/protocols/module.h b/include/rogue/protocols/module.h index 3604bf99f..62235fec9 100644 --- a/include/rogue/protocols/module.h +++ b/include/rogue/protocols/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/protocols/packetizer/Application.h b/include/rogue/protocols/packetizer/Application.h index 7527ddc28..5c11bae6b 100644 --- a/include/rogue/protocols/packetizer/Application.h +++ b/include/rogue/protocols/packetizer/Application.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Application Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Application Interface diff --git a/include/rogue/protocols/packetizer/Controller.h b/include/rogue/protocols/packetizer/Controller.h index 8447d5455..4a467741f 100644 --- a/include/rogue/protocols/packetizer/Controller.h +++ b/include/rogue/protocols/packetizer/Controller.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Controller Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Controller diff --git a/include/rogue/protocols/packetizer/ControllerV1.h b/include/rogue/protocols/packetizer/ControllerV1.h index aeff2dcd0..daf129bf1 100644 --- a/include/rogue/protocols/packetizer/ControllerV1.h +++ b/include/rogue/protocols/packetizer/ControllerV1.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Controller V1 Class * ---------------------------------------------------------------------------- - * File : ControllerV1.h - * Created : 2018-02-02 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Controller, Version 1 diff --git a/include/rogue/protocols/packetizer/ControllerV2.h b/include/rogue/protocols/packetizer/ControllerV2.h index 0a2f4e88d..a78231c5d 100644 --- a/include/rogue/protocols/packetizer/ControllerV2.h +++ b/include/rogue/protocols/packetizer/ControllerV2.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Controller V2 Class * ---------------------------------------------------------------------------- - * File : ControllerV2.h - * Created : 2018-02-02 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Controller, Version 2 diff --git a/include/rogue/protocols/packetizer/Core.h b/include/rogue/protocols/packetizer/Core.h index f43fd09a8..78e03e755 100644 --- a/include/rogue/protocols/packetizer/Core.h +++ b/include/rogue/protocols/packetizer/Core.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Core Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Core diff --git a/include/rogue/protocols/packetizer/CoreV2.h b/include/rogue/protocols/packetizer/CoreV2.h index 9520932e8..aa1218efd 100644 --- a/include/rogue/protocols/packetizer/CoreV2.h +++ b/include/rogue/protocols/packetizer/CoreV2.h @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Core Class * ---------------------------------------------------------------------------- - * File : CoreV2.h - * Created : 2018-02-02 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Core, Version 2 diff --git a/include/rogue/protocols/packetizer/Transport.h b/include/rogue/protocols/packetizer/Transport.h index c2e4a08b6..8f243e3c3 100644 --- a/include/rogue/protocols/packetizer/Transport.h +++ b/include/rogue/protocols/packetizer/Transport.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Transport Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Transport diff --git a/include/rogue/protocols/packetizer/module.h b/include/rogue/protocols/packetizer/module.h index a50ea6067..6dcc0485e 100644 --- a/include/rogue/protocols/packetizer/module.h +++ b/include/rogue/protocols/packetizer/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/protocols/rssi/Application.h b/include/rogue/protocols/rssi/Application.h index 0d911684e..8f71e8538 100644 --- a/include/rogue/protocols/rssi/Application.h +++ b/include/rogue/protocols/rssi/Application.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : RSSI Application Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * RSSI Application diff --git a/include/rogue/protocols/rssi/Client.h b/include/rogue/protocols/rssi/Client.h index c998d5d9b..d87a89d49 100644 --- a/include/rogue/protocols/rssi/Client.h +++ b/include/rogue/protocols/rssi/Client.h @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : RSSI Client Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: - * UDP Client + * RSSI Client Class * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #ifndef __ROGUE_PROTOCOLS_RSSI_CLIENT_H__ #define __ROGUE_PROTOCOLS_RSSI_CLIENT_H__ #include "rogue/Directives.h" diff --git a/include/rogue/protocols/rssi/Controller.h b/include/rogue/protocols/rssi/Controller.h index 60b7914b7..00655a342 100644 --- a/include/rogue/protocols/rssi/Controller.h +++ b/include/rogue/protocols/rssi/Controller.h @@ -1,12 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : RSSI Controller Class * ---------------------------------------------------------------------------- - * File : Controller.h - * Created : 2017-01-07 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: - * RSSI Controller + * RSSI Controller Class * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -16,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #ifndef __ROGUE_PROTOCOLS_RSSI_CONTROLLER_H__ #define __ROGUE_PROTOCOLS_RSSI_CONTROLLER_H__ #include "rogue/Directives.h" diff --git a/include/rogue/protocols/rssi/Header.h b/include/rogue/protocols/rssi/Header.h index 607e1d242..dab16314b 100644 --- a/include/rogue/protocols/rssi/Header.h +++ b/include/rogue/protocols/rssi/Header.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : RSSI Header Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * RSSI header diff --git a/include/rogue/protocols/rssi/Server.h b/include/rogue/protocols/rssi/Server.h index 265d8821f..0543bf17d 100644 --- a/include/rogue/protocols/rssi/Server.h +++ b/include/rogue/protocols/rssi/Server.h @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : RSSI Server Class * ---------------------------------------------------------------------------- - * File : Server.h - * Created : 2017-06-13 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * RSSI Server Class * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #ifndef __ROGUE_PROTOCOLS_RSSI_SERVER_H__ #define __ROGUE_PROTOCOLS_RSSI_SERVER_H__ #include "rogue/Directives.h" diff --git a/include/rogue/protocols/rssi/Transport.h b/include/rogue/protocols/rssi/Transport.h index de031f0b4..82755dfee 100644 --- a/include/rogue/protocols/rssi/Transport.h +++ b/include/rogue/protocols/rssi/Transport.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : RSSI Transport Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * RSSI Transport diff --git a/include/rogue/protocols/rssi/module.h b/include/rogue/protocols/rssi/module.h index 884b5f703..c04318224 100644 --- a/include/rogue/protocols/rssi/module.h +++ b/include/rogue/protocols/rssi/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/protocols/srp/Cmd.h b/include/rogue/protocols/srp/Cmd.h index e3c024c9d..d8bdb7b48 100644 --- a/include/rogue/protocols/srp/Cmd.h +++ b/include/rogue/protocols/srp/Cmd.h @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Command Protocol - *----------------------------------------------------------------------------- + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : - * CMD Version 0 + * SLAC Command Protocol, Version 0 *----------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/include/rogue/protocols/srp/SrpV0.h b/include/rogue/protocols/srp/SrpV0.h index 45d41a0a1..d1a32f84a 100644 --- a/include/rogue/protocols/srp/SrpV0.h +++ b/include/rogue/protocols/srp/SrpV0.h @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Register Protocol (SRP) SrpV0 - *----------------------------------------------------------------------------- + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : - * SRP Version 0 + * SLAC Register Protocol (SRP) SrpV0 *----------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/include/rogue/protocols/srp/SrpV3.h b/include/rogue/protocols/srp/SrpV3.h index 173c5822e..c6a60413f 100644 --- a/include/rogue/protocols/srp/SrpV3.h +++ b/include/rogue/protocols/srp/SrpV3.h @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Register Protocol (SRP) SrpV3 - *----------------------------------------------------------------------------- + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : - * SRP Version 3 + * SLAC Register Protocol (SRP) SrpV3 *----------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/include/rogue/protocols/srp/module.h b/include/rogue/protocols/srp/module.h index 869a1ba7a..b5c3aa524 100644 --- a/include/rogue/protocols/srp/module.h +++ b/include/rogue/protocols/srp/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/protocols/udp/Client.h b/include/rogue/protocols/udp/Client.h index 211feddc4..4b0f3ed60 100644 --- a/include/rogue/protocols/udp/Client.h +++ b/include/rogue/protocols/udp/Client.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : UDP Client Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * UDP Client diff --git a/include/rogue/protocols/udp/Core.h b/include/rogue/protocols/udp/Core.h index d361c3f1c..a6e201e52 100644 --- a/include/rogue/protocols/udp/Core.h +++ b/include/rogue/protocols/udp/Core.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : UDP Common Functions + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * UDP Common diff --git a/include/rogue/protocols/udp/Server.h b/include/rogue/protocols/udp/Server.h index 4df47e361..38794cd64 100644 --- a/include/rogue/protocols/udp/Server.h +++ b/include/rogue/protocols/udp/Server.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : UDP Server Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * UDP Server diff --git a/include/rogue/protocols/udp/module.h b/include/rogue/protocols/udp/module.h index 9ed4b0a5f..f5980d427 100644 --- a/include/rogue/protocols/udp/module.h +++ b/include/rogue/protocols/udp/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/protocols/xilinx/JtagDriver.h b/include/rogue/protocols/xilinx/JtagDriver.h index 9806ff471..21604c2d5 100644 --- a/include/rogue/protocols/xilinx/JtagDriver.h +++ b/include/rogue/protocols/xilinx/JtagDriver.h @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// Title : JTAG Support -//----------------------------------------------------------------------------- -// Company : SLAC National Accelerator Laboratory -//----------------------------------------------------------------------------- -// Description: JtagDriver.h -//----------------------------------------------------------------------------- -// This file is part of 'SLAC Firmware Standard Library'. -// It is subject to the license terms in the LICENSE.txt file found in the -// top-level directory of this distribution and at: -// https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. -// No part of 'SLAC Firmware Standard Library', including this file, -// may be copied, modified, propagated, or distributed except according to -// the terms contained in the LICENSE.txt file. -//----------------------------------------------------------------------------- +/** + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * JTAG Support + * ---------------------------------------------------------------------------- + * This file is part of the rogue software platform. It is subject to + * the license terms in the LICENSE.txt file found in the top-level directory + * of this distribution and at: + * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. + * No part of the rogue software platform, including this file, may be + * copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE.txt file. + * ---------------------------------------------------------------------------- +**/ #ifndef __ROGUE_PROTOCOLS_XILINX_JTAG_DRIVER_H__ #define __ROGUE_PROTOCOLS_XILINX_JTAG_DRIVER_H__ diff --git a/include/rogue/protocols/xilinx/Xvc.h b/include/rogue/protocols/xilinx/Xvc.h index c81a010ba..cd87fae85 100644 --- a/include/rogue/protocols/xilinx/Xvc.h +++ b/include/rogue/protocols/xilinx/Xvc.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : XVC Server Class + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Rogue implementation of the XVC Server diff --git a/include/rogue/protocols/xilinx/XvcConnection.h b/include/rogue/protocols/xilinx/XvcConnection.h index 20b7b5989..673a1e3af 100644 --- a/include/rogue/protocols/xilinx/XvcConnection.h +++ b/include/rogue/protocols/xilinx/XvcConnection.h @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// Title : JTAG Support -//----------------------------------------------------------------------------- -// Company : SLAC National Accelerator Laboratory -//----------------------------------------------------------------------------- -// Description: XvcConnection.h -//----------------------------------------------------------------------------- -// This file is part of 'SLAC Firmware Standard Library'. -// It is subject to the license terms in the LICENSE.txt file found in the -// top-level directory of this distribution and at: -// https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. -// No part of 'SLAC Firmware Standard Library', including this file, -// may be copied, modified, propagated, or distributed except according to -// the terms contained in the LICENSE.txt file. -//----------------------------------------------------------------------------- +/** + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * JTAG Support + * ---------------------------------------------------------------------------- + * This file is part of the rogue software platform. It is subject to + * the license terms in the LICENSE.txt file found in the top-level directory + * of this distribution and at: + * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. + * No part of the rogue software platform, including this file, may be + * copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE.txt file. + * ---------------------------------------------------------------------------- +**/ #ifndef __ROGUE_PROTOCOLS_XILINX_XVC_CONNECTION_H__ #define __ROGUE_PROTOCOLS_XILINX_XVC_CONNECTION_H__ diff --git a/include/rogue/protocols/xilinx/XvcServer.h b/include/rogue/protocols/xilinx/XvcServer.h index 6d7fa98a3..4277c9252 100644 --- a/include/rogue/protocols/xilinx/XvcServer.h +++ b/include/rogue/protocols/xilinx/XvcServer.h @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// Title : JTAG Support -//----------------------------------------------------------------------------- -// Company : SLAC National Accelerator Laboratory -//----------------------------------------------------------------------------- -// Description: XvcServer.h -//----------------------------------------------------------------------------- -// This file is part of 'SLAC Firmware Standard Library'. -// It is subject to the license terms in the LICENSE.txt file found in the -// top-level directory of this distribution and at: -// https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. -// No part of 'SLAC Firmware Standard Library', including this file, -// may be copied, modified, propagated, or distributed except according to -// the terms contained in the LICENSE.txt file. -//----------------------------------------------------------------------------- +/** + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * JTAG Support + * ---------------------------------------------------------------------------- + * This file is part of the rogue software platform. It is subject to + * the license terms in the LICENSE.txt file found in the top-level directory + * of this distribution and at: + * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. + * No part of the rogue software platform, including this file, may be + * copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE.txt file. + * ---------------------------------------------------------------------------- +**/ #ifndef __ROGUE_PROTOCOLS_XILINX_XVC_SERVER_H__ #define __ROGUE_PROTOCOLS_XILINX_XVC_SERVER_H__ diff --git a/include/rogue/protocols/xilinx/module.h b/include/rogue/protocols/xilinx/module.h index 657fa35e5..0b554ee4d 100644 --- a/include/rogue/protocols/xilinx/module.h +++ b/include/rogue/protocols/xilinx/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/utilities/Prbs.h b/include/rogue/utilities/Prbs.h index 65006a7b0..86d4a5842 100644 --- a/include/rogue/utilities/Prbs.h +++ b/include/rogue/utilities/Prbs.h @@ -1,7 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : PRBS Receive And Transmit Class - *----------------------------------------------------------------------------- + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class used to generate and receive PRBS test data. *----------------------------------------------------------------------------- diff --git a/include/rogue/utilities/StreamUnZip.h b/include/rogue/utilities/StreamUnZip.h index ba07c408f..93d6a3bb4 100644 --- a/include/rogue/utilities/StreamUnZip.h +++ b/include/rogue/utilities/StreamUnZip.h @@ -1,9 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Rogue stream de-compressor * ---------------------------------------------------------------------------- - * File : StreamUnZip.h - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Stream modules to decompress a data stream *----------------------------------------------------------------------------- diff --git a/include/rogue/utilities/StreamZip.h b/include/rogue/utilities/StreamZip.h index 63bdeb054..c77cd12c6 100644 --- a/include/rogue/utilities/StreamZip.h +++ b/include/rogue/utilities/StreamZip.h @@ -1,9 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Rogue stream compressor * ---------------------------------------------------------------------------- - * File : StreamZip.h - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Stream modules to compress a data stream *----------------------------------------------------------------------------- diff --git a/include/rogue/utilities/fileio/LegacyStreamReader.h b/include/rogue/utilities/fileio/LegacyStreamReader.h index c3b080b49..626332cba 100644 --- a/include/rogue/utilities/fileio/LegacyStreamReader.h +++ b/include/rogue/utilities/fileio/LegacyStreamReader.h @@ -1,7 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Data file reader utility. - *----------------------------------------------------------------------------- + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class to read data files. *----------------------------------------------------------------------------- diff --git a/include/rogue/utilities/fileio/LegacyStreamWriter.h b/include/rogue/utilities/fileio/LegacyStreamWriter.h index 46521001f..a6c5751d4 100644 --- a/include/rogue/utilities/fileio/LegacyStreamWriter.h +++ b/include/rogue/utilities/fileio/LegacyStreamWriter.h @@ -1,7 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Data file writer utility. - *----------------------------------------------------------------------------- + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class to coordinate data file writing. * This class writes files using the legacy data format of XmlDaq diff --git a/include/rogue/utilities/fileio/StreamReader.h b/include/rogue/utilities/fileio/StreamReader.h index 234f87dda..fa21ff2e3 100644 --- a/include/rogue/utilities/fileio/StreamReader.h +++ b/include/rogue/utilities/fileio/StreamReader.h @@ -1,7 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Data file reader utility. - *----------------------------------------------------------------------------- + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class to read data files. *----------------------------------------------------------------------------- diff --git a/include/rogue/utilities/fileio/StreamWriter.h b/include/rogue/utilities/fileio/StreamWriter.h index c38c60b7f..f6ceac01a 100644 --- a/include/rogue/utilities/fileio/StreamWriter.h +++ b/include/rogue/utilities/fileio/StreamWriter.h @@ -1,7 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Data file writer utility. - *----------------------------------------------------------------------------- + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class to coordinate data file writing. * This class supports multiple stream slaves, each with the ability to diff --git a/include/rogue/utilities/fileio/StreamWriterChannel.h b/include/rogue/utilities/fileio/StreamWriterChannel.h index 392bcede7..4ce9a143c 100644 --- a/include/rogue/utilities/fileio/StreamWriterChannel.h +++ b/include/rogue/utilities/fileio/StreamWriterChannel.h @@ -1,7 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Data file writer utility. Channel interface. - *----------------------------------------------------------------------------- + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class to act as a slave interface to the StreamWriter. Each * slave is associated with a tag. The tag is included in the bank header diff --git a/include/rogue/utilities/fileio/module.h b/include/rogue/utilities/fileio/module.h index d43c8491e..cec9f63d8 100644 --- a/include/rogue/utilities/fileio/module.h +++ b/include/rogue/utilities/fileio/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/include/rogue/utilities/module.h b/include/rogue/utilities/module.h index c7d14e537..4c96b6dd6 100644 --- a/include/rogue/utilities/module.h +++ b/include/rogue/utilities/module.h @@ -1,6 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/python/pyrogue/_Block.py b/python/pyrogue/_Block.py index cb167c233..289894b5d 100644 --- a/python/pyrogue/_Block.py +++ b/python/pyrogue/_Block.py @@ -1,7 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Block Class +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- -# File : pyrogue/_Block.py +# Description: +# PyRogue base module - Block Class #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/_Command.py b/python/pyrogue/_Command.py index 46cf33cc0..86bb741c5 100644 --- a/python/pyrogue/_Command.py +++ b/python/pyrogue/_Command.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Command Class +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - Command Class #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/_DataReceiver.py b/python/pyrogue/_DataReceiver.py index 39e284e2b..07a3ea733 100644 --- a/python/pyrogue/_DataReceiver.py +++ b/python/pyrogue/_DataReceiver.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Data Receiver Device +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - Data Receiver Device #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/_DataWriter.py b/python/pyrogue/_DataWriter.py index 1097c97a9..4aa8d2fb0 100644 --- a/python/pyrogue/_DataWriter.py +++ b/python/pyrogue/_DataWriter.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Data Writer Class +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - Data Writer Class #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/_Device.py b/python/pyrogue/_Device.py index efaab515e..cc0bde492 100644 --- a/python/pyrogue/_Device.py +++ b/python/pyrogue/_Device.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Device Class +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - Device Class #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/_HelperFunctions.py b/python/pyrogue/_HelperFunctions.py index 7fb2df430..631f8fd22 100644 --- a/python/pyrogue/_HelperFunctions.py +++ b/python/pyrogue/_HelperFunctions.py @@ -1,4 +1,9 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# +#----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/_Model.py b/python/pyrogue/_Model.py index 73503fc9e..b85af55b1 100644 --- a/python/pyrogue/_Model.py +++ b/python/pyrogue/_Model.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Model Class +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - Model Class #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/_Node.py b/python/pyrogue/_Node.py index 3395656a4..4e21e9f64 100644 --- a/python/pyrogue/_Node.py +++ b/python/pyrogue/_Node.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Node Classes +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - Node Classes #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/_PollQueue.py b/python/pyrogue/_PollQueue.py index 0b4670127..5b95cfba5 100644 --- a/python/pyrogue/_PollQueue.py +++ b/python/pyrogue/_PollQueue.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - PollQueue Class +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - PollQueue Class #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/_Process.py b/python/pyrogue/_Process.py index 66952cf3a..be211fdee 100644 --- a/python/pyrogue/_Process.py +++ b/python/pyrogue/_Process.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Process Device Class +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - Process Device Class #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/_Root.py b/python/pyrogue/_Root.py index 581b39c05..f13b82218 100644 --- a/python/pyrogue/_Root.py +++ b/python/pyrogue/_Root.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Root Class +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - Root Class #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/_RunControl.py b/python/pyrogue/_RunControl.py index 63a07d626..cc4801d97 100644 --- a/python/pyrogue/_RunControl.py +++ b/python/pyrogue/_RunControl.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Run Control Device Class +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - Run Control Device Class #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/_Variable.py b/python/pyrogue/_Variable.py index aa8c08c4c..da677000b 100644 --- a/python/pyrogue/_Variable.py +++ b/python/pyrogue/_Variable.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Variable Class +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - Variable Class #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/__init__.py b/python/pyrogue/__init__.py index 9180c393f..e54855d67 100644 --- a/python/pyrogue/__init__.py +++ b/python/pyrogue/__init__.py @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/__main__.py b/python/pyrogue/__main__.py index 438187421..cbaafa6b6 100644 --- a/python/pyrogue/__main__.py +++ b/python/pyrogue/__main__.py @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/examples/_AxiVersion.py b/python/pyrogue/examples/_AxiVersion.py index cd30592f9..2c35c4627 100644 --- a/python/pyrogue/examples/_AxiVersion.py +++ b/python/pyrogue/examples/_AxiVersion.py @@ -1,8 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue AXI-Lite Version Module Test +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: -# PyRogue AXI-Lite Version Module +# PyRogue AXI-Lite Version Module Test #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/examples/_ExampleRoot.py b/python/pyrogue/examples/_ExampleRoot.py index 89a6cfbc3..880f428ca 100755 --- a/python/pyrogue/examples/_ExampleRoot.py +++ b/python/pyrogue/examples/_ExampleRoot.py @@ -1,12 +1,15 @@ #!/usr/bin/env python3 #----------------------------------------------------------------------------- -# Title : Example Root +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- -# This file is part of the rogue_example software. It is subject to +# Description: +# Example Root +#----------------------------------------------------------------------------- +# This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: # https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. -# No part of the rogue_example software, including this file, may be +# No part of the rogue software platform, including this file, may be # copied, modified, propagated, or distributed except according to the terms # contained in the LICENSE.txt file. #----------------------------------------------------------------------------- diff --git a/python/pyrogue/examples/_LargeDevice.py b/python/pyrogue/examples/_LargeDevice.py index 366037a3f..4876a424f 100755 --- a/python/pyrogue/examples/_LargeDevice.py +++ b/python/pyrogue/examples/_LargeDevice.py @@ -1,12 +1,15 @@ #!/usr/bin/env python3 #----------------------------------------------------------------------------- -# Title : Large Device Test Group +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- -# This file is part of the rogue_example software. It is subject to +# Description: +# Large Device Test Group +#----------------------------------------------------------------------------- +# This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: # https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. -# No part of the rogue_example software, including this file, may be +# No part of the rogue software platform, including this file, may be # copied, modified, propagated, or distributed except according to the terms # contained in the LICENSE.txt file. #----------------------------------------------------------------------------- diff --git a/python/pyrogue/examples/__init__.py b/python/pyrogue/examples/__init__.py index f7c1e299d..65950fb91 100644 --- a/python/pyrogue/examples/__init__.py +++ b/python/pyrogue/examples/__init__.py @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/examples/__main__.py b/python/pyrogue/examples/__main__.py index 5883ae339..29471d938 100755 --- a/python/pyrogue/examples/__main__.py +++ b/python/pyrogue/examples/__main__.py @@ -1,12 +1,15 @@ #!/usr/bin/env python3 #----------------------------------------------------------------------------- -# Title : Example server test script +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- -# This file is part of the rogue_example software. It is subject to +# Description: +# Example server test script +#----------------------------------------------------------------------------- +# This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: # https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. -# No part of the rogue_example software, including this file, may be +# No part of the rogue software platform, including this file, may be # copied, modified, propagated, or distributed except according to the terms # contained in the LICENSE.txt file. #----------------------------------------------------------------------------- diff --git a/python/pyrogue/hardware/axi/__init__.py b/python/pyrogue/hardware/axi/__init__.py index 82b1470de..01de67d9f 100644 --- a/python/pyrogue/hardware/axi/__init__.py +++ b/python/pyrogue/hardware/axi/__init__.py @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/interfaces/_SimpleClient.py b/python/pyrogue/interfaces/_SimpleClient.py index 66b305600..3370c8219 100644 --- a/python/pyrogue/interfaces/_SimpleClient.py +++ b/python/pyrogue/interfaces/_SimpleClient.py @@ -1,6 +1,7 @@ #----------------------------------------------------------------------------- -# Title : PyRogue Simple ZMQ Client for Rogue +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- +# Description: # To use in Matlab first you need the zmq package in your # python installation: # diff --git a/python/pyrogue/interfaces/_SqlLogging.py b/python/pyrogue/interfaces/_SqlLogging.py index 51755afec..ba0f92c85 100644 --- a/python/pyrogue/interfaces/_SqlLogging.py +++ b/python/pyrogue/interfaces/_SqlLogging.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue - SQL Logging Module +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue - SQL Logging Module #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/interfaces/_Virtual.py b/python/pyrogue/interfaces/_Virtual.py index 6a0ccdbd1..75b702593 100644 --- a/python/pyrogue/interfaces/_Virtual.py +++ b/python/pyrogue/interfaces/_Virtual.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue base module - Virtual Classes +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue base module - Virtual Classes #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/interfaces/_ZmqServer.py b/python/pyrogue/interfaces/_ZmqServer.py index 5fcf76422..c45595801 100644 --- a/python/pyrogue/interfaces/_ZmqServer.py +++ b/python/pyrogue/interfaces/_ZmqServer.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue ZMQ Server +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue ZMQ Server #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/interfaces/__init__.py b/python/pyrogue/interfaces/__init__.py index 161d21a0d..8ee2ad179 100644 --- a/python/pyrogue/interfaces/__init__.py +++ b/python/pyrogue/interfaces/__init__.py @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/interfaces/simulation.py b/python/pyrogue/interfaces/simulation.py index fc1a19900..f92a07ac7 100644 --- a/python/pyrogue/interfaces/simulation.py +++ b/python/pyrogue/interfaces/simulation.py @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Title : PyRogue simulation support +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: # Module containing simulation support classes and routines diff --git a/python/pyrogue/interfaces/stream/_Fifo.py b/python/pyrogue/interfaces/stream/_Fifo.py index bcd3a6e1b..55ad2e497 100644 --- a/python/pyrogue/interfaces/stream/_Fifo.py +++ b/python/pyrogue/interfaces/stream/_Fifo.py @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Title : AXI Stream FIFO +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: # Python wrapper for the AXI Stream FIFO C++ device. diff --git a/python/pyrogue/interfaces/stream/_Variable.py b/python/pyrogue/interfaces/stream/_Variable.py index a6064c294..d6cf9852d 100644 --- a/python/pyrogue/interfaces/stream/_Variable.py +++ b/python/pyrogue/interfaces/stream/_Variable.py @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Title : Variable Update Streamer +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: # Class to generate variable update streams diff --git a/python/pyrogue/interfaces/stream/__init__.py b/python/pyrogue/interfaces/stream/__init__.py index 25c570d90..d879b5683 100644 --- a/python/pyrogue/interfaces/stream/__init__.py +++ b/python/pyrogue/interfaces/stream/__init__.py @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/protocols/_Network.py b/python/pyrogue/protocols/_Network.py index a4827f719..977b40f5b 100644 --- a/python/pyrogue/protocols/_Network.py +++ b/python/pyrogue/protocols/_Network.py @@ -1,8 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue protocols / Network wrappers +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: -# Module containing protocol modules +# PyRogue protocols / Network wrappers #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/protocols/__init__.py b/python/pyrogue/protocols/__init__.py index 8a450a84c..0b26e85c0 100644 --- a/python/pyrogue/protocols/__init__.py +++ b/python/pyrogue/protocols/__init__.py @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/protocols/_uart.py b/python/pyrogue/protocols/_uart.py index c3d19362e..2623593b3 100644 --- a/python/pyrogue/protocols/_uart.py +++ b/python/pyrogue/protocols/_uart.py @@ -1,8 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue protocols / UART register protocol +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: -# Module containing protocol modules +# PyRogue protocols / UART register protocol #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/protocols/epicsV4.py b/python/pyrogue/protocols/epicsV4.py index c9776eddf..a70fea63a 100644 --- a/python/pyrogue/protocols/epicsV4.py +++ b/python/pyrogue/protocols/epicsV4.py @@ -1,6 +1,6 @@ -# ----------------------------------------------------------------------------- -# Title : PyRogue epics support -# ----------------------------------------------------------------------------- +#----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # Description: # Module containing epics support classes and routines # TODO: diff --git a/python/pyrogue/protocols/gpib.py b/python/pyrogue/protocols/gpib.py index 7d8d25d1d..f9f6a2a67 100644 --- a/python/pyrogue/protocols/gpib.py +++ b/python/pyrogue/protocols/gpib.py @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Title : PyRogue protocols / GPIB register protocol +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: # Module to interface to GPIB devices diff --git a/python/pyrogue/pydm/TimePlotTop.py b/python/pyrogue/pydm/TimePlotTop.py index cb4b45d8d..628b02668 100644 --- a/python/pyrogue/pydm/TimePlotTop.py +++ b/python/pyrogue/pydm/TimePlotTop.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Top Level GUI +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Top Level GUI #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory @@ -9,7 +12,6 @@ # copied, modified, propagated, or distributed except according to the terms # contained in the LICENSE.txt file. #----------------------------------------------------------------------------- - import os from pyrogue.pydm.widgets import TimePlotter diff --git a/python/pyrogue/pydm/__init__.py b/python/pyrogue/pydm/__init__.py index e4ca62d1f..77c5d3b0d 100644 --- a/python/pyrogue/pydm/__init__.py +++ b/python/pyrogue/pydm/__init__.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Package, Function to start default Rogue PyDM GUI +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Package, Function to start default Rogue PyDM GUI #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/data_plugins/__init__.py b/python/pyrogue/pydm/data_plugins/__init__.py index c05eacec2..c361b28de 100644 --- a/python/pyrogue/pydm/data_plugins/__init__.py +++ b/python/pyrogue/pydm/data_plugins/__init__.py @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM data plug-in package +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/data_plugins/rogue_plugin.py b/python/pyrogue/pydm/data_plugins/rogue_plugin.py index 67efaa506..14ef8a0da 100644 --- a/python/pyrogue/pydm/data_plugins/rogue_plugin.py +++ b/python/pyrogue/pydm/data_plugins/rogue_plugin.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM data plug-in +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM data plug-in #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/pydmTop.py b/python/pyrogue/pydm/pydmTop.py index a35d6163d..61603bc52 100644 --- a/python/pyrogue/pydm/pydmTop.py +++ b/python/pyrogue/pydm/pydmTop.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Top Level GUI +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Top Level GUI #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory @@ -9,7 +12,6 @@ # copied, modified, propagated, or distributed except according to the terms # contained in the LICENSE.txt file. #----------------------------------------------------------------------------- - import os from pydm import Display from qtpy.QtWidgets import (QVBoxLayout, QTabWidget) diff --git a/python/pyrogue/pydm/rogue_plugin.py b/python/pyrogue/pydm/rogue_plugin.py index 4e14c3fb6..1ac34ae4a 100644 --- a/python/pyrogue/pydm/rogue_plugin.py +++ b/python/pyrogue/pydm/rogue_plugin.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Designer Plug-in Load +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Designer Plug-in Load #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/tools/__init__.py b/python/pyrogue/pydm/tools/__init__.py index 4884d4cd0..c361b28de 100644 --- a/python/pyrogue/pydm/tools/__init__.py +++ b/python/pyrogue/pydm/tools/__init__.py @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM tools directory +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/tools/generic_file_tool.py b/python/pyrogue/pydm/tools/generic_file_tool.py index 900c68315..42df13c1d 100644 --- a/python/pyrogue/pydm/tools/generic_file_tool.py +++ b/python/pyrogue/pydm/tools/generic_file_tool.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Generic File Browser +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Generic File Browser #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/tools/node_info_tool.py b/python/pyrogue/pydm/tools/node_info_tool.py index b616bab10..02ecf5e36 100644 --- a/python/pyrogue/pydm/tools/node_info_tool.py +++ b/python/pyrogue/pydm/tools/node_info_tool.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Node Info Tool +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Node Info Tool #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/tools/read_node_tool.py b/python/pyrogue/pydm/tools/read_node_tool.py index ef21fca8d..15a384794 100644 --- a/python/pyrogue/pydm/tools/read_node_tool.py +++ b/python/pyrogue/pydm/tools/read_node_tool.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Read Node Tool +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Read Node Tool #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/tools/read_recursive_tool.py b/python/pyrogue/pydm/tools/read_recursive_tool.py index 0ae2669f8..6f429d3d9 100644 --- a/python/pyrogue/pydm/tools/read_recursive_tool.py +++ b/python/pyrogue/pydm/tools/read_recursive_tool.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Read Recursive Tool +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Read Recursive Tool #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/tools/write_node_tool.py b/python/pyrogue/pydm/tools/write_node_tool.py index 438115f2a..1c828bd26 100644 --- a/python/pyrogue/pydm/tools/write_node_tool.py +++ b/python/pyrogue/pydm/tools/write_node_tool.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Write Variable Tool +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Write Variable Tool #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/tools/write_recursive_tool.py b/python/pyrogue/pydm/tools/write_recursive_tool.py index 4c4211da6..382a07896 100644 --- a/python/pyrogue/pydm/tools/write_recursive_tool.py +++ b/python/pyrogue/pydm/tools/write_recursive_tool.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Write Variable Tool +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Write Variable Tool #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory @@ -9,7 +12,6 @@ # copied, modified, propagated, or distributed except according to the terms # contained in the LICENSE.txt file. #----------------------------------------------------------------------------- - import logging from pydm.tools import ExternalTool from pydm.utilities.iconfont import IconFont diff --git a/python/pyrogue/pydm/widgets/__init__.py b/python/pyrogue/pydm/widgets/__init__.py index a4f24b290..e99c71ef1 100644 --- a/python/pyrogue/pydm/widgets/__init__.py +++ b/python/pyrogue/pydm/widgets/__init__.py @@ -1,6 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Widgets Package +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Widgets Package #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/widgets/data_writer.py b/python/pyrogue/pydm/widgets/data_writer.py index 0b2a6ae9c..a6a8f5df6 100644 --- a/python/pyrogue/pydm/widgets/data_writer.py +++ b/python/pyrogue/pydm/widgets/data_writer.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Data Writer Widget +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Data Writer Widget #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/widgets/debug_tree.py b/python/pyrogue/pydm/widgets/debug_tree.py index 72a5944d0..44bc43af8 100644 --- a/python/pyrogue/pydm/widgets/debug_tree.py +++ b/python/pyrogue/pydm/widgets/debug_tree.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Debug Tree Widget +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Debug Tree Widget #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/widgets/designer.py b/python/pyrogue/pydm/widgets/designer.py index 0747408d6..3de46ad39 100644 --- a/python/pyrogue/pydm/widgets/designer.py +++ b/python/pyrogue/pydm/widgets/designer.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Designer Setup +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Designer Setup #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/widgets/label.py b/python/pyrogue/pydm/widgets/label.py index abe13c942..cede5c79b 100644 --- a/python/pyrogue/pydm/widgets/label.py +++ b/python/pyrogue/pydm/widgets/label.py @@ -1,3 +1,17 @@ +#----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# +#----------------------------------------------------------------------------- +# This file is part of the rogue software platform. It is subject to +# the license terms in the LICENSE.txt file found in the top-level directory +# of this distribution and at: +# https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. +# No part of the rogue software platform, including this file, may be +# copied, modified, propagated, or distributed except according to the terms +# contained in the LICENSE.txt file. +#----------------------------------------------------------------------------- from pydm.widgets import PyDMLabel from qtpy.QtCore import Qt from qtpy.QtWidgets import QHBoxLayout diff --git a/python/pyrogue/pydm/widgets/line_edit.py b/python/pyrogue/pydm/widgets/line_edit.py index 0e9f6a7de..023f9259a 100644 --- a/python/pyrogue/pydm/widgets/line_edit.py +++ b/python/pyrogue/pydm/widgets/line_edit.py @@ -1,3 +1,17 @@ +#----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# +#----------------------------------------------------------------------------- +# This file is part of the rogue software platform. It is subject to +# the license terms in the LICENSE.txt file found in the top-level directory +# of this distribution and at: +# https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. +# No part of the rogue software platform, including this file, may be +# copied, modified, propagated, or distributed except according to the terms +# contained in the LICENSE.txt file. +#----------------------------------------------------------------------------- import locale import numpy as np import ast diff --git a/python/pyrogue/pydm/widgets/plot.py b/python/pyrogue/pydm/widgets/plot.py index 6cc30033c..222ed7e6e 100644 --- a/python/pyrogue/pydm/widgets/plot.py +++ b/python/pyrogue/pydm/widgets/plot.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Plot Window +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Plot Window #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/widgets/process.py b/python/pyrogue/pydm/widgets/process.py index 560d896b2..1556b4b9a 100644 --- a/python/pyrogue/pydm/widgets/process.py +++ b/python/pyrogue/pydm/widgets/process.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Process Widget +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Process Widget #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/widgets/root_control.py b/python/pyrogue/pydm/widgets/root_control.py index 6aba6601e..b5442cfe5 100644 --- a/python/pyrogue/pydm/widgets/root_control.py +++ b/python/pyrogue/pydm/widgets/root_control.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Root Control Widget +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Root Control Widget #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/widgets/run_control.py b/python/pyrogue/pydm/widgets/run_control.py index f050eade2..a0ebc42e2 100644 --- a/python/pyrogue/pydm/widgets/run_control.py +++ b/python/pyrogue/pydm/widgets/run_control.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Run Control Widget +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Run Control Widget #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/widgets/system_log.py b/python/pyrogue/pydm/widgets/system_log.py index 42c16a391..2db3e5e25 100644 --- a/python/pyrogue/pydm/widgets/system_log.py +++ b/python/pyrogue/pydm/widgets/system_log.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM System Log Widget +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM System Log Widget #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/widgets/system_window.py b/python/pyrogue/pydm/widgets/system_window.py index 819945e48..81b0da138 100644 --- a/python/pyrogue/pydm/widgets/system_window.py +++ b/python/pyrogue/pydm/widgets/system_window.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM System Window Widget +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM System Window Widget #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/python/pyrogue/pydm/widgets/time_plotter.py b/python/pyrogue/pydm/widgets/time_plotter.py index d795d994b..842fa496a 100644 --- a/python/pyrogue/pydm/widgets/time_plotter.py +++ b/python/pyrogue/pydm/widgets/time_plotter.py @@ -1,5 +1,8 @@ #----------------------------------------------------------------------------- -# Title : PyRogue PyDM Debug Tree Widget +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- +# Description: +# PyRogue PyDM Debug Tree Widget #----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory @@ -9,7 +12,6 @@ # copied, modified, propagated, or distributed except according to the terms # contained in the LICENSE.txt file. #----------------------------------------------------------------------------- - import pyrogue from pyrogue.pydm.data_plugins.rogue_plugin import nodeFromAddress from pyrogue.pydm.widgets.debug_tree import makeVariableViewWidget diff --git a/python/pyrogue/utilities/__init__.py b/python/pyrogue/utilities/__init__.py index 9adea634f..c361b28de 100644 --- a/python/pyrogue/utilities/__init__.py +++ b/python/pyrogue/utilities/__init__.py @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/utilities/cpsw.py b/python/pyrogue/utilities/cpsw.py index 64df37d04..d6ef3bc97 100644 --- a/python/pyrogue/utilities/cpsw.py +++ b/python/pyrogue/utilities/cpsw.py @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Title : PyRogue CPSW Export Utilities +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: # Tools to export Rogue modules to CPSW diff --git a/python/pyrogue/utilities/fileio/_FileReader.py b/python/pyrogue/utilities/fileio/_FileReader.py index 62c2ba822..0bb482c3c 100644 --- a/python/pyrogue/utilities/fileio/_FileReader.py +++ b/python/pyrogue/utilities/fileio/_FileReader.py @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Title : PyRogue FileIO - File Reader +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: # Module for reading file data. diff --git a/python/pyrogue/utilities/fileio/_StreamReader.py b/python/pyrogue/utilities/fileio/_StreamReader.py index e761d837d..726bc2cd4 100644 --- a/python/pyrogue/utilities/fileio/_StreamReader.py +++ b/python/pyrogue/utilities/fileio/_StreamReader.py @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Title : PyRogue FileIO - Stream Reader +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: # Module for reading stream data. diff --git a/python/pyrogue/utilities/fileio/_StreamWriter.py b/python/pyrogue/utilities/fileio/_StreamWriter.py index 13689667d..2282eeed3 100644 --- a/python/pyrogue/utilities/fileio/_StreamWriter.py +++ b/python/pyrogue/utilities/fileio/_StreamWriter.py @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Title : PyRogue FileIO - Stream Writer +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: # Module for writing stream data. diff --git a/python/pyrogue/utilities/fileio/__init__.py b/python/pyrogue/utilities/fileio/__init__.py index b4a1cdb9b..dedf9920a 100644 --- a/python/pyrogue/utilities/fileio/__init__.py +++ b/python/pyrogue/utilities/fileio/__init__.py @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/utilities/hls/_RegInterfParser.py b/python/pyrogue/utilities/hls/_RegInterfParser.py index ab3a4769c..415c88ed4 100644 --- a/python/pyrogue/utilities/hls/_RegInterfParser.py +++ b/python/pyrogue/utilities/hls/_RegInterfParser.py @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # This file is part of the rogue library utilities. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/utilities/hls/__init__.py b/python/pyrogue/utilities/hls/__init__.py index be5240fe4..d19c1201a 100644 --- a/python/pyrogue/utilities/hls/__init__.py +++ b/python/pyrogue/utilities/hls/__init__.py @@ -1,4 +1,6 @@ #----------------------------------------------------------------------------- +# Company : SLAC National Accelerator Laboratory +#----------------------------------------------------------------------------- # This file is part of the rogue software platform. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/python/pyrogue/utilities/prbs.py b/python/pyrogue/utilities/prbs.py index 6baebad3f..36cb78db0 100644 --- a/python/pyrogue/utilities/prbs.py +++ b/python/pyrogue/utilities/prbs.py @@ -1,5 +1,5 @@ #----------------------------------------------------------------------------- -# Title : PyRogue Utilities base module +# Company : SLAC National Accelerator Laboratory #----------------------------------------------------------------------------- # Description: # Module containing the utilities module class and methods diff --git a/scripts/updateDrivers.sh b/scripts/updateDrivers.sh index 8619b128a..1d94cea5a 100755 --- a/scripts/updateDrivers.sh +++ b/scripts/updateDrivers.sh @@ -1,10 +1,12 @@ #!/bin/bash # ---------------------------------------------------------------------------- -# This file is part of the rogue software platform. It is subject to +# Company : SLAC National Accelerator Laboratory +# ---------------------------------------------------------------------------- +# This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: # https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. -# No part of the rogue software platform, including this file, may be +# No part of the rogue software package, including this file, may be # copied, modified, propagated, or distributed except according to the terms # contained in the LICENSE.txt file. # ---------------------------------------------------------------------------- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 34e9952d8..7161ea2c5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,9 +1,6 @@ # ---------------------------------------------------------------------------- # Title : ROGUE CMAKE Control # ---------------------------------------------------------------------------- -# File : src/CMakeLists.txt -# Created : 2018-02-27 -# ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory # of this distribution and at: diff --git a/src/package.cpp b/src/package.cpp index 0dde0a8fc..2832749df 100644 --- a/src/package.cpp +++ b/src/package.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Package * ---------------------------------------------------------------------------- - * File : package.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python package setup diff --git a/src/rogue/CMakeLists.txt b/src/rogue/CMakeLists.txt index b0dcb98d4..8921a9989 100644 --- a/src/rogue/CMakeLists.txt +++ b/src/rogue/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/GeneralError.cpp b/src/rogue/GeneralError.cpp index 2fb2413f0..015677844 100644 --- a/src/rogue/GeneralError.cpp +++ b/src/rogue/GeneralError.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : General Error * ---------------------------------------------------------------------------- - * File : GeneralError.cpp - * Created : 2017-12-05 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * General exception for Rogue diff --git a/src/rogue/GilRelease.cpp b/src/rogue/GilRelease.cpp index 1d558b74d..35e3d1563 100644 --- a/src/rogue/GilRelease.cpp +++ b/src/rogue/GilRelease.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Release GIL within scope. * ---------------------------------------------------------------------------- - * File : GilRelease.cpp - * Created : 2017-02-28 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Release GIL for the scope of this class. diff --git a/src/rogue/Logging.cpp b/src/rogue/Logging.cpp index 483a7840a..658d23395 100644 --- a/src/rogue/Logging.cpp +++ b/src/rogue/Logging.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Logging interface * ---------------------------------------------------------------------------- - * File : Logging.cpp - * Created : 2017-02-28 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Logging interface for pyrogue diff --git a/src/rogue/ScopedGil.cpp b/src/rogue/ScopedGil.cpp index f03a5da15..f5e2b83a3 100644 --- a/src/rogue/ScopedGil.cpp +++ b/src/rogue/ScopedGil.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Scoped GIL * ---------------------------------------------------------------------------- - * File : ScopedGil.h - * Created : 2017-06-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Acquire the GIL for the scope of this class. diff --git a/src/rogue/Version.cpp b/src/rogue/Version.cpp index 1f6cc82bb..92e07721d 100644 --- a/src/rogue/Version.cpp +++ b/src/rogue/Version.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Rogue Version * ---------------------------------------------------------------------------- - * File : Version.cpp - * Created : 2017-05-17 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Version helpers for Rogue diff --git a/src/rogue/hardware/CMakeLists.txt b/src/rogue/hardware/CMakeLists.txt index e9186a15a..e7cc8aca7 100644 --- a/src/rogue/hardware/CMakeLists.txt +++ b/src/rogue/hardware/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/hardware/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/hardware/MemMap.cpp b/src/rogue/hardware/MemMap.cpp index a2b6e8e26..aa9bcaaf8 100644 --- a/src/rogue/hardware/MemMap.cpp +++ b/src/rogue/hardware/MemMap.cpp @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : Raw Memory Mapped Access * ---------------------------------------------------------------------------- - * File : MemMap.cpp - * Created : 2019-11-18 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * Raw Memory Mapped Access * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #include "rogue/Directives.h" #include "rogue/hardware/MemMap.h" diff --git a/src/rogue/hardware/axi/AxiMemMap.cpp b/src/rogue/hardware/axi/AxiMemMap.cpp index 012a8b668..3e48867e8 100644 --- a/src/rogue/hardware/axi/AxiMemMap.cpp +++ b/src/rogue/hardware/axi/AxiMemMap.cpp @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : AXI Memory Mapped Access * ---------------------------------------------------------------------------- - * File : AxiMemMap.cpp - * Created : 2017-03-21 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * AXI Memory Mapped Access * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #include "rogue/Directives.h" #include "rogue/hardware/axi/AxiMemMap.h" diff --git a/src/rogue/hardware/axi/AxiStreamDma.cpp b/src/rogue/hardware/axi/AxiStreamDma.cpp index 2101a900e..f1b718d6c 100644 --- a/src/rogue/hardware/axi/AxiStreamDma.cpp +++ b/src/rogue/hardware/axi/AxiStreamDma.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : AXI DMA Interface Class * ---------------------------------------------------------------------------- - * File : AxiStreamDma.h - * Created : 2017-03-21 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Class for interfacing to AxiStreamDma Driver. diff --git a/src/rogue/hardware/axi/CMakeLists.txt b/src/rogue/hardware/axi/CMakeLists.txt index 2e5a0231e..112608603 100644 --- a/src/rogue/hardware/axi/CMakeLists.txt +++ b/src/rogue/hardware/axi/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/hardware/axi/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/hardware/axi/module.cpp b/src/rogue/hardware/axi/module.cpp index 0ae5fbf9b..dc27cc1ff 100644 --- a/src/rogue/hardware/axi/module.cpp +++ b/src/rogue/hardware/axi/module.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Created : 2017-03-21 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/hardware/module.cpp b/src/rogue/hardware/module.cpp index 2ca409cda..5cc45ecc2 100644 --- a/src/rogue/hardware/module.cpp +++ b/src/rogue/hardware/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/interfaces/CMakeLists.txt b/src/rogue/interfaces/CMakeLists.txt index 0bf1155a3..8ee5c9bfa 100644 --- a/src/rogue/interfaces/CMakeLists.txt +++ b/src/rogue/interfaces/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/interfaces/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/interfaces/ZmqClient.cpp b/src/rogue/interfaces/ZmqClient.cpp index beb835860..d40b1856d 100644 --- a/src/rogue/interfaces/ZmqClient.cpp +++ b/src/rogue/interfaces/ZmqClient.cpp @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : Rogue ZMQ Control Interface * ---------------------------------------------------------------------------- - * File : ZmqClient.cpp - * Created : 2019-05-02 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * Rogue ZMQ Control Interface * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #include "rogue/Directives.h" diff --git a/src/rogue/interfaces/ZmqServer.cpp b/src/rogue/interfaces/ZmqServer.cpp index f1dd999eb..4c93f6e05 100644 --- a/src/rogue/interfaces/ZmqServer.cpp +++ b/src/rogue/interfaces/ZmqServer.cpp @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : Rogue ZMQ Control Interface * ---------------------------------------------------------------------------- - * File : ZmqServer.cpp - * Created : 2019-05-02 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * Rogue ZMQ Control Interface * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #include "rogue/Directives.h" diff --git a/src/rogue/interfaces/api/Bsp.cpp b/src/rogue/interfaces/api/Bsp.cpp index bb8a8df5d..bdae6b603 100644 --- a/src/rogue/interfaces/api/Bsp.cpp +++ b/src/rogue/interfaces/api/Bsp.cpp @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : C++ API Bsp * ---------------------------------------------------------------------------- - * File : Bsp.cpp - * Created : 2023-04-18 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * C++ API BSP (Board Support Package) * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #include "rogue/interfaces/api/Bsp.h" #include diff --git a/src/rogue/interfaces/api/CMakeLists.txt b/src/rogue/interfaces/api/CMakeLists.txt index 7f9140e1d..a5a691ee7 100644 --- a/src/rogue/interfaces/api/CMakeLists.txt +++ b/src/rogue/interfaces/api/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/interfaces/api/CMakeLists.txt -# Created : 2023-04-17 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index c47b5bc3b..5ddaf5a89 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -1,11 +1,9 @@ -/* - *----------------------------------------------------------------------------- - * Title : Memory Block +/** * ---------------------------------------------------------------------------- - * File : Block.cpp + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: - * Interface between RemoteVariables and lower level memory transactions. + * Interface between RemoteVariables and lower level memory transactions. * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -15,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #include "rogue/Directives.h" diff --git a/src/rogue/interfaces/memory/CMakeLists.txt b/src/rogue/interfaces/memory/CMakeLists.txt index b213e434c..d1b18961e 100644 --- a/src/rogue/interfaces/memory/CMakeLists.txt +++ b/src/rogue/interfaces/memory/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/interfaces/memory/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/interfaces/memory/Emulate.cpp b/src/rogue/interfaces/memory/Emulate.cpp index bcb1b88bd..72b9b6bc4 100644 --- a/src/rogue/interfaces/memory/Emulate.cpp +++ b/src/rogue/interfaces/memory/Emulate.cpp @@ -1,8 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory slave emulator * ---------------------------------------------------------------------------- - * File : Emulator.pp + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * A memory space emulator. Allows user to test a Rogue tree without real hardware. diff --git a/src/rogue/interfaces/memory/Hub.cpp b/src/rogue/interfaces/memory/Hub.cpp index 7a89d07bf..02668340b 100644 --- a/src/rogue/interfaces/memory/Hub.cpp +++ b/src/rogue/interfaces/memory/Hub.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Hub * ---------------------------------------------------------------------------- - * File : Hub.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-09-20 - * Last update: 2016-09-20 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * A memory interface hub. Accepts requests from multiple masters and forwards diff --git a/src/rogue/interfaces/memory/Master.cpp b/src/rogue/interfaces/memory/Master.cpp index c64491762..85a25dbb7 100644 --- a/src/rogue/interfaces/memory/Master.cpp +++ b/src/rogue/interfaces/memory/Master.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Master * ---------------------------------------------------------------------------- - * File : Master.cpp - * Created : 2016-09-20 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory master interface. diff --git a/src/rogue/interfaces/memory/Slave.cpp b/src/rogue/interfaces/memory/Slave.cpp index cca4e13e4..ed2228b2c 100644 --- a/src/rogue/interfaces/memory/Slave.cpp +++ b/src/rogue/interfaces/memory/Slave.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Slave * ---------------------------------------------------------------------------- - * File : Slave.cpp - * Created : 2016-09-20 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory slave interface. diff --git a/src/rogue/interfaces/memory/TcpClient.cpp b/src/rogue/interfaces/memory/TcpClient.cpp index 971ff7151..c09e05360 100644 --- a/src/rogue/interfaces/memory/TcpClient.cpp +++ b/src/rogue/interfaces/memory/TcpClient.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Client Network Bridge * ---------------------------------------------------------------------------- - * File : TcpClient.cpp - * Created : 2019-01-30 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory Client Network Bridge diff --git a/src/rogue/interfaces/memory/TcpServer.cpp b/src/rogue/interfaces/memory/TcpServer.cpp index 971b3ae1f..77eb287a7 100644 --- a/src/rogue/interfaces/memory/TcpServer.cpp +++ b/src/rogue/interfaces/memory/TcpServer.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Server Network Bridge * ---------------------------------------------------------------------------- - * File : TcpServer.cpp - * Created : 2019-01-30 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory Server Network Bridge diff --git a/src/rogue/interfaces/memory/Transaction.cpp b/src/rogue/interfaces/memory/Transaction.cpp index ecf4b1729..0e5a1bf3e 100644 --- a/src/rogue/interfaces/memory/Transaction.cpp +++ b/src/rogue/interfaces/memory/Transaction.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Transaction * ---------------------------------------------------------------------------- - * File : Transaction.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-09-20 - * Last update: 2016-09-20 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory master interface. diff --git a/src/rogue/interfaces/memory/TransactionLock.cpp b/src/rogue/interfaces/memory/TransactionLock.cpp index e7fd587d5..67706fe4c 100644 --- a/src/rogue/interfaces/memory/TransactionLock.cpp +++ b/src/rogue/interfaces/memory/TransactionLock.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Transaction Lock * ---------------------------------------------------------------------------- - * File : TransactionLock.cpp - * Created : 2018-03-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Memory Transaction lock diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index c29f1f47e..b448a84e8 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -1,8 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Memory Variable * ---------------------------------------------------------------------------- - * File : Variable.cpp + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Interface between RemoteVariables and lower level memory transactions. diff --git a/src/rogue/interfaces/memory/module.cpp b/src/rogue/interfaces/memory/module.cpp index 5cb0f7d84..e83bf5027 100644 --- a/src/rogue/interfaces/memory/module.cpp +++ b/src/rogue/interfaces/memory/module.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Created : 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/interfaces/module.cpp b/src/rogue/interfaces/module.cpp index 2d9192799..42003b546 100644 --- a/src/rogue/interfaces/module.cpp +++ b/src/rogue/interfaces/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/interfaces/stream/Buffer.cpp b/src/rogue/interfaces/stream/Buffer.cpp index 4f63e7674..8608f8202 100644 --- a/src/rogue/interfaces/stream/Buffer.cpp +++ b/src/rogue/interfaces/stream/Buffer.cpp @@ -1,15 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream Buffer Container * ---------------------------------------------------------------------------- - * File : Buffer.h - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-09-16 - * Last update: 2016-09-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream frame container - * Some concepts borrowed from CPSW by Till Straumann * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/interfaces/stream/CMakeLists.txt b/src/rogue/interfaces/stream/CMakeLists.txt index 22c5bf590..2d570e172 100644 --- a/src/rogue/interfaces/stream/CMakeLists.txt +++ b/src/rogue/interfaces/stream/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/interfaces/stream/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/interfaces/stream/Fifo.cpp b/src/rogue/interfaces/stream/Fifo.cpp index 38f4396ae..220093cdd 100644 --- a/src/rogue/interfaces/stream/Fifo.cpp +++ b/src/rogue/interfaces/stream/Fifo.cpp @@ -1,11 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : AXI Stream FIFO * ---------------------------------------------------------------------------- - * File : Fifo.cpp - * Author : Ryan Herbst - * Created : 02/02/2018 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * AXI Stream FIFO *----------------------------------------------------------------------------- diff --git a/src/rogue/interfaces/stream/Filter.cpp b/src/rogue/interfaces/stream/Filter.cpp index d40482989..8755fe9a9 100644 --- a/src/rogue/interfaces/stream/Filter.cpp +++ b/src/rogue/interfaces/stream/Filter.cpp @@ -1,11 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Register Protocol (SRP) Filter * ---------------------------------------------------------------------------- - * File : Filter.cpp - * Author : Ryan Herbst - * Created : 11/01/2018 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * AXI Stream Filter *----------------------------------------------------------------------------- diff --git a/src/rogue/interfaces/stream/Frame.cpp b/src/rogue/interfaces/stream/Frame.cpp index 176d9a164..384fa3d42 100644 --- a/src/rogue/interfaces/stream/Frame.cpp +++ b/src/rogue/interfaces/stream/Frame.cpp @@ -1,13 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream frame container * ---------------------------------------------------------------------------- - * File : Frame.h - * Created : 2016-09-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream frame container - * Some concepts borrowed from CPSW by Till Straumann * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/interfaces/stream/FrameIterator.cpp b/src/rogue/interfaces/stream/FrameIterator.cpp index c5353aadc..8deab144d 100644 --- a/src/rogue/interfaces/stream/FrameIterator.cpp +++ b/src/rogue/interfaces/stream/FrameIterator.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream iterator container * ---------------------------------------------------------------------------- - * File : FrameIterator.h - * Created : 2018-03-06 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream frame iterator diff --git a/src/rogue/interfaces/stream/FrameLock.cpp b/src/rogue/interfaces/stream/FrameLock.cpp index f103427c9..361e37703 100644 --- a/src/rogue/interfaces/stream/FrameLock.cpp +++ b/src/rogue/interfaces/stream/FrameLock.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Frame Lock * ---------------------------------------------------------------------------- - * File : FrameLock.cpp - * Created : 2018-03-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Frame lock diff --git a/src/rogue/interfaces/stream/Master.cpp b/src/rogue/interfaces/stream/Master.cpp index bdfadb0a0..80b8ec121 100644 --- a/src/rogue/interfaces/stream/Master.cpp +++ b/src/rogue/interfaces/stream/Master.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream interface master * ---------------------------------------------------------------------------- - * File : Master.h - * Created : 2016-09-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream interface master diff --git a/src/rogue/interfaces/stream/Pool.cpp b/src/rogue/interfaces/stream/Pool.cpp index 52237d34b..5a3e0013e 100644 --- a/src/rogue/interfaces/stream/Pool.cpp +++ b/src/rogue/interfaces/stream/Pool.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream memory pool * ---------------------------------------------------------------------------- - * File : Pool.cpp - * Created : 2016-09-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream memory pool diff --git a/src/rogue/interfaces/stream/RateDrop.cpp b/src/rogue/interfaces/stream/RateDrop.cpp index 92b777100..e0be70374 100644 --- a/src/rogue/interfaces/stream/RateDrop.cpp +++ b/src/rogue/interfaces/stream/RateDrop.cpp @@ -1,11 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Stream Interface Rate Drop * ---------------------------------------------------------------------------- - * File : RateDrop.cpp - * Author : Ryan Herbst - * Created : 08/25/2020 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Drops frames at a specified rate. *----------------------------------------------------------------------------- diff --git a/src/rogue/interfaces/stream/Slave.cpp b/src/rogue/interfaces/stream/Slave.cpp index 1fd7cca17..f8b6a7d03 100644 --- a/src/rogue/interfaces/stream/Slave.cpp +++ b/src/rogue/interfaces/stream/Slave.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream interface slave * ---------------------------------------------------------------------------- - * File : Slave.cpp - * Created : 2016-09-16 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream interface slave diff --git a/src/rogue/interfaces/stream/TcpClient.cpp b/src/rogue/interfaces/stream/TcpClient.cpp index 0c8621f63..0de7abde3 100644 --- a/src/rogue/interfaces/stream/TcpClient.cpp +++ b/src/rogue/interfaces/stream/TcpClient.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream Network Client * ---------------------------------------------------------------------------- - * File : TcpClient.h - * Created : 2019-01-30 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream Network Client diff --git a/src/rogue/interfaces/stream/TcpCore.cpp b/src/rogue/interfaces/stream/TcpCore.cpp index d0e13482b..b91ad493f 100644 --- a/src/rogue/interfaces/stream/TcpCore.cpp +++ b/src/rogue/interfaces/stream/TcpCore.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream Network Core * ---------------------------------------------------------------------------- - * File : TcpCore.h - * Created : 2019-01-30 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream Network Core diff --git a/src/rogue/interfaces/stream/TcpServer.cpp b/src/rogue/interfaces/stream/TcpServer.cpp index 466cbe437..b680b4dd8 100644 --- a/src/rogue/interfaces/stream/TcpServer.cpp +++ b/src/rogue/interfaces/stream/TcpServer.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Stream Network Server * ---------------------------------------------------------------------------- - * File : TcpServer.h - * Created : 2019-01-30 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Stream Network Server diff --git a/src/rogue/interfaces/stream/module.cpp b/src/rogue/interfaces/stream/module.cpp index 66db30678..fb3ac84a7 100644 --- a/src/rogue/interfaces/stream/module.cpp +++ b/src/rogue/interfaces/stream/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module For Stream Interface * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/module.cpp b/src/rogue/module.cpp index 0f2d9f4ed..583a1a26d 100644 --- a/src/rogue/module.cpp +++ b/src/rogue/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/protocols/CMakeLists.txt b/src/rogue/protocols/CMakeLists.txt index ff1ad7f50..0b8ff5dcb 100644 --- a/src/rogue/protocols/CMakeLists.txt +++ b/src/rogue/protocols/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/protocols/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/protocols/batcher/CMakeLists.txt b/src/rogue/protocols/batcher/CMakeLists.txt index 2a1a3b44a..cb49f2f23 100644 --- a/src/rogue/protocols/batcher/CMakeLists.txt +++ b/src/rogue/protocols/batcher/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/protocols/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/protocols/batcher/CoreV1.cpp b/src/rogue/protocols/batcher/CoreV1.cpp index 537790bd9..fff5014f2 100644 --- a/src/rogue/protocols/batcher/CoreV1.cpp +++ b/src/rogue/protocols/batcher/CoreV1.cpp @@ -1,11 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Batcher Core, Version 1 * ---------------------------------------------------------------------------- - * File : CoreV1.h - * Author : Ryan Herbst - * Created : 10/26/2018 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * AXI Batcher V1 (https://confluence.slac.stanford.edu/x/th1SDg) * diff --git a/src/rogue/protocols/batcher/Data.cpp b/src/rogue/protocols/batcher/Data.cpp index 555762adc..5f755af94 100644 --- a/src/rogue/protocols/batcher/Data.cpp +++ b/src/rogue/protocols/batcher/Data.cpp @@ -1,20 +1,19 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Batcher Data * ---------------------------------------------------------------------------- - * File : Data.h - * Author : Ryan Herbst - * Created : 02/08/2019 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * SLAC Batcher Data + * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory * of this distribution and at: - * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. + * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. * No part of the rogue software platform, including this file, may be * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. - *----------------------------------------------------------------------------- - **/ + * ---------------------------------------------------------------------------- +**/ #include "rogue/protocols/batcher/Data.h" #include diff --git a/src/rogue/protocols/batcher/InverterV1.cpp b/src/rogue/protocols/batcher/InverterV1.cpp index 995a13908..af14c4365 100644 --- a/src/rogue/protocols/batcher/InverterV1.cpp +++ b/src/rogue/protocols/batcher/InverterV1.cpp @@ -1,20 +1,19 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Inverter Version 1 * ---------------------------------------------------------------------------- - * File : InverterV1.h - * Author : Ryan Herbst - * Created : 10/26/2018 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * SLAC Inverter Version 1 + * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory * of this distribution and at: - * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. + * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. * No part of the rogue software platform, including this file, may be * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. - *----------------------------------------------------------------------------- - **/ + * ---------------------------------------------------------------------------- +**/ #include "rogue/Directives.h" #include "rogue/protocols/batcher/InverterV1.h" diff --git a/src/rogue/protocols/batcher/SplitterV1.cpp b/src/rogue/protocols/batcher/SplitterV1.cpp index 625289af7..5e018b9ec 100644 --- a/src/rogue/protocols/batcher/SplitterV1.cpp +++ b/src/rogue/protocols/batcher/SplitterV1.cpp @@ -1,20 +1,19 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Splitter Version 1 * ---------------------------------------------------------------------------- - * File : SplitterV1.h - * Author : Ryan Herbst - * Created : 10/26/2018 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * SLAC Splitter Version 1 + * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory * of this distribution and at: - * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. + * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. * No part of the rogue software platform, including this file, may be * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. - *----------------------------------------------------------------------------- - **/ + * ---------------------------------------------------------------------------- +**/ #include "rogue/Directives.h" #include "rogue/protocols/batcher/SplitterV1.h" diff --git a/src/rogue/protocols/batcher/module.cpp b/src/rogue/protocols/batcher/module.cpp index 35a804b22..f683bf45f 100644 --- a/src/rogue/protocols/batcher/module.cpp +++ b/src/rogue/protocols/batcher/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/protocols/module.cpp b/src/rogue/protocols/module.cpp index 3f4de6726..467718b09 100644 --- a/src/rogue/protocols/module.cpp +++ b/src/rogue/protocols/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/protocols/packetizer/Application.cpp b/src/rogue/protocols/packetizer/Application.cpp index c76b7ae39..5d41d19c4 100644 --- a/src/rogue/protocols/packetizer/Application.cpp +++ b/src/rogue/protocols/packetizer/Application.cpp @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Application Port * ---------------------------------------------------------------------------- - * File : Application.h - * Created : 2017-01-07 - * Last update: 2017-01-07 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Application Port diff --git a/src/rogue/protocols/packetizer/CMakeLists.txt b/src/rogue/protocols/packetizer/CMakeLists.txt index 1d6fd4974..38abd2672 100644 --- a/src/rogue/protocols/packetizer/CMakeLists.txt +++ b/src/rogue/protocols/packetizer/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/protocols/packetizer/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/protocols/packetizer/Controller.cpp b/src/rogue/protocols/packetizer/Controller.cpp index b85c272e9..a70d0d99c 100644 --- a/src/rogue/protocols/packetizer/Controller.cpp +++ b/src/rogue/protocols/packetizer/Controller.cpp @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Controller * ---------------------------------------------------------------------------- - * File : Controller.h - * Created : 2017-01-07 - * Last update: 2017-01-07 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Controller diff --git a/src/rogue/protocols/packetizer/ControllerV1.cpp b/src/rogue/protocols/packetizer/ControllerV1.cpp index f794788e2..5f7fd5d4e 100644 --- a/src/rogue/protocols/packetizer/ControllerV1.cpp +++ b/src/rogue/protocols/packetizer/ControllerV1.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Controller Version 1 * ---------------------------------------------------------------------------- - * File : ControllerV1.cpp - * Created : 2018-02-02 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Controller V1 diff --git a/src/rogue/protocols/packetizer/ControllerV2.cpp b/src/rogue/protocols/packetizer/ControllerV2.cpp index 045ac9e47..b997fcaa6 100644 --- a/src/rogue/protocols/packetizer/ControllerV2.cpp +++ b/src/rogue/protocols/packetizer/ControllerV2.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Controller Version 1 * ---------------------------------------------------------------------------- - * File : ControllerV2.cpp - * Created : 2018-02-02 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Controller V1 diff --git a/src/rogue/protocols/packetizer/Core.cpp b/src/rogue/protocols/packetizer/Core.cpp index fcd5bb2ee..2d2dd9425 100644 --- a/src/rogue/protocols/packetizer/Core.cpp +++ b/src/rogue/protocols/packetizer/Core.cpp @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Core Class * ---------------------------------------------------------------------------- - * File : Core.h - * Created : 2017-01-07 - * Last update: 2017-01-07 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Core diff --git a/src/rogue/protocols/packetizer/CoreV2.cpp b/src/rogue/protocols/packetizer/CoreV2.cpp index ac6796b75..e4849cdbf 100644 --- a/src/rogue/protocols/packetizer/CoreV2.cpp +++ b/src/rogue/protocols/packetizer/CoreV2.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Core Class * ---------------------------------------------------------------------------- - * File : CoreV2.cpp - * Created : 2018-02-02 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Core V2 diff --git a/src/rogue/protocols/packetizer/Transport.cpp b/src/rogue/protocols/packetizer/Transport.cpp index 76fdcc2ff..9b2c4e447 100644 --- a/src/rogue/protocols/packetizer/Transport.cpp +++ b/src/rogue/protocols/packetizer/Transport.cpp @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Packetizer Transport Port * ---------------------------------------------------------------------------- - * File : Transport.h - * Created : 2017-01-07 - * Last update: 2017-01-07 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Packetizer Transport Port diff --git a/src/rogue/protocols/packetizer/module.cpp b/src/rogue/protocols/packetizer/module.cpp index d5632105f..c4647fa7d 100644 --- a/src/rogue/protocols/packetizer/module.cpp +++ b/src/rogue/protocols/packetizer/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/protocols/rssi/Application.cpp b/src/rogue/protocols/rssi/Application.cpp index c9b798aca..48ae2e990 100644 --- a/src/rogue/protocols/rssi/Application.cpp +++ b/src/rogue/protocols/rssi/Application.cpp @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : RSSI Application Port * ---------------------------------------------------------------------------- - * File : Application.h - * Created : 2017-01-07 - * Last update: 2017-01-07 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * RSSI Application Port diff --git a/src/rogue/protocols/rssi/CMakeLists.txt b/src/rogue/protocols/rssi/CMakeLists.txt index ebbcb8da3..1b5d86938 100644 --- a/src/rogue/protocols/rssi/CMakeLists.txt +++ b/src/rogue/protocols/rssi/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/protocols/rssi/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/protocols/rssi/Client.cpp b/src/rogue/protocols/rssi/Client.cpp index 65bfdfb70..dd9e41c64 100644 --- a/src/rogue/protocols/rssi/Client.cpp +++ b/src/rogue/protocols/rssi/Client.cpp @@ -1,13 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : RSSI Client Class * ---------------------------------------------------------------------------- - * File : Client.h - * Created : 2017-01-07 - * Last update: 2017-01-07 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: - * UDP Client + * RSSI Client Class * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/protocols/rssi/Controller.cpp b/src/rogue/protocols/rssi/Controller.cpp index 952975269..fe5830d7f 100644 --- a/src/rogue/protocols/rssi/Controller.cpp +++ b/src/rogue/protocols/rssi/Controller.cpp @@ -1,11 +1,6 @@ - /** - *----------------------------------------------------------------------------- - * Title : RSSI Controller * ---------------------------------------------------------------------------- - * File : Controller.h - * Created : 2017-01-07 - * Last update: 2017-01-07 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * RSSI Controller diff --git a/src/rogue/protocols/rssi/Header.cpp b/src/rogue/protocols/rssi/Header.cpp index db4f7f316..1958412b9 100644 --- a/src/rogue/protocols/rssi/Header.cpp +++ b/src/rogue/protocols/rssi/Header.cpp @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : RSII Header Class * ---------------------------------------------------------------------------- - * File : Header.h - * Created : 2017-01-07 - * Last update: 2017-01-07 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * RSSI Header diff --git a/src/rogue/protocols/rssi/Server.cpp b/src/rogue/protocols/rssi/Server.cpp index 7f3dfa25a..c7364d97f 100644 --- a/src/rogue/protocols/rssi/Server.cpp +++ b/src/rogue/protocols/rssi/Server.cpp @@ -1,9 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : RSSI Server Class * ---------------------------------------------------------------------------- - * File : Server.h - * Created : 2017-06-13 + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- - **/ +**/ #include "rogue/Directives.h" #include "rogue/protocols/rssi/Server.h" diff --git a/src/rogue/protocols/rssi/Transport.cpp b/src/rogue/protocols/rssi/Transport.cpp index 7fbc7083b..6c026704a 100644 --- a/src/rogue/protocols/rssi/Transport.cpp +++ b/src/rogue/protocols/rssi/Transport.cpp @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : RSSI Transport Port * ---------------------------------------------------------------------------- - * File : Transport.h - * Created : 2017-01-07 - * Last update: 2017-01-07 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * RSSI Transport Port diff --git a/src/rogue/protocols/rssi/module.cpp b/src/rogue/protocols/rssi/module.cpp index e142515ba..0085be5f2 100644 --- a/src/rogue/protocols/rssi/module.cpp +++ b/src/rogue/protocols/rssi/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/protocols/srp/CMakeLists.txt b/src/rogue/protocols/srp/CMakeLists.txt index f8aba1edc..593f678d7 100644 --- a/src/rogue/protocols/srp/CMakeLists.txt +++ b/src/rogue/protocols/srp/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/protocols/srp/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/protocols/srp/Cmd.cpp b/src/rogue/protocols/srp/Cmd.cpp index 6eae0707e..870ea1881 100644 --- a/src/rogue/protocols/srp/Cmd.cpp +++ b/src/rogue/protocols/srp/Cmd.cpp @@ -1,12 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Register Protocol (SRP) SrpV0 * ---------------------------------------------------------------------------- - * File : SrpV0.cpp - * Author : Ryan Herbst - * Created : 09/17/2016 - * Last update : 09/17/2016 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * CMD protocol bridge, Version 0 *----------------------------------------------------------------------------- diff --git a/src/rogue/protocols/srp/SrpV0.cpp b/src/rogue/protocols/srp/SrpV0.cpp index ff13a27ae..ff9a71742 100644 --- a/src/rogue/protocols/srp/SrpV0.cpp +++ b/src/rogue/protocols/srp/SrpV0.cpp @@ -1,12 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Register Protocol (SRP) SrpV0 * ---------------------------------------------------------------------------- - * File : SrpV0.cpp - * Author : Ryan Herbst - * Created : 09/17/2016 - * Last update : 09/17/2016 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * SRP protocol bridge, Version 0 *----------------------------------------------------------------------------- diff --git a/src/rogue/protocols/srp/SrpV3.cpp b/src/rogue/protocols/srp/SrpV3.cpp index 3496ad9f7..754e56902 100644 --- a/src/rogue/protocols/srp/SrpV3.cpp +++ b/src/rogue/protocols/srp/SrpV3.cpp @@ -1,12 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : SLAC Register Protocol (SRP) SrpV3 * ---------------------------------------------------------------------------- - * File : SrpV3.cpp - * Author : Ryan Herbst - * Created : 09/17/2016 - * Last update : 09/17/2016 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * SRP protocol bridge, Version 3 *----------------------------------------------------------------------------- diff --git a/src/rogue/protocols/srp/module.cpp b/src/rogue/protocols/srp/module.cpp index f6a59a89d..1ea316b5b 100644 --- a/src/rogue/protocols/srp/module.cpp +++ b/src/rogue/protocols/srp/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/protocols/udp/CMakeLists.txt b/src/rogue/protocols/udp/CMakeLists.txt index 20d170194..f0fc97d7f 100644 --- a/src/rogue/protocols/udp/CMakeLists.txt +++ b/src/rogue/protocols/udp/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/protocols/udp/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/protocols/udp/Client.cpp b/src/rogue/protocols/udp/Client.cpp index 6a60c0add..0030ac77b 100644 --- a/src/rogue/protocols/udp/Client.cpp +++ b/src/rogue/protocols/udp/Client.cpp @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : UDP Client Class * ---------------------------------------------------------------------------- - * File : Client.h - * Created : 2017-01-07 - * Last update: 2017-01-07 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * UDP Client diff --git a/src/rogue/protocols/udp/Core.cpp b/src/rogue/protocols/udp/Core.cpp index f736439a0..0df6a7d6a 100644 --- a/src/rogue/protocols/udp/Core.cpp +++ b/src/rogue/protocols/udp/Core.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : UDP Core Class * ---------------------------------------------------------------------------- - * File : Core.h - * Created : 2018-03-02 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * UDP Core diff --git a/src/rogue/protocols/udp/Server.cpp b/src/rogue/protocols/udp/Server.cpp index 61fae1617..5b201ce5d 100644 --- a/src/rogue/protocols/udp/Server.cpp +++ b/src/rogue/protocols/udp/Server.cpp @@ -1,9 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : UDP Server Class * ---------------------------------------------------------------------------- - * File : Server.h - * Created : 2018-03-02 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * UDP Server diff --git a/src/rogue/protocols/udp/module.cpp b/src/rogue/protocols/udp/module.cpp index 97e8f8558..f9dea7081 100644 --- a/src/rogue/protocols/udp/module.cpp +++ b/src/rogue/protocols/udp/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/protocols/xilinx/CMakeLists.txt b/src/rogue/protocols/xilinx/CMakeLists.txt index 47c3a02ed..9b68ae6f0 100644 --- a/src/rogue/protocols/xilinx/CMakeLists.txt +++ b/src/rogue/protocols/xilinx/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/protocols/xilinx/JtagDriver.cpp b/src/rogue/protocols/xilinx/JtagDriver.cpp index da6dfb552..25300fdf0 100644 --- a/src/rogue/protocols/xilinx/JtagDriver.cpp +++ b/src/rogue/protocols/xilinx/JtagDriver.cpp @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// Title : JTAG Support -//----------------------------------------------------------------------------- -// Company : SLAC National Accelerator Laboratory -//----------------------------------------------------------------------------- -// Description: JtagDriver.cpp -//----------------------------------------------------------------------------- -// This file is part of 'SLAC Firmware Standard Library'. -// It is subject to the license terms in the LICENSE.txt file found in the -// top-level directory of this distribution and at: -// https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. -// No part of 'SLAC Firmware Standard Library', including this file, -// may be copied, modified, propagated, or distributed except according to -// the terms contained in the LICENSE.txt file. -//----------------------------------------------------------------------------- +/** + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * JtagDriver.cpp + * ---------------------------------------------------------------------------- + * This file is part of the rogue software platform. It is subject to + * the license terms in the LICENSE.txt file found in the top-level directory + * of this distribution and at: + * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. + * No part of the rogue software platform, including this file, may be + * copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE.txt file. + * ---------------------------------------------------------------------------- +**/ #include "rogue/Directives.h" diff --git a/src/rogue/protocols/xilinx/Xvc.cpp b/src/rogue/protocols/xilinx/Xvc.cpp index a859d66fb..b56545f59 100644 --- a/src/rogue/protocols/xilinx/Xvc.cpp +++ b/src/rogue/protocols/xilinx/Xvc.cpp @@ -1,10 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : XVC Server Wrapper Class * ---------------------------------------------------------------------------- - * File : Xvc.h - * Created : 2022-03-23 - * Last update: 2022-03-23 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * XVC Server Wrapper Class diff --git a/src/rogue/protocols/xilinx/XvcConnection.cpp b/src/rogue/protocols/xilinx/XvcConnection.cpp index 549cb45c9..419c0a4d6 100644 --- a/src/rogue/protocols/xilinx/XvcConnection.cpp +++ b/src/rogue/protocols/xilinx/XvcConnection.cpp @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// Title : JTAG Support -//----------------------------------------------------------------------------- -// Company : SLAC National Accelerator Laboratory -//----------------------------------------------------------------------------- -// Description: -//----------------------------------------------------------------------------- -// This file is part of 'SLAC Firmware Standard Library'. -// It is subject to the license terms in the LICENSE.txt file found in the -// top-level directory of this distribution and at: -// https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. -// No part of 'SLAC Firmware Standard Library', including this file, -// may be copied, modified, propagated, or distributed except according to -// the terms contained in the LICENSE.txt file. -//----------------------------------------------------------------------------- +/** + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * JTAG support + * ---------------------------------------------------------------------------- + * This file is part of the rogue software platform. It is subject to + * the license terms in the LICENSE.txt file found in the top-level directory + * of this distribution and at: + * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. + * No part of the rogue software platform, including this file, may be + * copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE.txt file. + * ---------------------------------------------------------------------------- +**/ #include "rogue/protocols/xilinx/XvcConnection.h" diff --git a/src/rogue/protocols/xilinx/XvcServer.cpp b/src/rogue/protocols/xilinx/XvcServer.cpp index 357c80457..e5c940d79 100644 --- a/src/rogue/protocols/xilinx/XvcServer.cpp +++ b/src/rogue/protocols/xilinx/XvcServer.cpp @@ -1,18 +1,19 @@ -//----------------------------------------------------------------------------- -// Title : JTAG Support -//----------------------------------------------------------------------------- -// Company : SLAC National Accelerator Laboratory -//----------------------------------------------------------------------------- -// Description: -//----------------------------------------------------------------------------- -// This file is part of 'SLAC Firmware Standard Library'. -// It is subject to the license terms in the LICENSE.txt file found in the -// top-level directory of this distribution and at: -// https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. -// No part of 'SLAC Firmware Standard Library', including this file, -// may be copied, modified, propagated, or distributed except according to -// the terms contained in the LICENSE.txt file. -//----------------------------------------------------------------------------- +/** + * ---------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- + * Description: + * + * ---------------------------------------------------------------------------- + * This file is part of the rogue software platform. It is subject to + * the license terms in the LICENSE.txt file found in the top-level directory + * of this distribution and at: + * https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. + * No part of the rogue software platform, including this file, may be + * copied, modified, propagated, or distributed except according to the terms + * contained in the LICENSE.txt file. + * ---------------------------------------------------------------------------- +**/ #include "rogue/protocols/xilinx/XvcServer.h" diff --git a/src/rogue/protocols/xilinx/module.cpp b/src/rogue/protocols/xilinx/module.cpp index aecdb9701..c83741c49 100644 --- a/src/rogue/protocols/xilinx/module.cpp +++ b/src/rogue/protocols/xilinx/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup diff --git a/src/rogue/utilities/CMakeLists.txt b/src/rogue/utilities/CMakeLists.txt index 321bd6294..4d317906c 100644 --- a/src/rogue/utilities/CMakeLists.txt +++ b/src/rogue/utilities/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/utilities/CMakeLists.txt -# Created : 2018-02-27 +#Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/utilities/Prbs.cpp b/src/rogue/utilities/Prbs.cpp index 1390f4825..f400abcb7 100644 --- a/src/rogue/utilities/Prbs.cpp +++ b/src/rogue/utilities/Prbs.cpp @@ -1,12 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : PRBS Receive And Transmit Class * ---------------------------------------------------------------------------- - * File : Prbs.cpp - * Author : Ryan Herbst - * Created : 09/17/2016 - * Last update : 09/17/2016 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class used to generate and receive PRBS test data. *----------------------------------------------------------------------------- diff --git a/src/rogue/utilities/StreamUnZip.cpp b/src/rogue/utilities/StreamUnZip.cpp index ed52e6c0f..4b86da611 100644 --- a/src/rogue/utilities/StreamUnZip.cpp +++ b/src/rogue/utilities/StreamUnZip.cpp @@ -1,9 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Rogue stream decompressor * ---------------------------------------------------------------------------- - * File : StreamUnZip.cpp - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Stream modules to decompress a data stream *----------------------------------------------------------------------------- diff --git a/src/rogue/utilities/StreamZip.cpp b/src/rogue/utilities/StreamZip.cpp index ffe3ca557..9424f2331 100644 --- a/src/rogue/utilities/StreamZip.cpp +++ b/src/rogue/utilities/StreamZip.cpp @@ -1,9 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Rogue stream compressor * ---------------------------------------------------------------------------- - * File : StreamZip.cpp - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Stream modules to compress a data stream *----------------------------------------------------------------------------- diff --git a/src/rogue/utilities/fileio/CMakeLists.txt b/src/rogue/utilities/fileio/CMakeLists.txt index 91b118690..d7dd8195f 100644 --- a/src/rogue/utilities/fileio/CMakeLists.txt +++ b/src/rogue/utilities/fileio/CMakeLists.txt @@ -1,8 +1,5 @@ # ---------------------------------------------------------------------------- -# Title : ROGUE CMAKE Control -# ---------------------------------------------------------------------------- -# File : src/rogue/utilities/fileio/CMakeLists.txt -# Created : 2018-02-27 +# Company : SLAC National Accelerator Laboratory # ---------------------------------------------------------------------------- # This file is part of the rogue software package. It is subject to # the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/utilities/fileio/LegacyStreamReader.cpp b/src/rogue/utilities/fileio/LegacyStreamReader.cpp index 2a7015903..1de300fd4 100644 --- a/src/rogue/utilities/fileio/LegacyStreamReader.cpp +++ b/src/rogue/utilities/fileio/LegacyStreamReader.cpp @@ -1,9 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Data file reader utility. * ---------------------------------------------------------------------------- - * File : LegacyStreamReader.cpp - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class to read data files generated using LegacyFileWriter *----------------------------------------------------------------------------- diff --git a/src/rogue/utilities/fileio/LegacyStreamWriter.cpp b/src/rogue/utilities/fileio/LegacyStreamWriter.cpp index 4b8b6b605..0cb59b6ed 100644 --- a/src/rogue/utilities/fileio/LegacyStreamWriter.cpp +++ b/src/rogue/utilities/fileio/LegacyStreamWriter.cpp @@ -1,12 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Data file writer utility. * ---------------------------------------------------------------------------- - * File : LegacyStreamWriter.cpp - * Author : Ryan Herbst - * Created : 09/28/2016 - * Last update : 09/28/2016 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class to coordinate data file writing. * This class supports multiple stream slaves, each with the ability to diff --git a/src/rogue/utilities/fileio/StreamReader.cpp b/src/rogue/utilities/fileio/StreamReader.cpp index 8a66e33fe..40e15c1c5 100644 --- a/src/rogue/utilities/fileio/StreamReader.cpp +++ b/src/rogue/utilities/fileio/StreamReader.cpp @@ -1,12 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Data file reader utility. * ---------------------------------------------------------------------------- - * File : StreamReader.cpp - * Author : Ryan Herbst - * Created : 09/28/2016 - * Last update : 09/28/2016 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class to read data files. *----------------------------------------------------------------------------- diff --git a/src/rogue/utilities/fileio/StreamWriter.cpp b/src/rogue/utilities/fileio/StreamWriter.cpp index f7425b245..a519bcc49 100644 --- a/src/rogue/utilities/fileio/StreamWriter.cpp +++ b/src/rogue/utilities/fileio/StreamWriter.cpp @@ -1,12 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Data file writer utility. * ---------------------------------------------------------------------------- - * File : StreamWriter.h - * Author : Ryan Herbst - * Created : 09/28/2016 - * Last update : 09/28/2016 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class to coordinate data file writing. * This class supports multiple stream slaves, each with the ability to diff --git a/src/rogue/utilities/fileio/StreamWriterChannel.cpp b/src/rogue/utilities/fileio/StreamWriterChannel.cpp index a6235bad9..9b646bd05 100644 --- a/src/rogue/utilities/fileio/StreamWriterChannel.cpp +++ b/src/rogue/utilities/fileio/StreamWriterChannel.cpp @@ -1,12 +1,7 @@ /** - *----------------------------------------------------------------------------- - * Title : Data file writer utility. Channel interface. * ---------------------------------------------------------------------------- - * File : StreamWriterChannel.cpp - * Author : Ryan Herbst - * Created : 09/28/2016 - * Last update : 09/28/2016 - *----------------------------------------------------------------------------- + * Company : SLAC National Accelerator Laboratory + * ---------------------------------------------------------------------------- * Description : * Class to act as a slave interface to the StreamWriterChannel. Each * slave is associated with a tag. The tag is included in the bank header diff --git a/src/rogue/utilities/fileio/module.cpp b/src/rogue/utilities/fileio/module.cpp index 03655a773..9d1550874 100644 --- a/src/rogue/utilities/fileio/module.cpp +++ b/src/rogue/utilities/fileio/module.cpp @@ -1,14 +1,9 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module For Stream Interface * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: - * Python module setup + * Python Module For Stream Interface * ---------------------------------------------------------------------------- * This file is part of the rogue software platform. It is subject to * the license terms in the LICENSE.txt file found in the top-level directory diff --git a/src/rogue/utilities/module.cpp b/src/rogue/utilities/module.cpp index b962b2a54..b5efc6e16 100644 --- a/src/rogue/utilities/module.cpp +++ b/src/rogue/utilities/module.cpp @@ -1,11 +1,6 @@ /** - *----------------------------------------------------------------------------- - * Title : Python Module For Stream Interface * ---------------------------------------------------------------------------- - * File : module.cpp - * Author : Ryan Herbst, rherbst@slac.stanford.edu - * Created : 2016-08-08 - * Last update: 2016-08-08 + * Company : SLAC National Accelerator Laboratory * ---------------------------------------------------------------------------- * Description: * Python module setup From bbee74378a5052505e45828a7d0823058c54ec7f Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Wed, 10 Jul 2024 14:05:21 -0700 Subject: [PATCH 37/41] reran clang-format to sync up with cpplint --- = | 0 CPPLINT.cfg | 4 + include/rogue/EnableSharedFromThis.h | 4 +- include/rogue/GeneralError.h | 2 +- include/rogue/GilRelease.h | 2 +- include/rogue/Logging.h | 4 +- include/rogue/Queue.h | 4 +- include/rogue/ScopedGil.h | 2 +- include/rogue/Version.h | 2 +- include/rogue/hardware/MemMap.h | 4 +- include/rogue/hardware/axi/AxiMemMap.h | 6 +- include/rogue/hardware/axi/AxiStreamDma.h | 8 +- include/rogue/hardware/drivers/DmaDriver.h | 2 +- include/rogue/interfaces/ZmqClient.h | 8 +- include/rogue/interfaces/ZmqServer.h | 8 +- include/rogue/interfaces/api/Bsp.h | 9 +- include/rogue/interfaces/memory/Block.h | 14 +-- include/rogue/interfaces/memory/Emulate.h | 2 +- include/rogue/interfaces/memory/Hub.h | 6 +- include/rogue/interfaces/memory/Master.h | 10 +- include/rogue/interfaces/memory/Slave.h | 6 +- include/rogue/interfaces/memory/TcpClient.h | 4 +- include/rogue/interfaces/memory/TcpServer.h | 4 +- include/rogue/interfaces/memory/Transaction.h | 10 +- .../rogue/interfaces/memory/TransactionLock.h | 2 +- include/rogue/interfaces/memory/Variable.h | 6 +- include/rogue/interfaces/stream/Buffer.h | 2 +- include/rogue/interfaces/stream/Fifo.h | 2 +- include/rogue/interfaces/stream/Filter.h | 2 +- include/rogue/interfaces/stream/Frame.h | 4 +- .../rogue/interfaces/stream/FrameAccessor.h | 4 +- .../rogue/interfaces/stream/FrameIterator.h | 4 +- include/rogue/interfaces/stream/FrameLock.h | 2 +- include/rogue/interfaces/stream/Master.h | 2 +- include/rogue/interfaces/stream/Pool.h | 6 +- include/rogue/interfaces/stream/RateDrop.h | 2 +- include/rogue/interfaces/stream/Slave.h | 6 +- include/rogue/interfaces/stream/TcpClient.h | 4 +- include/rogue/interfaces/stream/TcpCore.h | 6 +- include/rogue/interfaces/stream/TcpServer.h | 4 +- include/rogue/protocols/batcher/CoreV1.h | 2 +- include/rogue/protocols/batcher/Data.h | 2 +- include/rogue/protocols/batcher/InverterV1.h | 2 +- include/rogue/protocols/batcher/SplitterV1.h | 2 +- .../rogue/protocols/packetizer/Application.h | 2 +- include/rogue/protocols/packetizer/CRC.h | 26 +++--- .../rogue/protocols/packetizer/Controller.h | 4 +- .../rogue/protocols/packetizer/ControllerV1.h | 2 +- .../rogue/protocols/packetizer/ControllerV2.h | 2 +- include/rogue/protocols/packetizer/Core.h | 2 +- include/rogue/protocols/packetizer/CoreV2.h | 2 +- .../rogue/protocols/packetizer/Transport.h | 2 +- include/rogue/protocols/rssi/Application.h | 2 +- include/rogue/protocols/rssi/Client.h | 4 +- include/rogue/protocols/rssi/Controller.h | 6 +- include/rogue/protocols/rssi/Header.h | 6 +- include/rogue/protocols/rssi/Server.h | 4 +- include/rogue/protocols/rssi/Transport.h | 2 +- include/rogue/protocols/srp/Cmd.h | 2 +- include/rogue/protocols/srp/SrpV0.h | 2 +- include/rogue/protocols/srp/SrpV3.h | 2 +- include/rogue/protocols/udp/Client.h | 4 +- include/rogue/protocols/udp/Core.h | 4 +- include/rogue/protocols/udp/Server.h | 2 +- include/rogue/protocols/xilinx/JtagDriver.h | 10 +- include/rogue/protocols/xilinx/Xvc.h | 4 +- .../rogue/protocols/xilinx/XvcConnection.h | 4 +- include/rogue/protocols/xilinx/XvcServer.h | 6 +- include/rogue/utilities/Prbs.h | 2 +- include/rogue/utilities/StreamUnZip.h | 2 +- include/rogue/utilities/StreamZip.h | 2 +- .../utilities/fileio/LegacyStreamReader.h | 4 +- .../utilities/fileio/LegacyStreamWriter.h | 4 +- include/rogue/utilities/fileio/StreamReader.h | 4 +- include/rogue/utilities/fileio/StreamWriter.h | 6 +- .../utilities/fileio/StreamWriterChannel.h | 2 +- src/rogue/GeneralError.cpp | 2 +- src/rogue/hardware/MemMap.cpp | 5 +- src/rogue/hardware/axi/AxiMemMap.cpp | 7 +- src/rogue/hardware/axi/AxiStreamDma.cpp | 21 +++-- src/rogue/interfaces/ZmqClient.cpp | 6 +- src/rogue/interfaces/ZmqServer.cpp | 10 +- src/rogue/interfaces/api/Bsp.cpp | 14 ++- src/rogue/interfaces/memory/Block.cpp | 93 +++++++++++-------- src/rogue/interfaces/memory/Emulate.cpp | 14 +-- src/rogue/interfaces/memory/Hub.cpp | 4 +- src/rogue/interfaces/memory/Master.cpp | 8 +- src/rogue/interfaces/memory/Slave.cpp | 22 +++-- src/rogue/interfaces/memory/TcpClient.cpp | 2 +- src/rogue/interfaces/memory/Transaction.cpp | 4 +- src/rogue/interfaces/memory/Variable.cpp | 59 ++++++++---- src/rogue/interfaces/stream/Frame.cpp | 16 +++- src/rogue/interfaces/stream/FrameIterator.cpp | 4 +- src/rogue/interfaces/stream/Master.cpp | 8 +- src/rogue/interfaces/stream/Pool.cpp | 4 +- src/rogue/interfaces/stream/RateDrop.cpp | 2 +- src/rogue/interfaces/stream/Slave.cpp | 8 +- src/rogue/interfaces/stream/TcpCore.cpp | 2 +- src/rogue/protocols/batcher/Data.cpp | 2 +- src/rogue/protocols/batcher/InverterV1.cpp | 2 +- src/rogue/protocols/batcher/SplitterV1.cpp | 2 +- .../protocols/packetizer/ControllerV1.cpp | 4 +- .../protocols/packetizer/ControllerV2.cpp | 4 +- src/rogue/protocols/rssi/Controller.cpp | 24 ++--- src/rogue/protocols/rssi/Server.cpp | 2 +- src/rogue/protocols/xilinx/JtagDriver.cpp | 16 +++- src/rogue/protocols/xilinx/XvcConnection.cpp | 14 ++- src/rogue/protocols/xilinx/XvcServer.cpp | 6 +- src/rogue/utilities/Prbs.cpp | 28 +++--- src/rogue/utilities/StreamUnZip.cpp | 4 +- src/rogue/utilities/StreamZip.cpp | 4 +- .../utilities/fileio/LegacyStreamReader.cpp | 4 +- src/rogue/utilities/fileio/StreamWriter.cpp | 2 +- 113 files changed, 431 insertions(+), 325 deletions(-) create mode 100644 = diff --git a/= b/= new file mode 100644 index 000000000..e69de29bb diff --git a/CPPLINT.cfg b/CPPLINT.cfg index c4d3e4dc7..6ae4030a8 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -21,6 +21,10 @@ filter=-build/include_order # E.g. from __ROGUE_UTILITIES_FILEIO_MODULE_H__ to INCLUDE_ROGUE_UTILITIES_MODULE_H_ filter=-build/header_guard +# Disable whitespace/indent check +# private/public: indent will be based on .clang-format format" +filter=-whitespace/indent + # Disable runtime/arrays # TODO: We should fix in the future filter=-runtime/arrays diff --git a/include/rogue/EnableSharedFromThis.h b/include/rogue/EnableSharedFromThis.h index 68ebcb244..7113e97ed 100644 --- a/include/rogue/EnableSharedFromThis.h +++ b/include/rogue/EnableSharedFromThis.h @@ -25,13 +25,13 @@ namespace rogue { class EnableSharedFromThisBase : public std::enable_shared_from_this { - public: + public: virtual ~EnableSharedFromThisBase() {} }; template class EnableSharedFromThis : virtual public EnableSharedFromThisBase { - public: + public: std::shared_ptr shared_from_this() { return std::dynamic_pointer_cast(EnableSharedFromThisBase::shared_from_this()); } diff --git a/include/rogue/GeneralError.h b/include/rogue/GeneralError.h index 8e509729f..c24a5a2fb 100644 --- a/include/rogue/GeneralError.h +++ b/include/rogue/GeneralError.h @@ -44,7 +44,7 @@ class GeneralError : public std::exception { char text_[BuffSize]; - public: + public: GeneralError(std::string src, std::string text); static GeneralError create(std::string src, const char* fmt, ...); diff --git a/include/rogue/GilRelease.h b/include/rogue/GilRelease.h index a8b3d5432..fe4e53764 100644 --- a/include/rogue/GilRelease.h +++ b/include/rogue/GilRelease.h @@ -31,7 +31,7 @@ class GilRelease { PyThreadState* state_; #endif - public: + public: GilRelease(); ~GilRelease(); void acquire(); diff --git a/include/rogue/Logging.h b/include/rogue/Logging.h index 5acf77757..e7a55b6c1 100644 --- a/include/rogue/Logging.h +++ b/include/rogue/Logging.h @@ -31,7 +31,7 @@ namespace rogue { //! Filter class LogFilter { - public: + public: std::string name_; uint32_t level_; @@ -60,7 +60,7 @@ class Logging { //! Logger name std::string name_; - public: + public: static const uint32_t Critical = 50; static const uint32_t Error = 40; static const uint32_t Thread = 35; diff --git a/include/rogue/Queue.h b/include/rogue/Queue.h index 109b00fd1..27680b51d 100644 --- a/include/rogue/Queue.h +++ b/include/rogue/Queue.h @@ -27,7 +27,7 @@ namespace rogue { template class Queue { - private: + private: std::queue queue_; mutable std::mutex mtx_; std::condition_variable pushCond_; @@ -37,7 +37,7 @@ class Queue { bool busy_; bool run_; - public: + public: Queue() { max_ = 0; thold_ = 0; diff --git a/include/rogue/ScopedGil.h b/include/rogue/ScopedGil.h index c1488aca3..371400de2 100644 --- a/include/rogue/ScopedGil.h +++ b/include/rogue/ScopedGil.h @@ -30,7 +30,7 @@ class ScopedGil { PyGILState_STATE state_; #endif - public: + public: ScopedGil(); ~ScopedGil(); }; diff --git a/include/rogue/Version.h b/include/rogue/Version.h index 54bb29c9f..be2fde8b3 100644 --- a/include/rogue/Version.h +++ b/include/rogue/Version.h @@ -36,7 +36,7 @@ class Version { static uint32_t _maint; static uint32_t _devel; - public: + public: Version() {} static std::string current(); diff --git a/include/rogue/hardware/MemMap.h b/include/rogue/hardware/MemMap.h index bcb314654..661d9d7cf 100644 --- a/include/rogue/hardware/MemMap.h +++ b/include/rogue/hardware/MemMap.h @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_HARDWARE_MEM_MAP_H__ #define __ROGUE_HARDWARE_MEM_MAP_H__ #include "rogue/Directives.h" @@ -60,7 +60,7 @@ class MemMap : public rogue::interfaces::memory::Slave { // Queue rogue::Queue> queue_; - public: + public: //! Class factory which returns a MemMapPtr to a newly created MemMap object /** Exposed to Python as rogue.hardware.MemMap() * @param base Base address to map diff --git a/include/rogue/hardware/axi/AxiMemMap.h b/include/rogue/hardware/axi/AxiMemMap.h index 3bb93d837..02a8df38f 100644 --- a/include/rogue/hardware/axi/AxiMemMap.h +++ b/include/rogue/hardware/axi/AxiMemMap.h @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_HARDWARE_AXI_MEM_MAP_H__ #define __ROGUE_HARDWARE_AXI_MEM_MAP_H__ #include "rogue/Directives.h" @@ -22,8 +22,8 @@ #include #include -#include #include +#include #include "rogue/Logging.h" #include "rogue/Queue.h" @@ -58,7 +58,7 @@ class AxiMemMap : public rogue::interfaces::memory::Slave { // Queue rogue::Queue> queue_; - public: + public: //! Class factory which returns a AxiMemMapPtr to a newly created AxiMemMap object /** Exposed to Python as rogue.hardware.axi.AxiMemMap() * @param path Path to device. i.e /dev/datadev_0 diff --git a/include/rogue/hardware/axi/AxiStreamDma.h b/include/rogue/hardware/axi/AxiStreamDma.h index f1714438a..4031dedbc 100644 --- a/include/rogue/hardware/axi/AxiStreamDma.h +++ b/include/rogue/hardware/axi/AxiStreamDma.h @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_HARDWARE_AXI_AXI_STREAM_DMA_H__ #define __ROGUE_HARDWARE_AXI_AXI_STREAM_DMA_H__ #include "rogue/Directives.h" @@ -22,8 +22,8 @@ #include #include -#include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Master.h" @@ -35,7 +35,7 @@ namespace axi { //! Storage class for shared memory buffers class AxiStreamDmaShared { - public: + public: explicit AxiStreamDmaShared(std::string path); //! Shared FD @@ -116,7 +116,7 @@ class AxiStreamDma : public rogue::interfaces::stream::Master, public rogue::int //! Close shared buffer space static void closeShared(std::shared_ptr); - public: + public: //! Class factory which returns a AxiStreamDmaPtr to a newly created AxiStreamDma object /** Exposed to Python as rogue.hardware.axi.AxiStreamDma() * diff --git a/include/rogue/hardware/drivers/DmaDriver.h b/include/rogue/hardware/drivers/DmaDriver.h index ba172880d..71fd6cc26 100644 --- a/include/rogue/hardware/drivers/DmaDriver.h +++ b/include/rogue/hardware/drivers/DmaDriver.h @@ -26,6 +26,7 @@ #include #else #include + #include #endif @@ -634,7 +635,6 @@ static inline ssize_t dmaGetBuffCount(int32_t fd) { return (ioctl(fd, DMA_Get_Buff_Count, 0)); } - /** * dmaGetGitVersion - Get the DMA Driver's Git Version * @fd: File descriptor to use. diff --git a/include/rogue/interfaces/ZmqClient.h b/include/rogue/interfaces/ZmqClient.h index e64c5a185..02e9ab673 100644 --- a/include/rogue/interfaces/ZmqClient.h +++ b/include/rogue/interfaces/ZmqClient.h @@ -13,14 +13,14 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_ZMQ_CLIENT_H__ #define __ROGUE_ZMQ_CLIENT_H__ #include "rogue/Directives.h" #include -#include #include +#include #include "rogue/Logging.h" @@ -56,7 +56,7 @@ class ZmqClient { void runThread(); - public: + public: static std::shared_ptr create(std::string addr, uint16_t port, bool doString); //! Setup class in python @@ -91,7 +91,7 @@ typedef std::shared_ptr ZmqClientPtr; //! Stream slave class, wrapper to enable python overload of virtual methods class ZmqClientWrap : public rogue::interfaces::ZmqClient, public boost::python::wrapper { - public: + public: ZmqClientWrap(std::string addr, uint16_t port, bool doString); void doUpdate(boost::python::object data); diff --git a/include/rogue/interfaces/ZmqServer.h b/include/rogue/interfaces/ZmqServer.h index 05a9517d6..bae9d432d 100644 --- a/include/rogue/interfaces/ZmqServer.h +++ b/include/rogue/interfaces/ZmqServer.h @@ -13,14 +13,14 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_ZMQ_SERVER_H__ #define __ROGUE_ZMQ_SERVER_H__ #include "rogue/Directives.h" #include -#include #include +#include #include "rogue/Logging.h" @@ -60,7 +60,7 @@ class ZmqServer { bool tryConnect(); - public: + public: static std::shared_ptr create(std::string addr, uint16_t port); //! Setup class in python @@ -88,7 +88,7 @@ typedef std::shared_ptr ZmqServerPtr; //! Stream slave class, wrapper to enable python overload of virtual methods class ZmqServerWrap : public rogue::interfaces::ZmqServer, public boost::python::wrapper { - public: + public: ZmqServerWrap(std::string addr, uint16_t port); boost::python::object doRequest(boost::python::object data); diff --git a/include/rogue/interfaces/api/Bsp.h b/include/rogue/interfaces/api/Bsp.h index 4fde63456..39296788e 100644 --- a/include/rogue/interfaces/api/Bsp.h +++ b/include/rogue/interfaces/api/Bsp.h @@ -13,15 +13,14 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_INTERFACE_API_BSP_H__ #define __ROGUE_INTERFACE_API_BSP_H__ #include - #include -#include #include +#include namespace rogue { namespace interfaces { @@ -29,12 +28,12 @@ namespace api { //! Bsp Class class Bsp { - protected: + protected: boost::python::object _obj; bool _isRoot; std::string _name; - public: + public: //! Class factory static std::shared_ptr create(boost::python::object obj); static std::shared_ptr create(std::string modName, std::string rootClass); diff --git a/include/rogue/interfaces/memory/Block.h b/include/rogue/interfaces/memory/Block.h index 9350397f2..5943bcef4 100644 --- a/include/rogue/interfaces/memory/Block.h +++ b/include/rogue/interfaces/memory/Block.h @@ -21,9 +21,9 @@ #include #include +#include #include #include -#include #include "rogue/interfaces/memory/Master.h" @@ -48,7 +48,9 @@ template inline boost::python::list std_vector_to_py_list(std::vector vector) { typename std::vector::iterator iter; boost::python::list list; - for (iter = vector.begin(); iter != vector.end(); ++iter) { list.append(*iter); } + for (iter = vector.begin(); iter != vector.end(); ++iter) { + list.append(*iter); + } return list; } @@ -70,7 +72,7 @@ class Variable; //! Memory interface Block device class Block : public Master { - protected: + protected: // Mutex std::mutex mtx_; @@ -163,7 +165,7 @@ class Block : public Master { // Custom cleanup function called before delete virtual void customClean(); - public: + public: //! Class factory which returns a pointer to a Block (BlockPtr) /** Exposed to Python as rogue.interfaces.memory.Block() * @@ -247,7 +249,7 @@ class Block : public Master { //! Get block python transactions flag bool blockPyTrans(); - private: + private: //! Start a c++ transaction for this block, internal version /** Start a c++ transaction with the passed type and access range * @@ -263,7 +265,7 @@ class Block : public Master { rogue::interfaces::memory::Variable* var, int32_t index); - public: + public: //! Start a c++ transaction for this block /** Start a c++ transaction with the passed type and access range * diff --git a/include/rogue/interfaces/memory/Emulate.h b/include/rogue/interfaces/memory/Emulate.h index 7a3381f99..3b1907c81 100644 --- a/include/rogue/interfaces/memory/Emulate.h +++ b/include/rogue/interfaces/memory/Emulate.h @@ -55,7 +55,7 @@ class Emulate : public Slave { //! Log std::shared_ptr log_; - public: + public: //! Class factory which returns a pointer to a Emulate (EmulatePtr) /** Exposed to Python as rogue.interfaces.memory.Emualte() * diff --git a/include/rogue/interfaces/memory/Hub.h b/include/rogue/interfaces/memory/Hub.h index 8111f75f5..ea027543c 100644 --- a/include/rogue/interfaces/memory/Hub.h +++ b/include/rogue/interfaces/memory/Hub.h @@ -23,8 +23,8 @@ #include #include -#include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/memory/Master.h" @@ -65,7 +65,7 @@ class Hub : public Master, public Slave { //! Log std::shared_ptr log_; - public: + public: //! Class factory which returns a pointer to a Hub (HubPtr) /** Exposed to Python as rogue.interfaces.memory.Hub() * @@ -168,7 +168,7 @@ typedef std::shared_ptr HubPtr; // Memory Hub class, wrapper to enable python overload of virtual methods class HubWrap : public rogue::interfaces::memory::Hub, public boost::python::wrapper { - public: + public: // Constructor HubWrap(uint64_t offset, uint32_t min, uint32_t max); diff --git a/include/rogue/interfaces/memory/Master.h b/include/rogue/interfaces/memory/Master.h index 1e89022b6..fd65c3357 100644 --- a/include/rogue/interfaces/memory/Master.h +++ b/include/rogue/interfaces/memory/Master.h @@ -22,9 +22,9 @@ #include #include +#include #include #include -#include #include "rogue/Logging.h" @@ -48,7 +48,7 @@ class Transaction; class Master { friend class Transaction; - private: + private: //! Alias for map typedef std::map > TransactionMap; @@ -70,7 +70,7 @@ class Master { //! Log std::shared_ptr log_; - public: + public: //! Class factory which returns a pointer to a Master (MasterPtr) /** Exposed as rogue.interfaces.memory.Master() to Python */ @@ -284,11 +284,11 @@ class Master { std::shared_ptr& operator>>( std::shared_ptr& other); - protected: + protected: //! Internal transaction uint32_t intTransaction(std::shared_ptr tran); - public: + public: //! Wait for one or more transactions to complete /** This method is called to wait on transaction completion or timeout. * Passing an id of zero will wait for all current pending transactions to diff --git a/include/rogue/interfaces/memory/Slave.h b/include/rogue/interfaces/memory/Slave.h index d6e567393..111e22d47 100644 --- a/include/rogue/interfaces/memory/Slave.h +++ b/include/rogue/interfaces/memory/Slave.h @@ -22,8 +22,8 @@ #include #include -#include #include +#include #include "rogue/EnableSharedFromThis.h" #include "rogue/interfaces/memory/Master.h" @@ -76,7 +76,7 @@ class Slave : public rogue::EnableSharedFromThis SlavePtr; // Memory slave class, wrapper to enable python overload of virtual methods class SlaveWrap : public rogue::interfaces::memory::Slave, public boost::python::wrapper { - public: + public: // Constructor SlaveWrap(uint32_t min, uint32_t max); diff --git a/include/rogue/interfaces/memory/TcpClient.h b/include/rogue/interfaces/memory/TcpClient.h index f13b232ba..1870c7cb9 100644 --- a/include/rogue/interfaces/memory/TcpClient.h +++ b/include/rogue/interfaces/memory/TcpClient.h @@ -21,8 +21,8 @@ #include #include -#include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/memory/Slave.h" @@ -70,7 +70,7 @@ class TcpClient : public rogue::interfaces::memory::Slave { // Lock std::mutex bridgeMtx_; - public: + public: //! Create a TcpClient object and return as a TcpServerPtr /**The creator takes an address and port. The passed address is the address of * the remote TcpServer to connect to, and can either be an IP address or hostname. diff --git a/include/rogue/interfaces/memory/TcpServer.h b/include/rogue/interfaces/memory/TcpServer.h index b3e6f5335..d2194d05f 100644 --- a/include/rogue/interfaces/memory/TcpServer.h +++ b/include/rogue/interfaces/memory/TcpServer.h @@ -21,8 +21,8 @@ #include #include -#include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/memory/Master.h" @@ -64,7 +64,7 @@ class TcpServer : public rogue::interfaces::memory::Master { std::thread* thread_; bool threadEn_; - public: + public: //! Create a TcpServer object and return as a TcpServerPtr /**The creator takes an address and port. The passed address can either be * an IP address or hostname. The address string defines which network interface diff --git a/include/rogue/interfaces/memory/Transaction.h b/include/rogue/interfaces/memory/Transaction.h index 6c99a263f..a8f5c8634 100644 --- a/include/rogue/interfaces/memory/Transaction.h +++ b/include/rogue/interfaces/memory/Transaction.h @@ -24,8 +24,8 @@ #include #include #include -#include #include +#include #include "rogue/EnableSharedFromThis.h" #include "rogue/Logging.h" @@ -59,11 +59,11 @@ class Transaction : public rogue::EnableSharedFromThis tran_; bool locked_; - public: + public: // Class factory which returns a pointer to a TransactionLock (TransactionLockPtr) static std::shared_ptr create( std::shared_ptr transaction); diff --git a/include/rogue/interfaces/memory/Variable.h b/include/rogue/interfaces/memory/Variable.h index bef3eec76..cd335e39a 100644 --- a/include/rogue/interfaces/memory/Variable.h +++ b/include/rogue/interfaces/memory/Variable.h @@ -46,7 +46,7 @@ typedef std::shared_ptr VariablePtr; class Variable { friend class Block; - protected: + protected: // Associated block rogue::interfaces::memory::Block* block_; @@ -240,7 +240,7 @@ class Variable { double (rogue::interfaces::memory::Block::*getFixed_)(rogue::interfaces::memory::Variable*, int32_t index); - public: + public: //! Class factory which returns a pointer to a Variable (VariablePtr) /** Exposed to Python as rogue.interfaces.memory.Variable() * @@ -554,7 +554,7 @@ class VariableWrap : public rogue::interfaces::memory::Variable, public boost::python::wrapper { boost::python::object model_; - public: + public: // Create a Variable VariableWrap(std::string name, std::string mode, diff --git a/include/rogue/interfaces/stream/Buffer.h b/include/rogue/interfaces/stream/Buffer.h index 302339d2e..0ebe0d823 100644 --- a/include/rogue/interfaces/stream/Buffer.h +++ b/include/rogue/interfaces/stream/Buffer.h @@ -73,7 +73,7 @@ class Buffer { // Error state uint32_t error_; - public: + public: //! Alias for using uint8_t * as Buffer::iterator typedef uint8_t* iterator; diff --git a/include/rogue/interfaces/stream/Fifo.h b/include/rogue/interfaces/stream/Fifo.h index 9a8d96669..cc19038a5 100644 --- a/include/rogue/interfaces/stream/Fifo.h +++ b/include/rogue/interfaces/stream/Fifo.h @@ -66,7 +66,7 @@ class Fifo : public rogue::interfaces::stream::Master, public rogue::interfaces: // Thread background void runThread(); - public: + public: //! Create a Fifo object and return as a FifoPtr /** Exposed as rogue.interfaces.stream.Fifo() to Python * @param maxDepth Set to a non-zero value to configured fixed size mode. diff --git a/include/rogue/interfaces/stream/Filter.h b/include/rogue/interfaces/stream/Filter.h index 863af9629..5e883236b 100644 --- a/include/rogue/interfaces/stream/Filter.h +++ b/include/rogue/interfaces/stream/Filter.h @@ -45,7 +45,7 @@ class Filter : public rogue::interfaces::stream::Master, public rogue::interface bool dropErrors_; uint8_t channel_; - public: + public: //! Create a Filter object and return as a FilterPtr /** @param dropErrors Set to True to drop errored Frames * @param channel Set channel number to allow through the filter. diff --git a/include/rogue/interfaces/stream/Frame.h b/include/rogue/interfaces/stream/Frame.h index 7f27e69b7..a1598a7d6 100644 --- a/include/rogue/interfaces/stream/Frame.h +++ b/include/rogue/interfaces/stream/Frame.h @@ -77,14 +77,14 @@ class Frame : public rogue::EnableSharedFromThis >::iterator as Buffer::iterator typedef std::vector >::iterator BufferIterator; diff --git a/include/rogue/interfaces/stream/FrameAccessor.h b/include/rogue/interfaces/stream/FrameAccessor.h index 090f54577..e457bb638 100644 --- a/include/rogue/interfaces/stream/FrameAccessor.h +++ b/include/rogue/interfaces/stream/FrameAccessor.h @@ -33,14 +33,14 @@ namespace stream { //! Frame Accessor template class FrameAccessor { - private: + private: // Data container T* data_; // Size value uint32_t size_; - public: + public: //! Creator FrameAccessor(rogue::interfaces::stream::FrameIterator& iter, uint32_t size) { data_ = reinterpret_cast(iter.ptr()); diff --git a/include/rogue/interfaces/stream/FrameIterator.h b/include/rogue/interfaces/stream/FrameIterator.h index cd04a665e..896e3af32 100644 --- a/include/rogue/interfaces/stream/FrameIterator.h +++ b/include/rogue/interfaces/stream/FrameIterator.h @@ -40,7 +40,7 @@ class Buffer; class FrameIterator : public std::iterator { friend class Frame; - private: + private: // Creator FrameIterator(std::shared_ptr frame, bool write, bool end); @@ -74,7 +74,7 @@ class FrameIterator : public std::iterator frame_; bool locked_; - public: + public: // Class factory which returns a pointer to a FrameLock (FrameLockPtr) /* Only called by Frame object. * Create a new Frame lock on the passed Frame. diff --git a/include/rogue/interfaces/stream/Master.h b/include/rogue/interfaces/stream/Master.h index 0c6788533..f64316074 100644 --- a/include/rogue/interfaces/stream/Master.h +++ b/include/rogue/interfaces/stream/Master.h @@ -55,7 +55,7 @@ class Master : public rogue::EnableSharedFromThis defSlave_; - public: + public: //! Class factory which returns a pointer to a Master object (MasterPtr) /** Create a new Master * diff --git a/include/rogue/interfaces/stream/Pool.h b/include/rogue/interfaces/stream/Pool.h index 54a2a0ffa..0f037ea3b 100644 --- a/include/rogue/interfaces/stream/Pool.h +++ b/include/rogue/interfaces/stream/Pool.h @@ -21,8 +21,8 @@ #include #include -#include #include +#include #include "rogue/EnableSharedFromThis.h" #include "rogue/Queue.h" @@ -71,7 +71,7 @@ class Pool : public rogue::EnableSharedFromThis // Buffer queue count uint32_t poolSize_; - public: + public: // Class creator Pool(); @@ -152,7 +152,7 @@ class Pool : public rogue::EnableSharedFromThis */ uint32_t getPoolSize(); - protected: + protected: //! Allocate and Create a Buffer /** This method is the default Buffer allocator. The requested * buffer is created from either a malloc call or fulling a free entry from diff --git a/include/rogue/interfaces/stream/RateDrop.h b/include/rogue/interfaces/stream/RateDrop.h index 9d11a0b41..b3c5d42dc 100644 --- a/include/rogue/interfaces/stream/RateDrop.h +++ b/include/rogue/interfaces/stream/RateDrop.h @@ -49,7 +49,7 @@ class RateDrop : public rogue::interfaces::stream::Master, public rogue::interfa struct timeval nextPeriod_; - public: + public: //! Create a RateDrop object and return as a RateDropPtr /** @param period Set to true to define the parameter as a period value. * @param value Period value or drop count diff --git a/include/rogue/interfaces/stream/Slave.h b/include/rogue/interfaces/stream/Slave.h index 88d6d9e76..09ecd55b0 100644 --- a/include/rogue/interfaces/stream/Slave.h +++ b/include/rogue/interfaces/stream/Slave.h @@ -21,8 +21,8 @@ #include #include -#include #include +#include #include "rogue/EnableSharedFromThis.h" #include "rogue/Logging.h" @@ -58,7 +58,7 @@ class Slave : public rogue::interfaces::stream::Pool, uint64_t frameCount_; uint64_t frameBytes_; - public: + public: //! Class factory which returns a pointer to a Slave (SlavePtr) /** Create a new Slave * @@ -166,7 +166,7 @@ typedef std::shared_ptr SlavePtr; // Stream slave class, wrapper to enable python overload of virtual methods class SlaveWrap : public rogue::interfaces::stream::Slave, public boost::python::wrapper { - public: + public: // Accept frame void acceptFrame(std::shared_ptr frame); diff --git a/include/rogue/interfaces/stream/TcpClient.h b/include/rogue/interfaces/stream/TcpClient.h index d7d635d11..69056134d 100644 --- a/include/rogue/interfaces/stream/TcpClient.h +++ b/include/rogue/interfaces/stream/TcpClient.h @@ -21,8 +21,8 @@ #include #include -#include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Frame.h" @@ -38,7 +38,7 @@ namespace stream { /** This class is a wrapper around TcpCore which operates in client mode. */ class TcpClient : public rogue::interfaces::stream::TcpCore { - public: + public: //! Create a TcpClient object and return as a TcpClientPtr /**The creator takes an address and port. The passed server address can either * be an IP address or hostname. The stream bridge requires two TCP ports. diff --git a/include/rogue/interfaces/stream/TcpCore.h b/include/rogue/interfaces/stream/TcpCore.h index 8dcc56340..53a89e4a0 100644 --- a/include/rogue/interfaces/stream/TcpCore.h +++ b/include/rogue/interfaces/stream/TcpCore.h @@ -21,8 +21,8 @@ #include #include -#include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Frame.h" @@ -46,7 +46,7 @@ namespace stream { * utilized when a connection has been established. */ class TcpCore : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave { - protected: + protected: // Inbound Address std::string pullAddr_; @@ -75,7 +75,7 @@ class TcpCore : public rogue::interfaces::stream::Master, public rogue::interfac // Lock std::mutex bridgeMtx_; - public: + public: //! Create a TcpCore object and return as a TcpCorePtr /**The creator takes an address, port and server mode flag. The passed * address can either be an IP address or hostname. When running in server diff --git a/include/rogue/interfaces/stream/TcpServer.h b/include/rogue/interfaces/stream/TcpServer.h index f1a8ce844..06fc498b3 100644 --- a/include/rogue/interfaces/stream/TcpServer.h +++ b/include/rogue/interfaces/stream/TcpServer.h @@ -21,8 +21,8 @@ #include #include -#include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Frame.h" @@ -38,7 +38,7 @@ namespace stream { /** This class is a wrapper around TcpCore which operates in server mode. */ class TcpServer : public rogue::interfaces::stream::TcpCore { - public: + public: //! Create a TcpServer object and return as a TcpServerPtr /**The creator takes an address and port. The passed address can either be * an IP address or hostname. The address string defines which network interface diff --git a/include/rogue/protocols/batcher/CoreV1.h b/include/rogue/protocols/batcher/CoreV1.h index b4bb79711..d75b46e63 100644 --- a/include/rogue/protocols/batcher/CoreV1.h +++ b/include/rogue/protocols/batcher/CoreV1.h @@ -55,7 +55,7 @@ class CoreV1 { //! Sequence number uint32_t seq_; - public: + public: //! Setup class in python static void setup_python(); diff --git a/include/rogue/protocols/batcher/Data.h b/include/rogue/protocols/batcher/Data.h index 79a461253..630576479 100644 --- a/include/rogue/protocols/batcher/Data.h +++ b/include/rogue/protocols/batcher/Data.h @@ -47,7 +47,7 @@ class Data { //! Last user uint8_t lUser_; - public: + public: //! Setup class in python static void setup_python(); diff --git a/include/rogue/protocols/batcher/InverterV1.h b/include/rogue/protocols/batcher/InverterV1.h index 55a4984a2..ddeff44df 100644 --- a/include/rogue/protocols/batcher/InverterV1.h +++ b/include/rogue/protocols/batcher/InverterV1.h @@ -33,7 +33,7 @@ namespace batcher { //! AXI Stream FIFO class InverterV1 : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave { - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/batcher/SplitterV1.h b/include/rogue/protocols/batcher/SplitterV1.h index 6ea0a922a..41d1f063d 100644 --- a/include/rogue/protocols/batcher/SplitterV1.h +++ b/include/rogue/protocols/batcher/SplitterV1.h @@ -33,7 +33,7 @@ namespace batcher { //! AXI Stream FIFO class SplitterV1 : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave { - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/packetizer/Application.h b/include/rogue/protocols/packetizer/Application.h index 5c11bae6b..ad80ea2a8 100644 --- a/include/rogue/protocols/packetizer/Application.h +++ b/include/rogue/protocols/packetizer/Application.h @@ -50,7 +50,7 @@ class Application : public rogue::interfaces::stream::Master, public rogue::inte // Application queue rogue::Queue> queue_; - public: + public: //! Class creation static std::shared_ptr create(uint8_t id); diff --git a/include/rogue/protocols/packetizer/CRC.h b/include/rogue/protocols/packetizer/CRC.h index d28cfdfb7..e9862039d 100644 --- a/include/rogue/protocols/packetizer/CRC.h +++ b/include/rogue/protocols/packetizer/CRC.h @@ -139,7 +139,7 @@ namespace CRCPP { performed at compile-time instead of at runtime. */ class CRC { - public: + public: // Forward declaration template struct Table; @@ -165,10 +165,10 @@ class CRC { template struct Table { // Constructors are intentionally NOT marked explicit. - Table(const Parameters& parameters); //NOLINT + Table(const Parameters& parameters); // NOLINT #ifdef CRCPP_USE_CPP11 - Table(Parameters&& parameters); //NOLINT + Table(Parameters&& parameters); // NOLINT #endif const Parameters& GetParameters() const; @@ -177,7 +177,7 @@ class CRC { CRCType operator[](unsigned char index) const; - private: + private: void InitTable(); Parameters parameters; ///< CRC parameters used to construct the table @@ -273,14 +273,14 @@ class CRC { #endif #ifdef CRCPP_USE_CPP11 - CRC() = delete; - CRC(const CRC& other) = delete; + CRC() = delete; + CRC(const CRC& other) = delete; CRC& operator=(const CRC& other) = delete; CRC(CRC&& other) = delete; - CRC& operator=(CRC&& other) = delete; + CRC& operator=(CRC&& other) = delete; #endif - private: + private: #ifndef CRCPP_USE_CPP11 CRC(); CRC(const CRC& other); @@ -553,7 +553,9 @@ inline CRCType CRC::Finalize(CRCType remainder, CRCType finalXOR, bool reflectOu static crcpp_constexpr CRCType BIT_MASK = (CRCType(1) << (CRCWidth - CRCType(1))) | ((CRCType(1) << (CRCWidth - CRCType(1))) - CRCType(1)); - if (reflectOutput) { remainder = Reflect(remainder, CRCWidth); } + if (reflectOutput) { + remainder = Reflect(remainder, CRCWidth); + } return (remainder ^ finalXOR) & BIT_MASK; } @@ -583,7 +585,9 @@ inline CRCType CRC::UndoFinalize(CRCType crc, CRCType finalXOR, bool reflectOutp crc = (crc & BIT_MASK) ^ finalXOR; - if (reflectOutput) { crc = Reflect(crc, CRCWidth); } + if (reflectOutput) { + crc = Reflect(crc, CRCWidth); + } return crc; } @@ -1658,7 +1662,7 @@ inline const CRC::Parameters& CRC::CRC_64() { #endif // CRCPP_INCLUDE_ESOTERIC_CRC_DEFINITIONS #ifdef CRCPP_USE_NAMESPACE -} //NOLINT +} // NOLINT #endif #endif // CRCPP_CRC_H_ diff --git a/include/rogue/protocols/packetizer/Controller.h b/include/rogue/protocols/packetizer/Controller.h index 4a467741f..780ab098c 100644 --- a/include/rogue/protocols/packetizer/Controller.h +++ b/include/rogue/protocols/packetizer/Controller.h @@ -37,7 +37,7 @@ class Header; //! Packetizer Controller Class class Controller { - protected: + protected: // parameters bool enSsi_; uint32_t appIndex_; @@ -65,7 +65,7 @@ class Controller { rogue::Queue> tranQueue_; - public: + public: //! Creator Controller(std::shared_ptr tran, std::shared_ptr* app, diff --git a/include/rogue/protocols/packetizer/ControllerV1.h b/include/rogue/protocols/packetizer/ControllerV1.h index daf129bf1..334d123f7 100644 --- a/include/rogue/protocols/packetizer/ControllerV1.h +++ b/include/rogue/protocols/packetizer/ControllerV1.h @@ -39,7 +39,7 @@ class Header; //! Packetizer Controller Class class ControllerV1 : public Controller, public rogue::EnableSharedFromThis { - public: + public: //! Class creation static std::shared_ptr create( bool enSsi, diff --git a/include/rogue/protocols/packetizer/ControllerV2.h b/include/rogue/protocols/packetizer/ControllerV2.h index a78231c5d..7fc158774 100644 --- a/include/rogue/protocols/packetizer/ControllerV2.h +++ b/include/rogue/protocols/packetizer/ControllerV2.h @@ -42,7 +42,7 @@ class ControllerV2 : public Controller, public rogue::EnableSharedFromThis create( bool enIbCrc, diff --git a/include/rogue/protocols/packetizer/Core.h b/include/rogue/protocols/packetizer/Core.h index 78e03e755..a75cb1465 100644 --- a/include/rogue/protocols/packetizer/Core.h +++ b/include/rogue/protocols/packetizer/Core.h @@ -42,7 +42,7 @@ class Core { //! Core module std::shared_ptr cntl_; - public: + public: //! Class creation static std::shared_ptr create(bool enSsi); diff --git a/include/rogue/protocols/packetizer/CoreV2.h b/include/rogue/protocols/packetizer/CoreV2.h index aa1218efd..04d3f1aad 100644 --- a/include/rogue/protocols/packetizer/CoreV2.h +++ b/include/rogue/protocols/packetizer/CoreV2.h @@ -42,7 +42,7 @@ class CoreV2 { //! Core module std::shared_ptr cntl_; - public: + public: //! Class creation static std::shared_ptr create(bool enIbCrc, bool enObCrc, bool enSsi); diff --git a/include/rogue/protocols/packetizer/Transport.h b/include/rogue/protocols/packetizer/Transport.h index 8f243e3c3..a771bfaaf 100644 --- a/include/rogue/protocols/packetizer/Transport.h +++ b/include/rogue/protocols/packetizer/Transport.h @@ -43,7 +43,7 @@ class Transport : public rogue::interfaces::stream::Master, public rogue::interf //! Thread background void runThread(); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/rssi/Application.h b/include/rogue/protocols/rssi/Application.h index 8f71e8538..8253c6666 100644 --- a/include/rogue/protocols/rssi/Application.h +++ b/include/rogue/protocols/rssi/Application.h @@ -43,7 +43,7 @@ class Application : public rogue::interfaces::stream::Master, public rogue::inte //! Thread background void runThread(); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/rssi/Client.h b/include/rogue/protocols/rssi/Client.h index d87a89d49..f84185e8d 100644 --- a/include/rogue/protocols/rssi/Client.h +++ b/include/rogue/protocols/rssi/Client.h @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_PROTOCOLS_RSSI_CLIENT_H__ #define __ROGUE_PROTOCOLS_RSSI_CLIENT_H__ #include "rogue/Directives.h" @@ -42,7 +42,7 @@ class Client { //! Client module std::shared_ptr cntl_; - public: + public: //! Class creation static std::shared_ptr create(uint32_t segSize); diff --git a/include/rogue/protocols/rssi/Controller.h b/include/rogue/protocols/rssi/Controller.h index 00655a342..5c50a9114 100644 --- a/include/rogue/protocols/rssi/Controller.h +++ b/include/rogue/protocols/rssi/Controller.h @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_PROTOCOLS_RSSI_CONTROLLER_H__ #define __ROGUE_PROTOCOLS_RSSI_CONTROLLER_H__ #include "rogue/Directives.h" @@ -132,7 +132,7 @@ class Controller : public rogue::EnableSharedFromThis create( uint32_t segSize, @@ -231,7 +231,7 @@ class Controller : public rogue::EnableSharedFromThis head, bool seqUpdate, bool txReset); diff --git a/include/rogue/protocols/rssi/Header.h b/include/rogue/protocols/rssi/Header.h index dab16314b..5421d062c 100644 --- a/include/rogue/protocols/rssi/Header.h +++ b/include/rogue/protocols/rssi/Header.h @@ -46,12 +46,12 @@ class Header { //! compute checksum uint16_t compSum(uint8_t* data, uint8_t size); - public: + public: //! Header Size static const int32_t HeaderSize = 8; static const uint32_t SynSize = 24; - private: + private: //! Frame pointer std::shared_ptr frame_; @@ -61,7 +61,7 @@ class Header { //! Transmit count uint32_t count_; - public: + public: //! Create static std::shared_ptr create( std::shared_ptr frame); diff --git a/include/rogue/protocols/rssi/Server.h b/include/rogue/protocols/rssi/Server.h index 0543bf17d..f2236ab70 100644 --- a/include/rogue/protocols/rssi/Server.h +++ b/include/rogue/protocols/rssi/Server.h @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_PROTOCOLS_RSSI_SERVER_H__ #define __ROGUE_PROTOCOLS_RSSI_SERVER_H__ #include "rogue/Directives.h" @@ -42,7 +42,7 @@ class Server { //! Server module std::shared_ptr cntl_; - public: + public: //! Class creation static std::shared_ptr create(uint32_t segSize); diff --git a/include/rogue/protocols/rssi/Transport.h b/include/rogue/protocols/rssi/Transport.h index 82755dfee..2e477f545 100644 --- a/include/rogue/protocols/rssi/Transport.h +++ b/include/rogue/protocols/rssi/Transport.h @@ -37,7 +37,7 @@ class Transport : public rogue::interfaces::stream::Master, public rogue::interf //! Core module std::shared_ptr cntl_; - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/srp/Cmd.h b/include/rogue/protocols/srp/Cmd.h index d8bdb7b48..1b7618e03 100644 --- a/include/rogue/protocols/srp/Cmd.h +++ b/include/rogue/protocols/srp/Cmd.h @@ -35,7 +35,7 @@ namespace srp { * carnying the SRP protocol. */ class Cmd : public rogue::interfaces::stream::Master { - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/srp/SrpV0.h b/include/rogue/protocols/srp/SrpV0.h index d1a32f84a..63783b3b3 100644 --- a/include/rogue/protocols/srp/SrpV0.h +++ b/include/rogue/protocols/srp/SrpV0.h @@ -55,7 +55,7 @@ class SrpV0 : public rogue::interfaces::stream::Master, uint32_t& frameLen, bool tx); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/srp/SrpV3.h b/include/rogue/protocols/srp/SrpV3.h index c6a60413f..ce5fc4045 100644 --- a/include/rogue/protocols/srp/SrpV3.h +++ b/include/rogue/protocols/srp/SrpV3.h @@ -53,7 +53,7 @@ class SrpV3 : public rogue::interfaces::stream::Master, uint32_t& frameLen, bool tx); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/protocols/udp/Client.h b/include/rogue/protocols/udp/Client.h index 4b0f3ed60..c4715abae 100644 --- a/include/rogue/protocols/udp/Client.h +++ b/include/rogue/protocols/udp/Client.h @@ -25,8 +25,8 @@ #include #include -#include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Master.h" @@ -49,7 +49,7 @@ class Client : public rogue::protocols::udp::Core, //! Thread background void runThread(std::weak_ptr); - public: + public: //! Class creation static std::shared_ptr create(std::string host, uint16_t port, bool jumbo); diff --git a/include/rogue/protocols/udp/Core.h b/include/rogue/protocols/udp/Core.h index a6e201e52..edce206ad 100644 --- a/include/rogue/protocols/udp/Core.h +++ b/include/rogue/protocols/udp/Core.h @@ -43,7 +43,7 @@ const uint32_t MaxStdPayload = StdMTU - HdrSize; //! UDP Core class Core { - protected: + protected: std::shared_ptr udpLog_; //! Jumbo frames enables @@ -64,7 +64,7 @@ class Core { //! mutex std::mutex udpMtx_; - public: + public: //! Setup class in python static void setup_python(); diff --git a/include/rogue/protocols/udp/Server.h b/include/rogue/protocols/udp/Server.h index 38794cd64..4371f97fe 100644 --- a/include/rogue/protocols/udp/Server.h +++ b/include/rogue/protocols/udp/Server.h @@ -49,7 +49,7 @@ class Server : public rogue::protocols::udp::Core, //! Thread background void runThread(std::weak_ptr); - public: + public: //! Class creation static std::shared_ptr create(uint16_t port, bool jumbo); diff --git a/include/rogue/protocols/xilinx/JtagDriver.h b/include/rogue/protocols/xilinx/JtagDriver.h index 21604c2d5..cecb8c5c6 100644 --- a/include/rogue/protocols/xilinx/JtagDriver.h +++ b/include/rogue/protocols/xilinx/JtagDriver.h @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_PROTOCOLS_XILINX_JTAG_DRIVER_H__ #define __ROGUE_PROTOCOLS_XILINX_JTAG_DRIVER_H__ @@ -70,7 +70,7 @@ namespace xilinx { // If a timeout occurs then 'xfer' must throw a TimeoutErr(). // class JtagDriver { - protected: + protected: //! Remote port number uint16_t port_; @@ -87,7 +87,7 @@ class JtagDriver { // Log std::shared_ptr log_; - private: + private: unsigned wordSize_; unsigned memDepth_; @@ -108,7 +108,7 @@ class JtagDriver { virtual void setHdr(uint8_t* buf, Header hdr); - protected: + protected: static Header getHdr(uint8_t* buf); static const Header PVERS = 0x00000000; @@ -162,7 +162,7 @@ class JtagDriver { virtual unsigned getMemDepth(); virtual uint32_t getPeriodNs(); - public: + public: //! Class creation static std::shared_ptr create(uint16_t port); diff --git a/include/rogue/protocols/xilinx/Xvc.h b/include/rogue/protocols/xilinx/Xvc.h index cd87fae85..f87649205 100644 --- a/include/rogue/protocols/xilinx/Xvc.h +++ b/include/rogue/protocols/xilinx/Xvc.h @@ -44,7 +44,7 @@ const unsigned int kMaxArgs = 3; class Xvc : public rogue::interfaces::stream::Master, public rogue::interfaces::stream::Slave, public rogue::protocols::xilinx::JtagDriver { - protected: + protected: unsigned mtu_; // Use rogue frames to exchange data with other rogue objects @@ -63,7 +63,7 @@ class Xvc : public rogue::interfaces::stream::Master, // TCP server for Vivado client void runThread(); - public: + public: //! Class creation static std::shared_ptr create(uint16_t port); diff --git a/include/rogue/protocols/xilinx/XvcConnection.h b/include/rogue/protocols/xilinx/XvcConnection.h index 673a1e3af..831410083 100644 --- a/include/rogue/protocols/xilinx/XvcConnection.h +++ b/include/rogue/protocols/xilinx/XvcConnection.h @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_PROTOCOLS_XILINX_XVC_CONNECTION_H__ #define __ROGUE_PROTOCOLS_XILINX_XVC_CONNECTION_H__ @@ -50,7 +50,7 @@ class XvcConnection { uint64_t supVecLen_; uint64_t chunk_; - public: + public: XvcConnection(int sd, JtagDriver* drv, uint64_t maxVecLen_ = 32768); // fill rx buffer to 'n' octets (from TCP connection) diff --git a/include/rogue/protocols/xilinx/XvcServer.h b/include/rogue/protocols/xilinx/XvcServer.h index 4277c9252..a14e89ad6 100644 --- a/include/rogue/protocols/xilinx/XvcServer.h +++ b/include/rogue/protocols/xilinx/XvcServer.h @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #ifndef __ROGUE_PROTOCOLS_XILINX_XVC_SERVER_H__ #define __ROGUE_PROTOCOLS_XILINX_XVC_SERVER_H__ @@ -28,12 +28,12 @@ namespace protocols { namespace xilinx { // XVC Server (top) class class XvcServer { - private: + private: int sd_; JtagDriver* drv_; unsigned maxMsgSize_; - public: + public: XvcServer(uint16_t port, JtagDriver* drv, unsigned maxMsgSize = 32768); virtual void run(bool& threadEn, rogue::LoggingPtr log); diff --git a/include/rogue/utilities/Prbs.h b/include/rogue/utilities/Prbs.h index 86d4a5842..b5a87d68e 100644 --- a/include/rogue/utilities/Prbs.h +++ b/include/rogue/utilities/Prbs.h @@ -124,7 +124,7 @@ class Prbs : public rogue::interfaces::stream::Slave, public rogue::interfaces:: static double updateTime(struct timeval* last); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/StreamUnZip.h b/include/rogue/utilities/StreamUnZip.h index 93d6a3bb4..b6126ffc0 100644 --- a/include/rogue/utilities/StreamUnZip.h +++ b/include/rogue/utilities/StreamUnZip.h @@ -31,7 +31,7 @@ namespace utilities { //! Stream compressor class StreamUnZip : public rogue::interfaces::stream::Slave, public rogue::interfaces::stream::Master { - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/StreamZip.h b/include/rogue/utilities/StreamZip.h index c77cd12c6..8774dddec 100644 --- a/include/rogue/utilities/StreamZip.h +++ b/include/rogue/utilities/StreamZip.h @@ -30,7 +30,7 @@ namespace utilities { //! Stream compressor class StreamZip : public rogue::interfaces::stream::Slave, public rogue::interfaces::stream::Master { - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/fileio/LegacyStreamReader.h b/include/rogue/utilities/fileio/LegacyStreamReader.h index 626332cba..46aa47a6f 100644 --- a/include/rogue/utilities/fileio/LegacyStreamReader.h +++ b/include/rogue/utilities/fileio/LegacyStreamReader.h @@ -23,8 +23,8 @@ #include #include #include -#include #include +#include #include "rogue/interfaces/stream/Master.h" @@ -65,7 +65,7 @@ class LegacyStreamReader : public rogue::interfaces::stream::Master { //! Active lock std::mutex mtx_; - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/fileio/LegacyStreamWriter.h b/include/rogue/utilities/fileio/LegacyStreamWriter.h index a6c5751d4..5a146e58e 100644 --- a/include/rogue/utilities/fileio/LegacyStreamWriter.h +++ b/include/rogue/utilities/fileio/LegacyStreamWriter.h @@ -41,11 +41,11 @@ class StreamWriterChannel; //! Stream writer central class class LegacyStreamWriter : public StreamWriter { - protected: + protected: //! Write data to file. Called from StreamWriterChannel virtual void writeFile(uint8_t channel, std::shared_ptr frame); - public: + public: // Data types. // Count is n*32bits for type = 0, byte count for all others enum DataType { diff --git a/include/rogue/utilities/fileio/StreamReader.h b/include/rogue/utilities/fileio/StreamReader.h index fa21ff2e3..a8653b076 100644 --- a/include/rogue/utilities/fileio/StreamReader.h +++ b/include/rogue/utilities/fileio/StreamReader.h @@ -24,8 +24,8 @@ #include #include #include -#include #include +#include #include "rogue/interfaces/stream/Master.h" @@ -66,7 +66,7 @@ class StreamReader : public rogue::interfaces::stream::Master { //! Active lock std::mutex mtx_; - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/fileio/StreamWriter.h b/include/rogue/utilities/fileio/StreamWriter.h index f6ceac01a..a7680fdb1 100644 --- a/include/rogue/utilities/fileio/StreamWriter.h +++ b/include/rogue/utilities/fileio/StreamWriter.h @@ -38,8 +38,8 @@ #include #include #include -#include #include +#include #include "rogue/EnableSharedFromThis.h" #include "rogue/Logging.h" @@ -55,7 +55,7 @@ class StreamWriterChannel; class StreamWriter : public rogue::EnableSharedFromThis { friend class StreamWriterChannel; - protected: + protected: // Log std::shared_ptr log_; @@ -115,7 +115,7 @@ class StreamWriter : public rogue::EnableSharedFromThis frame); - public: + public: //! Class creation static std::shared_ptr create(); diff --git a/include/rogue/utilities/fileio/StreamWriterChannel.h b/include/rogue/utilities/fileio/StreamWriterChannel.h index 4ce9a143c..cd456413d 100644 --- a/include/rogue/utilities/fileio/StreamWriterChannel.h +++ b/include/rogue/utilities/fileio/StreamWriterChannel.h @@ -50,7 +50,7 @@ class StreamWriterChannel : public rogue::interfaces::stream::Slave { //! Condition variable for frameCount_ updates std::condition_variable cond_; - public: + public: //! Class creation static std::shared_ptr create( std::shared_ptr writer, diff --git a/src/rogue/GeneralError.cpp b/src/rogue/GeneralError.cpp index 015677844..aa349c417 100644 --- a/src/rogue/GeneralError.cpp +++ b/src/rogue/GeneralError.cpp @@ -52,7 +52,7 @@ void rogue::GeneralError::setup_python() { bp::class_("GeneralError", bp::init()); - PyObject* typeObj = PyErr_NewException(const_cast("rogue.GeneralError"), PyExc_Exception, 0); + PyObject* typeObj = PyErr_NewException(const_cast("rogue.GeneralError"), PyExc_Exception, 0); bp::scope().attr("GeneralError") = bp::handle<>(bp::borrowed(typeObj)); rogue::generalErrorObj = typeObj; diff --git a/src/rogue/hardware/MemMap.cpp b/src/rogue/hardware/MemMap.cpp index aa9bcaaf8..33fe8c8d1 100644 --- a/src/rogue/hardware/MemMap.cpp +++ b/src/rogue/hardware/MemMap.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/Directives.h" #include "rogue/hardware/MemMap.h" @@ -60,7 +60,8 @@ rh::MemMap::MemMap(uint64_t base, uint32_t size) : rim::Slave(4, 0xFFFFFFFF) { if (fd_ < 0) throw(rogue::GeneralError::create("MemMap::MemMap", "Failed to open device file: %s", MAP_DEVICE)); - if ((map_ = reinterpret_cast(mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_, base))) == reinterpret_cast(-1)) + if ((map_ = reinterpret_cast(mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd_, base))) == + reinterpret_cast(-1)) throw(rogue::GeneralError::create("MemMap::MemMap", "Failed to map memory to user space.")); log_->debug("Created map to 0x%" PRIx64 " with size 0x%" PRIx32, base, size); diff --git a/src/rogue/hardware/axi/AxiMemMap.cpp b/src/rogue/hardware/axi/AxiMemMap.cpp index 3e48867e8..2be33d6d2 100644 --- a/src/rogue/hardware/axi/AxiMemMap.cpp +++ b/src/rogue/hardware/axi/AxiMemMap.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/Directives.h" #include "rogue/hardware/axi/AxiMemMap.h" @@ -71,8 +71,9 @@ rha::AxiMemMap::AxiMemMap(std::string path) : rim::Slave(4, 0xFFFFFFFF) { // Check for mismatch in the rogue/loaded_driver API versions if (dmaCheckVersion(fd_) < 0) { ::close(fd_); - throw(rogue::GeneralError("AxiMemMap::AxiMemMap", - "Rogue DmaDriver.h API Version (DMA_VERSION) does not match the aes-stream-driver API version")); + throw(rogue::GeneralError( + "AxiMemMap::AxiMemMap", + "Rogue DmaDriver.h API Version (DMA_VERSION) does not match the aes-stream-driver API version")); } // Start read thread diff --git a/src/rogue/hardware/axi/AxiStreamDma.cpp b/src/rogue/hardware/axi/AxiStreamDma.cpp index f1b718d6c..40111d6a7 100644 --- a/src/rogue/hardware/axi/AxiStreamDma.cpp +++ b/src/rogue/hardware/axi/AxiStreamDma.cpp @@ -61,7 +61,7 @@ rha::AxiStreamDmaSharedPtr rha::AxiStreamDma::openShared(std::string path, rogue ret = it->second; log->debug("Reusing existing shared file descriptor for %s", path.c_str()); - // Create new record + // Create new record } else { ret = std::make_shared(path); log->debug("Opening new shared file descriptor for %s", path.c_str()); @@ -98,8 +98,9 @@ rha::AxiStreamDmaSharedPtr rha::AxiStreamDma::openShared(std::string path, rogue // Check for mismatch in the rogue/loaded_driver API versions if (dmaCheckVersion(ret->fd) < 0) { ::close(ret->fd); - throw(rogue::GeneralError("AxiStreamDma::openShared", - "Rogue DmaDriver.h API Version (DMA_VERSION) does not match the aes-stream-driver API version")); + throw(rogue::GeneralError( + "AxiStreamDma::openShared", + "Rogue DmaDriver.h API Version (DMA_VERSION) does not match the aes-stream-driver API version")); } // Result may be that rawBuff = NULL @@ -129,7 +130,9 @@ void rha::AxiStreamDma::closeShared(rha::AxiStreamDmaSharedPtr desc) { desc->openCount--; if (desc->openCount == 0) { - if (desc->rawBuff != NULL) { dmaUnMapDma(desc->fd, desc->rawBuff); } + if (desc->rawBuff != NULL) { + dmaUnMapDma(desc->fd, desc->rawBuff); + } ::close(desc->fd); desc->fd = -1; @@ -277,7 +280,7 @@ ris::FramePtr rha::AxiStreamDma::acceptReq(uint32_t size, bool zeroCopyEn) { if (zeroCopyEn == false || desc_->rawBuff == NULL) { frame = reqLocalFrame(size, false); - // Allocate zero copy buffers from driver + // Allocate zero copy buffers from driver } else { rogue::GilRelease noGil; @@ -358,7 +361,7 @@ void rha::AxiStreamDma::acceptFrame(ris::FramePtr frame) { cont = 0; luser = frame->getLastUser(); - // Continue flag is set if this is not the last (*it)er + // Continue flag is set if this is not the last (*it)er } else { cont = 1; luser = 0; @@ -387,7 +390,7 @@ void rha::AxiStreamDma::acceptFrame(ris::FramePtr frame) { (*it)->setMeta(meta); } - // Write to pgp with (*it)er copy in driver + // Write to pgp with (*it)er copy in driver } else { // Keep trying since select call can fire // but write fails because we did not win the (*it)er lock @@ -458,7 +461,7 @@ void rha::AxiStreamDma::retBuffer(uint8_t* data, uint32_t meta, uint32_t size) { } decCounter(size); - // Buffer is allocated from Pool class + // Buffer is allocated from Pool class } else { Pool::retBuffer(data, meta, size); } @@ -516,7 +519,7 @@ void rha::AxiStreamDma::runThread(std::weak_ptr lockPtr) { else rxCount = 1; - // Zero copy read + // Zero copy read } else { // Attempt read, dest is not needed since only one lane/vc is open rxCount = dmaReadBulkIndex(fd_, RxBufferCount, rxSize, meta, rxFlags, rxError, NULL); diff --git a/src/rogue/interfaces/ZmqClient.cpp b/src/rogue/interfaces/ZmqClient.cpp index d40b1856d..cc37bf36e 100644 --- a/src/rogue/interfaces/ZmqClient.cpp +++ b/src/rogue/interfaces/ZmqClient.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/Directives.h" @@ -288,7 +288,9 @@ void rogue::interfaces::ZmqClientWrap::doUpdate(bp::object data) { if (bp::override f = this->get_override("_doUpdate")) { try { f(data); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } rogue::interfaces::ZmqClient::doUpdate(data); } diff --git a/src/rogue/interfaces/ZmqServer.cpp b/src/rogue/interfaces/ZmqServer.cpp index 4c93f6e05..d7a967b52 100644 --- a/src/rogue/interfaces/ZmqServer.cpp +++ b/src/rogue/interfaces/ZmqServer.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/Directives.h" @@ -243,7 +243,9 @@ bp::object rogue::interfaces::ZmqServerWrap::doRequest(bp::object data) { if (bp::override f = this->get_override("_doRequest")) { try { return (f(data)); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } return (rogue::interfaces::ZmqServer::doRequest(data)); } @@ -258,7 +260,9 @@ std::string rogue::interfaces::ZmqServerWrap::doString(std::string data) { if (bp::override f = this->get_override("_doString")) { try { return (f(data)); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } return (rogue::interfaces::ZmqServer::doString(data)); diff --git a/src/rogue/interfaces/api/Bsp.cpp b/src/rogue/interfaces/api/Bsp.cpp index bdae6b603..b4b8d3066 100644 --- a/src/rogue/interfaces/api/Bsp.cpp +++ b/src/rogue/interfaces/api/Bsp.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/interfaces/api/Bsp.h" #include @@ -55,7 +55,9 @@ ria::Bsp::Bsp(std::string modName, std::string rootClass) { } ria::Bsp::~Bsp() { - if (this->_isRoot) { this->_obj.attr("stop")(); } + if (this->_isRoot) { + this->_obj.attr("stop")(); + } } void ria::Bsp::addVarListener(void (*func)(std::string, std::string), void (*done)()) { @@ -109,14 +111,18 @@ std::shared_ptr ria::Bsp::getNode(std::string name) std::string ria::Bsp::operator()(std::string arg) { try { return (std::string(bp::extract(this->_obj.attr("callDisp")(arg)))); - } catch (...) { throw(rogue::GeneralError::create("Bsp::()", "Error executing node %s", this->_name.c_str())); } + } catch (...) { + throw(rogue::GeneralError::create("Bsp::()", "Error executing node %s", this->_name.c_str())); + } } //! Execute command operator without arg std::string ria::Bsp::operator()() { try { return (std::string(bp::extract(this->_obj.attr("callDisp")()))); - } catch (...) { throw(rogue::GeneralError::create("Bsp::()", "Error executing node %s", this->_name.c_str())); } + } catch (...) { + throw(rogue::GeneralError::create("Bsp::()", "Error executing node %s", this->_name.c_str())); + } } //! Execute command diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index 5ddaf5a89..ea1de57cd 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/Directives.h" @@ -172,8 +172,8 @@ void rim::Block::intStartTransaction(uint32_t type, bool forceWr, bool check, ri std::vector::iterator vit; // Check for valid combinations - if ((type == rim::Write && ((mode_ == "RO") || (!stale_ && !forceWr))) || - (type == rim::Post && (mode_ == "RO")) || (type == rim::Read && ((mode_ == "WO") || stale_)) || + if ((type == rim::Write && ((mode_ == "RO") || (!stale_ && !forceWr))) || (type == rim::Post && (mode_ == "RO")) || + (type == rim::Read && ((mode_ == "WO") || stale_)) || (type == rim::Verify && ((mode_ == "WO") || (mode_ == "RO") || stale_ || !verifyReq_))) return; { @@ -188,7 +188,9 @@ void rim::Block::intStartTransaction(uint32_t type, bool forceWr, bool check, ri highByte = size_ - 1; if (type == rim::Write || type == rim::Post) { stale_ = false; - for (vit = variables_.begin(); vit != variables_.end(); ++vit) { (*vit)->stale_ = false; } + for (vit = variables_.begin(); vit != variables_.end(); ++vit) { + (*vit)->stale_ = false; + } } } else { if (type == rim::Read || type == rim::Verify) { @@ -227,7 +229,7 @@ void rim::Block::intStartTransaction(uint32_t type, bool forceWr, bool check, ri tData = verifyData_ + verifyBase_; verifyInp_ = true; - // Not a verify transaction + // Not a verify transaction } else { // Derive offset and size based upon min transaction size tOff = lowByte; @@ -471,14 +473,15 @@ void rim::Block::addVariables(std::vector variables) { if ((*vit)->overlapEn_) { setBits(oleMask, (*vit)->bitOffset_[x], (*vit)->bitSize_[x]); - // Otherwise add to exclusive mask and check for existing mapping + // Otherwise add to exclusive mask and check for existing mapping } else { if (anyBits(excMask, (*vit)->bitOffset_[x], (*vit)->bitSize_[x])) - throw(rogue::GeneralError::create("Block::addVariables", - "Variable bit overlap detected for block %s with address 0x%.8x and variable %s", - path_.c_str(), - address(), - (*vit)->name_.c_str())); + throw(rogue::GeneralError::create( + "Block::addVariables", + "Variable bit overlap detected for block %s with address 0x%.8x and variable %s", + path_.c_str(), + address(), + (*vit)->name_.c_str())); setBits(excMask, (*vit)->bitOffset_[x], (*vit)->bitSize_[x]); } @@ -490,7 +493,8 @@ void rim::Block::addVariables(std::vector variables) { } bLog_->debug( - "Adding variable %s to block %s at offset 0x%.8x, bitIdx=%i, bitOffset %i, bitSize %i, mode %s, verifyEn " + "Adding variable %s to block %s at offset 0x%.8x, bitIdx=%i, bitOffset %i, bitSize %i, mode %s, " + "verifyEn " "%d " PRIx64, (*vit)->name_.c_str(), path_.c_str(), @@ -502,21 +506,22 @@ 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 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", - "Variable bit overlap detected for block %s with address 0x%.8x and variable %s", - path_.c_str(), - address(), - (*vit)->name_.c_str())); + throw(rogue::GeneralError::create( + "Block::addVariables", + "Variable bit overlap detected for block %s with address 0x%.8x and variable %s", + path_.c_str(), + address(), + (*vit)->name_.c_str())); setBits(excMask, x * (*vit)->valueStride_ + (*vit)->bitOffset_[0], (*vit)->valueBits_); } @@ -528,7 +533,8 @@ void rim::Block::addVariables(std::vector variables) { } bLog_->debug( - "Adding variable %s to block %s at offset 0x%.8x, index=%i, valueOffset=%i, valueBits %i, mode %s, verifyEn %d", + "Adding variable %s to block %s at offset 0x%.8x, index=%i, valueOffset=%i, valueBits %i, mode %s, " + "verifyEn %d", (*vit)->name_.c_str(), path_.c_str(), offset_, @@ -649,14 +655,13 @@ void rim::Block::setBytes(const uint8_t* data, rim::Variable* var, uint32_t inde if (var->stale_) { if (var->lowTranByte_[index] < var->staleLowByte_) var->staleLowByte_ = var->lowTranByte_[index]; - if (var->highTranByte_[index] > var->staleHighByte_) - var->staleHighByte_ = var->highTranByte_[index]; + if (var->highTranByte_[index] > var->staleHighByte_) var->staleHighByte_ = var->highTranByte_[index]; } else { var->staleLowByte_ = var->lowTranByte_[index]; var->staleHighByte_ = var->highTranByte_[index]; } - // Standard variable + // Standard variable } else { var->staleLowByte_ = var->lowTranByte_[0]; var->staleHighByte_ = var->highTranByte_[0]; @@ -722,7 +727,9 @@ void rim::Block::getBytes(uint8_t* data, rim::Variable* var, uint32_t index) { } // Change byte order - if (var->byteReverse_) { reverseBytes(data, var->valueBytes_); } + if (var->byteReverse_) { + reverseBytes(data, var->valueBytes_); + } } ////////////////////////////////////////// @@ -745,7 +752,7 @@ void rim::Block::setPyFunc(bp::object& value, rim::Variable* var, int32_t index) "Passing ndarray not supported for %s", var->name_.c_str())); - // Is passed value a list + // Is passed value a list } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -772,7 +779,7 @@ void rim::Block::setPyFunc(bp::object& value, rim::Variable* var, int32_t index) PyBuffer_Release(&valueBuf); } - // Single value + // Single value } else { // Call python function bp::object ret = ((rim::VariableWrap*)var)->toBytes(value); @@ -797,7 +804,7 @@ bp::object rim::Block::getPyFunc(rim::Variable* var, int32_t index) { "Accessing unindexed value not support for %s", var->name_.c_str())); - // Single value + // Single value } else { memset(getBuffer, 0, var->valueBytes_); @@ -919,7 +926,7 @@ void rim::Block::setUIntPy(bp::object& value, rim::Variable* var, int32_t index) var->name_.c_str())); } - // Is passed value a list + // Is passed value a list } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -944,7 +951,7 @@ void rim::Block::setUIntPy(bp::object& value, rim::Variable* var, int32_t index) setUInt(tmp, var, index + x); } - // Passed scalar numpy value + // Passed scalar numpy value } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_UINT64) { uint64_t val; @@ -1077,7 +1084,7 @@ void rim::Block::setIntPy(bp::object& value, rim::Variable* var, int32_t index) var->name_.c_str())); } - // Is passed value a list + // Is passed value a list } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -1102,7 +1109,7 @@ void rim::Block::setIntPy(bp::object& value, rim::Variable* var, int32_t index) setInt(tmp, var, index + x); } - // Passed scalar numpy value + // Passed scalar numpy value } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_INT64) { int64_t val; @@ -1236,7 +1243,7 @@ void rim::Block::setBoolPy(bp::object& value, rim::Variable* var, int32_t index) var->name_.c_str())); } - // Is passed value a list + // Is passed value a list } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -1261,7 +1268,7 @@ void rim::Block::setBoolPy(bp::object& value, rim::Variable* var, int32_t index) setBool(tmp, var, index + x); } - // Passed scalar numpy value + // Passed scalar numpy value } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_BOOL) { bool val; @@ -1444,7 +1451,7 @@ void rim::Block::setFloatPy(bp::object& value, rim::Variable* var, int32_t index var->name_.c_str())); } - // Is passed value a list + // Is passed value a list } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -1469,7 +1476,7 @@ void rim::Block::setFloatPy(bp::object& value, rim::Variable* var, int32_t index setFloat(tmp, var, index + x); } - // Passed scalar numpy value + // Passed scalar numpy value } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_FLOAT32) { float val; @@ -1589,7 +1596,7 @@ void rim::Block::setDoublePy(bp::object& value, rim::Variable* var, int32_t inde var->name_.c_str())); } - // Is passed value a list + // Is passed value a list } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -1614,7 +1621,7 @@ void rim::Block::setDoublePy(bp::object& value, rim::Variable* var, int32_t inde setDouble(tmp, var, index + x); } - // Passed scalar numpy value + // Passed scalar numpy value } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_FLOAT64) { double val; @@ -1734,7 +1741,7 @@ void rim::Block::setFixedPy(bp::object& value, rim::Variable* var, int32_t index var->name_.c_str())); } - // Is passed value a list + // Is passed value a list } else if (PyList_Check(value.ptr())) { bp::list vl = bp::extract(value); uint32_t vlen = len(vl); @@ -1759,7 +1766,7 @@ void rim::Block::setFixedPy(bp::object& value, rim::Variable* var, int32_t index setFixed(tmp, var, index + x); } - // Passed scalar numpy value + // Passed scalar numpy value } else if (PyArray_CheckScalar(value.ptr())) { if (PyArray_DescrFromScalar(value.ptr())->type_num == NPY_FLOAT64) { double val; @@ -1828,7 +1835,9 @@ void rim::Block::setFixed(const double& val, rim::Variable* var, int32_t index) int64_t fPoint = (int64_t)round(val * pow(2, var->binPoint_)); // Check for positive edge case uint64_t mask = 1 << (var->valueBits_ - 1); - if (val > 0 && ((fPoint & mask) != 0)) { fPoint -= 1; } + if (val > 0 && ((fPoint & mask) != 0)) { + fPoint -= 1; + } setBytes(reinterpret_cast(&fPoint), var, index); } @@ -1839,7 +1848,9 @@ double rim::Block::getFixed(rim::Variable* var, int32_t index) { getBytes(reinterpret_cast(&fPoint), var, index); // Do two-complement if negative - if ((fPoint & (1 << (var->valueBits_ - 1))) != 0) { fPoint = fPoint - (1 << var->valueBits_); } + if ((fPoint & (1 << (var->valueBits_ - 1))) != 0) { + fPoint = fPoint - (1 << var->valueBits_); + } // Convert to float tmp = static_cast(fPoint); diff --git a/src/rogue/interfaces/memory/Emulate.cpp b/src/rogue/interfaces/memory/Emulate.cpp index 72b9b6bc4..0cdce91d9 100644 --- a/src/rogue/interfaces/memory/Emulate.cpp +++ b/src/rogue/interfaces/memory/Emulate.cpp @@ -46,8 +46,8 @@ rim::EmulatePtr rim::Emulate::create(uint32_t min, uint32_t max) { //! Create an block rim::Emulate::Emulate(uint32_t min, uint32_t max) : Slave(min, max) { totAlloc_ = 0; - totSize_ = 0; - log_ = rogue::Logging::create("memory.Emulate"); + totSize_ = 0; + log_ = rogue::Logging::create("memory.Emulate"); } //! Destroy a block @@ -85,10 +85,10 @@ void rim::Emulate::doTransaction(rim::TransactionPtr tran) { addr += size4k; if (memMap_.find(addr4k) == memMap_.end()) { - memMap_.insert(std::make_pair(addr4k, reinterpret_cast(malloc(0x1000)))); - totSize_ += 0x1000; - totAlloc_++; - log_->debug("Allocating block at 0x%x. Total Blocks %i, Total Size = %i", addr4k, totAlloc_, totSize_); + memMap_.insert(std::make_pair(addr4k, reinterpret_cast(malloc(0x1000)))); + totSize_ += 0x1000; + totAlloc_++; + log_->debug("Allocating block at 0x%x. Total Blocks %i, Total Size = %i", addr4k, totAlloc_, totSize_); } // Write or post @@ -97,7 +97,7 @@ void rim::Emulate::doTransaction(rim::TransactionPtr tran) { // size4k); memcpy(memMap_[addr4k] + off4k, ptr, size4k); - // Read or verify + // Read or verify } else { // printf("Read data from 4k=0x%" PRIx64 ", offset=0x%" PRIx64 ", size=%" PRIu64 "\n", addr4k, off4k, // size4k); diff --git a/src/rogue/interfaces/memory/Hub.cpp b/src/rogue/interfaces/memory/Hub.cpp index 02668340b..742f15cc5 100644 --- a/src/rogue/interfaces/memory/Hub.cpp +++ b/src/rogue/interfaces/memory/Hub.cpp @@ -180,7 +180,9 @@ void rim::HubWrap::doTransaction(rim::TransactionPtr transaction) { try { pb(transaction); return; - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } rim::Hub::doTransaction(transaction); diff --git a/src/rogue/interfaces/memory/Master.cpp b/src/rogue/interfaces/memory/Master.cpp index 85a25dbb7..e4c9e84ac 100644 --- a/src/rogue/interfaces/memory/Master.cpp +++ b/src/rogue/interfaces/memory/Master.cpp @@ -279,7 +279,7 @@ void rim::Master::copyBits(uint8_t* dstData, uint32_t dstLsb, uint8_t* srcData, srcByte += bytes; rem -= (bytes * 8); - // Not aligned + // Not aligned } else { dstData[dstByte] &= ((0x1 << dstBit) ^ 0xFF); dstData[dstByte] |= ((srcData[srcByte] >> srcBit) & 0x1) << dstBit; @@ -360,7 +360,7 @@ void rim::Master::setBits(uint8_t* dstData, uint32_t lsb, uint32_t size) { dstByte += bytes; rem -= (bytes * 8); - // Not aligned + // Not aligned } else { dstData[dstByte] |= (0x1 << dstBit); dstByte += (++dstBit / 8); @@ -418,7 +418,7 @@ bool rim::Master::anyBits(uint8_t* dstData, uint32_t lsb, uint32_t size) { dstByte += 1; rem -= 8; - // Not aligned + // Not aligned } else { if ((dstData[dstByte] & (0x1 << dstBit)) != 0) ret = true; dstByte += (++dstBit / 8); @@ -466,7 +466,7 @@ void rim::Master::rshiftPy(bp::object p) { if (get_slave.check()) { slv = get_slave(); - // Otherwise look for indirect call + // Otherwise look for indirect call } else if (PyObject_HasAttrString(p.ptr(), "_getMemorySlave")) { // Attempt to convert returned object to slave pointer boost::python::extract get_slave(p.attr("_getMemorySlave")()); diff --git a/src/rogue/interfaces/memory/Slave.cpp b/src/rogue/interfaces/memory/Slave.cpp index ed2228b2c..709e7e709 100644 --- a/src/rogue/interfaces/memory/Slave.cpp +++ b/src/rogue/interfaces/memory/Slave.cpp @@ -99,7 +99,9 @@ rim::TransactionPtr rim::Slave::getTransaction(uint32_t index) { // Clean up if we found an expired transaction, overtime this will clean up // the list, even if it deletes one expired transaction per call - if (exp != tranMap_.end()) { tranMap_.erase(exp); } + if (exp != tranMap_.end()) { + tranMap_.erase(exp); + } } return ret; } @@ -187,7 +189,9 @@ uint32_t rim::SlaveWrap::doMinAccess() { if (boost::python::override pb = this->get_override("_doMinAccess")) { try { return (pb()); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } return (rim::Slave::doMinAccess()); @@ -206,7 +210,9 @@ uint32_t rim::SlaveWrap::doMaxAccess() { if (boost::python::override pb = this->get_override("_doMaxAccess")) { try { return (pb()); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } return (rim::Slave::doMaxAccess()); @@ -225,7 +231,9 @@ uint64_t rim::SlaveWrap::doAddress() { if (boost::python::override pb = this->get_override("_doAddress")) { try { return (pb()); - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } return (rim::Slave::doAddress()); @@ -245,7 +253,9 @@ void rim::SlaveWrap::doTransaction(rim::TransactionPtr transaction) { try { pb(transaction); return; - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } rim::Slave::doTransaction(transaction); @@ -266,7 +276,7 @@ void rim::Slave::lshiftPy(boost::python::object p) { if (get_master.check()) { mst = get_master(); - // Otherwise look for indirect call + // Otherwise look for indirect call } else if (PyObject_HasAttrString(p.ptr(), "_getMemoryMaster")) { // Attempt to convert returned object to master pointer boost::python::extract get_master(p.attr("_getMemoryMaster")()); diff --git a/src/rogue/interfaces/memory/TcpClient.cpp b/src/rogue/interfaces/memory/TcpClient.cpp index c09e05360..9d451024f 100644 --- a/src/rogue/interfaces/memory/TcpClient.cpp +++ b/src/rogue/interfaces/memory/TcpClient.cpp @@ -173,7 +173,7 @@ void rim::TcpClient::doTransaction(rim::TransactionPtr tran) { zmq_msg_init_size(&(msg[4]), size); std::memcpy(zmq_msg_data(&(msg[4])), tran->begin(), size); - // Read transaction + // Read transaction } else { msgCnt = 4; } diff --git a/src/rogue/interfaces/memory/Transaction.cpp b/src/rogue/interfaces/memory/Transaction.cpp index 0e5a1bf3e..f5962d1b2 100644 --- a/src/rogue/interfaces/memory/Transaction.cpp +++ b/src/rogue/interfaces/memory/Transaction.cpp @@ -107,7 +107,9 @@ rim::TransactionLockPtr rim::Transaction::lock() { //! Get expired state bool rim::Transaction::expired() { bool done = false; - if (isSubTransaction_) { done = parentTransaction_.expired(); } + if (isSubTransaction_) { + done = parentTransaction_.expired(); + } return done || (iter_ == NULL || done_); } diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index b448a84e8..4661dd20b 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -178,11 +178,11 @@ rim::Variable::Variable(std::string name, highTranByte_ = reinterpret_cast(malloc(sizeof(uint32_t))); // Init remaining fields - valueBytes_ = byteSize_; - valueBits_ = bitTotal_; + valueBytes_ = byteSize_; + valueBits_ = bitTotal_; valueStride_ = bitTotal_; - // List variables + // List variables } else { // Compute bit total bitTotal_ = bitSize_[0]; @@ -202,13 +202,14 @@ rim::Variable::Variable(std::string name, fastByte_ = NULL; // Determine if fast byte copies can be utilized - // Bit offset vector must have one entry, the offset must be byte aligned and the total number of bits must be byte aligned + // Bit offset vector must have one entry, the offset must be byte aligned and the total number of bits must be byte + // aligned if ((bitOffset_.size() == 1) && (bitOffset_[0] % 8 == 0) && (bitSize_[0] % 8 == 0)) { // Standard variable if (numValues_ == 0) { fastByte_ = reinterpret_cast(malloc(sizeof(uint32_t))); - // List variable + // List variable } else if ((valueBits_ % 8) == 0 && (valueStride_ % 8) == 0) { fastByte_ = reinterpret_cast(malloc(numValues_ * sizeof(uint32_t))); } @@ -453,27 +454,41 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { } // Standard variable - if ( numValues_ == 0 ) { + if (numValues_ == 0) { // Compute total bit range of accessed bytes - varBytes_ = static_cast(std::ceil(static_cast(bitOffset_[bitOffset_.size() - 1] + bitSize_[bitSize_.size() - 1]) / (static_cast(minSize) * 8.0))) * minSize; + varBytes_ = static_cast(std::ceil( + static_cast(bitOffset_[bitOffset_.size() - 1] + bitSize_[bitSize_.size() - 1]) / + (static_cast(minSize) * 8.0))) * + minSize; // Compute the lowest byte, aligned to min access - lowTranByte_[0] = static_cast(std::floor(static_cast(bitOffset_[0]) / (static_cast(minSize) * 8.0))) * minSize; + lowTranByte_[0] = + static_cast(std::floor(static_cast(bitOffset_[0]) / (static_cast(minSize) * 8.0))) * + minSize; // Compute the highest byte, aligned to min access highTranByte_[0] = varBytes_ - 1; - staleHighByte_ = highTranByte_[0]; + staleHighByte_ = highTranByte_[0]; - // List variable + // List variable } else { for (x = 0; x < numValues_; x++) { - lowTranByte_[x] = static_cast(std::floor((static_cast(bitOffset_[0]) + static_cast(x) * static_cast(valueStride_)) / (static_cast(minSize) * 8.0))) * minSize; - highTranByte_[x] = static_cast(std::ceil((static_cast(bitOffset_[0]) + static_cast(x) * static_cast(valueStride_) + valueBits_) / (static_cast(minSize) * 8.0))) * minSize - 1; + lowTranByte_[x] = + static_cast(std::floor( + (static_cast(bitOffset_[0]) + static_cast(x) * static_cast(valueStride_)) / + (static_cast(minSize) * 8.0))) * + minSize; + highTranByte_[x] = static_cast( + std::ceil((static_cast(bitOffset_[0]) + + static_cast(x) * static_cast(valueStride_) + valueBits_) / + (static_cast(minSize) * 8.0))) * + minSize - + 1; } // Compute total bit range of accessed bytes - varBytes_ = highTranByte_[numValues_-1] - lowTranByte_[0] + 1; - staleHighByte_ = highTranByte_[numValues_-1]; + varBytes_ = highTranByte_[numValues_ - 1] - lowTranByte_[0] + 1; + staleHighByte_ = highTranByte_[numValues_ - 1]; } // Adjust fast copy locations @@ -481,13 +496,13 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { if (numValues_ == 0) { fastByte_[0] = bitOffset_[0] / 8; - // List variable + // List variable } else { for (x = 0; x < numValues_; x++) fastByte_[x] = (bitOffset_[0] + (valueStride_ * x)) / 8; } } - staleLowByte_ = lowTranByte_[0]; + staleLowByte_ = lowTranByte_[0]; } void rim::Variable::updatePath(std::string path) { @@ -605,7 +620,9 @@ void rim::VariableWrap::queueUpdate() { try { pb(); return; - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } @@ -634,7 +651,9 @@ void rim::Variable::rateTest() { uint32_t ret; gettimeofday(&stime, NULL); - for (x = 0; x < count; ++x) { ret = getUInt(); } + for (x = 0; x < count; ++x) { + ret = getUInt(); + } gettimeofday(&etime, NULL); timersub(&etime, &stime, &dtime); @@ -644,7 +663,9 @@ void rim::Variable::rateTest() { printf("\nVariable c++ get: Read %" PRIu64 " times in %f seconds. Rate = %f\n", count, durr, rate); gettimeofday(&stime, NULL); - for (x = 0; x < count; ++x) { setUInt(x); } + for (x = 0; x < count; ++x) { + setUInt(x); + } gettimeofday(&etime, NULL); timersub(&etime, &stime, &dtime); diff --git a/src/rogue/interfaces/stream/Frame.cpp b/src/rogue/interfaces/stream/Frame.cpp index 384fa3d42..aeaa74fad 100644 --- a/src/rogue/interfaces/stream/Frame.cpp +++ b/src/rogue/interfaces/stream/Frame.cpp @@ -183,12 +183,12 @@ void ris::Frame::setPayload(uint32_t pSize) { if (lSize == 0) { (*it)->setPayloadEmpty(); - // Size exists in current buffer + // Size exists in current buffer } else if (lSize <= loc) { (*it)->setPayload(lSize); lSize = 0; - // Size is beyond current buffer + // Size is beyond current buffer } else { lSize -= loc; (*it)->setPayloadFull(); @@ -433,7 +433,9 @@ void ris::Frame::putNumpy(boost::python::object p, uint32_t offset) { PyObject* obj = p.ptr(); // Check that this is a PyArrayObject - if (!PyArray_Check(obj)) { throw(rogue::GeneralError("Frame::putNumpy", "Object is not a numpy array")); } + if (!PyArray_Check(obj)) { + throw(rogue::GeneralError("Frame::putNumpy", "Object is not a numpy array")); + } // Cast to an array object and check that the numpy array // data buffer is write-able and contiguous @@ -441,7 +443,9 @@ void ris::Frame::putNumpy(boost::python::object p, uint32_t offset) { PyArrayObject* arr = reinterpret_cast(obj); int flags = PyArray_FLAGS(arr); bool ctg = flags & (NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_F_CONTIGUOUS); - if (!ctg) { arr = PyArray_GETCONTIGUOUS(arr); } + if (!ctg) { + arr = PyArray_GETCONTIGUOUS(arr); + } // Get the number of bytes in both the source and destination buffers uint32_t size = getSize(); @@ -467,7 +471,9 @@ void ris::Frame::putNumpy(boost::python::object p, uint32_t offset) { ris::toFrame(beg, count, src); // If were forced to make a temporary copy, release it - if (!ctg) { Py_XDECREF(arr); } + if (!ctg) { + Py_XDECREF(arr); + } return; } diff --git a/src/rogue/interfaces/stream/FrameIterator.cpp b/src/rogue/interfaces/stream/FrameIterator.cpp index 8deab144d..bfc345178 100644 --- a/src/rogue/interfaces/stream/FrameIterator.cpp +++ b/src/rogue/interfaces/stream/FrameIterator.cpp @@ -57,7 +57,7 @@ void ris::FrameIterator::increment(int32_t diff) { buff_ = frame_->endBuffer(); data_ = NULL; - // Move forward in buffer chain + // Move forward in buffer chain } else { // Increment current buffer until we find the location of the data position // Iterator always contains one extra buffer index @@ -88,7 +88,7 @@ void ris::FrameIterator::decrement(int32_t diff) { buff_ = frame_->endBuffer(); data_ = NULL; - // Move backwards in buffer chain + // Move backwards in buffer chain } else { // Decrement current buffer until the desired frame position is greater than // the bottom of the buffer diff --git a/src/rogue/interfaces/stream/Master.cpp b/src/rogue/interfaces/stream/Master.cpp index 80b8ec121..3fdb9927e 100644 --- a/src/rogue/interfaces/stream/Master.cpp +++ b/src/rogue/interfaces/stream/Master.cpp @@ -147,9 +147,9 @@ void ris::Master::equalsPy(boost::python::object p) { // Test extraction if (get_master.check()) { - rMst = get_master(); + rMst = get_master(); - // Otherwise look for indirect call + // Otherwise look for indirect call } else if (PyObject_HasAttrString(p.ptr(), "_getStreamMaster")) { // Attempt to convert returned object to master pointer boost::python::extract get_master(p.attr("_getStreamMaster")()); @@ -167,7 +167,7 @@ void ris::Master::equalsPy(boost::python::object p) { if (get_slave.check()) { rSlv = get_slave(); - // Otherwise look for indirect call + // Otherwise look for indirect call } else if (PyObject_HasAttrString(p.ptr(), "_getStreamSlave")) { // Attempt to convert returned object to slave pointer boost::python::extract get_slave(p.attr("_getStreamSlave")()); @@ -197,7 +197,7 @@ bp::object ris::Master::rshiftPy(bp::object p) { if (get_slave.check()) { slv = get_slave(); - // Otherwise look for indirect call + // Otherwise look for indirect call } else if (PyObject_HasAttrString(p.ptr(), "_getStreamSlave")) { // Attempt to convert returned object to slave pointer boost::python::extract get_slave(p.attr("_getStreamSlave")()); diff --git a/src/rogue/interfaces/stream/Pool.cpp b/src/rogue/interfaces/stream/Pool.cpp index 5a3e0013e..e7a918a46 100644 --- a/src/rogue/interfaces/stream/Pool.cpp +++ b/src/rogue/interfaces/stream/Pool.cpp @@ -49,7 +49,9 @@ ris::Pool::Pool() { //! Destructor ris::Pool::~Pool() { - while (!dataQ_.empty()) { free(dataQ_.front()); } + while (!dataQ_.empty()) { + free(dataQ_.front()); + } } //! Get allocated memory diff --git a/src/rogue/interfaces/stream/RateDrop.cpp b/src/rogue/interfaces/stream/RateDrop.cpp index e0be70374..34773d223 100644 --- a/src/rogue/interfaces/stream/RateDrop.cpp +++ b/src/rogue/interfaces/stream/RateDrop.cpp @@ -87,7 +87,7 @@ void ris::RateDrop::acceptFrame(ris::FramePtr frame) { dropCount_ = 0; } - // Dropping based upon time + // Dropping based upon time } else { gettimeofday(&currTime, NULL); diff --git a/src/rogue/interfaces/stream/Slave.cpp b/src/rogue/interfaces/stream/Slave.cpp index f8b6a7d03..ccbba1fe6 100644 --- a/src/rogue/interfaces/stream/Slave.cpp +++ b/src/rogue/interfaces/stream/Slave.cpp @@ -114,7 +114,9 @@ void ris::SlaveWrap::acceptFrame(ris::FramePtr frame) { try { pb(frame); return; - } catch (...) { PyErr_Print(); } + } catch (...) { + PyErr_Print(); + } } } ris::Slave::acceptFrame(frame); @@ -203,9 +205,9 @@ bp::object ris::Slave::lshiftPy(bp::object p) { // Test extraction if (get_master.check()) { - mst = get_master(); + mst = get_master(); - // Otherwise look for indirect call + // Otherwise look for indirect call } else if (PyObject_HasAttrString(p.ptr(), "_getStreamMaster")) { // Attempt to convert returned object to master pointer boost::python::extract get_master(p.attr("_getStreamMaster")()); diff --git a/src/rogue/interfaces/stream/TcpCore.cpp b/src/rogue/interfaces/stream/TcpCore.cpp index b91ad493f..9e15ef204 100644 --- a/src/rogue/interfaces/stream/TcpCore.cpp +++ b/src/rogue/interfaces/stream/TcpCore.cpp @@ -110,7 +110,7 @@ ris::TcpCore::TcpCore(std::string addr, uint16_t port, bool server) { port + 1, addr.c_str())); - // Client mode + // Client mode } else { this->pullAddr_.append(std::to_string(static_cast(port + 1))); this->pushAddr_.append(std::to_string(static_cast(port))); diff --git a/src/rogue/protocols/batcher/Data.cpp b/src/rogue/protocols/batcher/Data.cpp index 5f755af94..579c2d8f4 100644 --- a/src/rogue/protocols/batcher/Data.cpp +++ b/src/rogue/protocols/batcher/Data.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/protocols/batcher/Data.h" #include diff --git a/src/rogue/protocols/batcher/InverterV1.cpp b/src/rogue/protocols/batcher/InverterV1.cpp index af14c4365..56aed6007 100644 --- a/src/rogue/protocols/batcher/InverterV1.cpp +++ b/src/rogue/protocols/batcher/InverterV1.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/Directives.h" #include "rogue/protocols/batcher/InverterV1.h" diff --git a/src/rogue/protocols/batcher/SplitterV1.cpp b/src/rogue/protocols/batcher/SplitterV1.cpp index 5e018b9ec..df8a82b07 100644 --- a/src/rogue/protocols/batcher/SplitterV1.cpp +++ b/src/rogue/protocols/batcher/SplitterV1.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/Directives.h" #include "rogue/protocols/batcher/SplitterV1.h" diff --git a/src/rogue/protocols/packetizer/ControllerV1.cpp b/src/rogue/protocols/packetizer/ControllerV1.cpp index 5f7fd5d4e..880b29e4e 100644 --- a/src/rogue/protocols/packetizer/ControllerV1.cpp +++ b/src/rogue/protocols/packetizer/ControllerV1.cpp @@ -165,7 +165,9 @@ void rpp::ControllerV1::transportRx(ris::FramePtr frame) { if (tmpEof) { tranFrame_[0]->setLastUser(tmpLuser); tranCount_[0] = 0; - if (app_[tranDest_]) { app_[tranDest_]->pushFrame(tranFrame_[0]); } + if (app_[tranDest_]) { + app_[tranDest_]->pushFrame(tranFrame_[0]); + } tranFrame_[0].reset(); // Detect SSI error diff --git a/src/rogue/protocols/packetizer/ControllerV2.cpp b/src/rogue/protocols/packetizer/ControllerV2.cpp index b997fcaa6..87fd38462 100644 --- a/src/rogue/protocols/packetizer/ControllerV2.cpp +++ b/src/rogue/protocols/packetizer/ControllerV2.cpp @@ -233,7 +233,9 @@ void rpp::ControllerV2::transportRx(ris::FramePtr frame) { tranFrame_[tmpDest]->setLastUser(tmpLuser); transSof_[tmpDest] = true; tranCount_[tmpDest] = 0; - if (app_[tmpDest]) { app_[tmpDest]->pushFrame(tranFrame_[tmpDest]); } + if (app_[tmpDest]) { + app_[tmpDest]->pushFrame(tranFrame_[tmpDest]); + } tranFrame_[tmpDest].reset(); // Detect SSI error diff --git a/src/rogue/protocols/rssi/Controller.cpp b/src/rogue/protocols/rssi/Controller.cpp index fe5830d7f..7a8e73a1d 100644 --- a/src/rogue/protocols/rssi/Controller.cpp +++ b/src/rogue/protocols/rssi/Controller.cpp @@ -236,11 +236,11 @@ void rpr::Controller::transportRx(ris::FramePtr frame) { // Reset if (head->rst) { if (state_ == StOpen || state_ == StWaitSyn) { - stQueue_.push(head); + stQueue_.push(head); } - // Syn frame goes to state machine if state = open - // or we are waiting for ack replay + // Syn frame goes to state machine if state = open + // or we are waiting for ack replay } else if (head->syn) { if (state_ == StOpen || state_ == StWaitSyn) { lastSeqRx_ = head->sequence; @@ -248,7 +248,7 @@ void rpr::Controller::transportRx(ris::FramePtr frame) { stQueue_.push(head); } - // Data or NULL in the correct sequence go to application + // Data or NULL in the correct sequence go to application } else if (state_ == StOpen && (head->nul || frame->getPayload() > rpr::Header::HeaderSize)) { if (head->sequence == nextSeqRx_) { // log_->warning("Data or NULL in the correct sequence go to application: nextSeqRx_=0x%" PRIx8, @@ -289,7 +289,7 @@ void rpr::Controller::transportRx(ris::FramePtr frame) { // Notify after the last sequence update stCond_.notify_all(); - // Check if received frame is already in out of order queue + // Check if received frame is already in out of order queue } else if ((it = oooQueue_.find(head->sequence)) != oooQueue_.end()) { log_->warning("Dropped duplicate frame. server=%" PRIu8 ", head->sequence=%" PRIu32 ", next sequence=%" PRIu32, @@ -298,9 +298,9 @@ void rpr::Controller::transportRx(ris::FramePtr frame) { nextSeqRx_); dropCount_++; - // Add to out of order queue in case things arrive out of order - // Make sure received sequence is in window. There may be a better way - // to do this while handling the 8 bit rollover + // Add to out of order queue in case things arrive out of order + // Make sure received sequence is in window. There may be a better way + // to do this while handling the 8 bit rollover } else { uint8_t x = nextSeqRx_; uint8_t windowEnd = (nextSeqRx_ + curMaxBuffers_ + 1); @@ -390,7 +390,7 @@ void rpr::Controller::applicationRx(ris::FramePtr frame) { // Connection is closed if (state_ != StOpen) { - return; + return; } // Wait while busy either by flow control or buffer starvation @@ -778,7 +778,7 @@ struct timeval& rpr::Controller::stateClosedWait() { state_ = StClosed; log_->warning("Closing link. Server=%" PRIu8, server_); - // Syn ack + // Syn ack } else if (head->syn && (head->ack || server_)) { curMaxBuffers_ = head->maxOutstandingSegments; curMaxSegment_ = head->maxSegmentSize; @@ -803,7 +803,7 @@ struct timeval& rpr::Controller::stateClosedWait() { } gettimeofday(&stTime_, NULL); - // reset counters + // reset counters } else { curMaxBuffers_ = locMaxBuffers_; curMaxSegment_ = locMaxSegment_; @@ -814,7 +814,7 @@ struct timeval& rpr::Controller::stateClosedWait() { curMaxCumAck_ = locMaxCumAck_; } - // Generate syn after try period passes + // Generate syn after try period passes } else if ((!server_) && timePassed(stTime_, tryPeriodD1_)) { // Allocate frame head = rpr::Header::create(tran_->reqFrame(rpr::Header::SynSize, false)); diff --git a/src/rogue/protocols/rssi/Server.cpp b/src/rogue/protocols/rssi/Server.cpp index c7364d97f..7dead35fa 100644 --- a/src/rogue/protocols/rssi/Server.cpp +++ b/src/rogue/protocols/rssi/Server.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/Directives.h" #include "rogue/protocols/rssi/Server.h" diff --git a/src/rogue/protocols/xilinx/JtagDriver.cpp b/src/rogue/protocols/xilinx/JtagDriver.cpp index 25300fdf0..28232cca3 100644 --- a/src/rogue/protocols/xilinx/JtagDriver.cpp +++ b/src/rogue/protocols/xilinx/JtagDriver.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/Directives.h" @@ -130,7 +130,9 @@ uint32_t rpx::JtagDriver::cvtPerNs(Header reply) { unsigned rawVal = (reply >> XID_SHIFT) & 0xff; double tmp; - if (0 == rawVal) { return UNKNOWN_PERIOD; } + if (0 == rawVal) { + return UNKNOWN_PERIOD; + } tmp = static_cast(rawVal) * 4.0 / 256.0; @@ -148,7 +150,9 @@ unsigned rpx::JtagDriver::getMemDepth() { rpx::JtagDriver::Header rpx::JtagDriver::getHdr(uint8_t* buf) { Header hdr; memcpy(&hdr, buf, sizeof(hdr)); - if (!isLE()) { hdr = ntohl(hdr); } + if (!isLE()) { + hdr = ntohl(hdr); + } return hdr; } @@ -198,7 +202,9 @@ int rpx::JtagDriver::xferRel(uint8_t* txb, unsigned txBytes, Header* phdr, uint8 throw(rogue::GeneralError::create("JtagDriver::xferRel()", "Protocol error")); } if (xid == XID_ANY || xid == getXid(hdr)) { - if (phdr) { *phdr = hdr; } + if (phdr) { + *phdr = hdr; + } return got; } } catch (rogue::GeneralError&) {} @@ -258,7 +264,7 @@ uint32_t rpx::JtagDriver::setPeriodNs(uint32_t requestedPeriod) { void rpx::JtagDriver::sendVectors(uint64_t bits, uint8_t* tms, uint8_t* tdi, uint8_t* tdo) { unsigned wsz = getWordSize(); - uint64_t bytesCeil = (bits + 8 - 1) / 8; + uint64_t bytesCeil = (bits + 8 - 1) / 8; unsigned wholeWords = bytesCeil / wsz; unsigned wholeWordBytes = wholeWords * wsz; unsigned wordCeilBytes = ((bytesCeil + wsz - 1) / wsz) * wsz; diff --git a/src/rogue/protocols/xilinx/XvcConnection.cpp b/src/rogue/protocols/xilinx/XvcConnection.cpp index 419c0a4d6..b69458794 100644 --- a/src/rogue/protocols/xilinx/XvcConnection.cpp +++ b/src/rogue/protocols/xilinx/XvcConnection.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/protocols/xilinx/XvcConnection.h" @@ -91,7 +91,9 @@ void rpx::XvcConnection::fill(uint64_t n) { void rpx::XvcConnection::bump(uint64_t n) { rp_ += n; rl_ -= n; - if (rl_ == 0) { rp_ = &rxb_[0]; } + if (rl_ == 0) { + rp_ = &rxb_[0]; + } } void rpx::XvcConnection::allocBufs() { @@ -190,7 +192,9 @@ void rpx::XvcConnection::run() { fill(10); bits = 0; - for (got = 9; got >= 6; got--) { bits = (bits << 8) | rp_[got]; } + for (got = 9; got >= 6; got--) { + bits = (bits << 8) | rp_[got]; + } bytes = (bits + 7) / 8; if (bytes > maxVecLen_) @@ -207,7 +211,9 @@ void rpx::XvcConnection::run() { // bother...). for (off = 0, bitsLeft = bits; bitsLeft > 0; bitsLeft -= bitsSent, off += vecLen) { bitsSent = 8 * vecLen; - if (bitsLeft < bitsSent) { bitsSent = bitsLeft; } + if (bitsLeft < bitsSent) { + bitsSent = bitsLeft; + } drv_->sendVectors(bitsSent, rp_ + off, rp_ + bytes + off, &txb_[0] + off); } diff --git a/src/rogue/protocols/xilinx/XvcServer.cpp b/src/rogue/protocols/xilinx/XvcServer.cpp index e5c940d79..b7c8bca86 100644 --- a/src/rogue/protocols/xilinx/XvcServer.cpp +++ b/src/rogue/protocols/xilinx/XvcServer.cpp @@ -13,7 +13,7 @@ * copied, modified, propagated, or distributed except according to the terms * contained in the LICENSE.txt file. * ---------------------------------------------------------------------------- -**/ + **/ #include "rogue/protocols/xilinx/XvcServer.h" @@ -75,7 +75,9 @@ void rpx::XvcServer::run(bool& threadEn, rogue::LoggingPtr log) { try { XvcConnection conn(sd_, drv_, maxMsgSize_); conn.run(); - } catch (rogue::GeneralError& e) { log->debug("Sub-connection failed"); } + } catch (rogue::GeneralError& e) { + log->debug("Sub-connection failed"); + } } } } diff --git a/src/rogue/utilities/Prbs.cpp b/src/rogue/utilities/Prbs.cpp index f400abcb7..45dceffdd 100644 --- a/src/rogue/utilities/Prbs.cpp +++ b/src/rogue/utilities/Prbs.cpp @@ -197,7 +197,9 @@ void ru::Prbs::flfsr(uint8_t* data) { void ru::Prbs::runThread() { txLog_->logThreadId(); - while (threadEn_) { genFrame(txSize_); } + while (threadEn_) { + genFrame(txSize_); + } } //! Auto run data generation @@ -466,19 +468,21 @@ void ru::Prbs::acceptFrame(ris::FramePtr frame) { flfsr(expData); if (!std::equal(frIter, frIter + byteWidth_, expData)) { - snprintf(debugA, sizeof(debugA), - "Bad value at index %" PRIu32 ". count=%" PRIu32 ", size=%" PRIu32, - pos, - rxCount_, - (size / byteWidth_) - 1); + snprintf(debugA, + sizeof(debugA), + "Bad value at index %" PRIu32 ". count=%" PRIu32 ", size=%" PRIu32, + pos, + rxCount_, + (size / byteWidth_) - 1); for (x = 0; x < byteWidth_; x++) { - snprintf(debugB, sizeof(debugB), - "\n %" PRIu32 ":%" PRIu32 " Got=0x%" PRIx8 " Exp=0x%" PRIx8, - pos, - x, - *(frIter + x), - *(expData + x)); + snprintf(debugB, + sizeof(debugB), + "\n %" PRIu32 ":%" PRIu32 " Got=0x%" PRIx8 " Exp=0x%" PRIx8, + pos, + x, + *(frIter + x), + *(expData + x)); snprintf(debugA + strlen(debugA), sizeof(debugA) - strlen(debugA), "%s", debugB); } rxLog_->warning(debugA); diff --git a/src/rogue/utilities/StreamUnZip.cpp b/src/rogue/utilities/StreamUnZip.cpp index 4b86da611..af01e1cec 100644 --- a/src/rogue/utilities/StreamUnZip.cpp +++ b/src/rogue/utilities/StreamUnZip.cpp @@ -82,7 +82,7 @@ void ru::StreamUnZip::acceptFrame(ris::FramePtr frame) { strm.avail_in = (*rBuff)->getPayload(); wBuff = newFrame->beginBuffer(); - strm.next_out = reinterpret_cast((*wBuff)->begin()); + strm.next_out = reinterpret_cast((*wBuff)->begin()); strm.avail_out = (*wBuff)->getAvailable(); // Use the iterators to move data @@ -110,7 +110,7 @@ void ru::StreamUnZip::acceptFrame(ris::FramePtr frame) { } else { ++wBuff; } - strm.next_out = reinterpret_cast((*wBuff)->begin()); + strm.next_out = reinterpret_cast((*wBuff)->begin()); strm.avail_out = (*wBuff)->getAvailable(); } } while (1); diff --git a/src/rogue/utilities/StreamZip.cpp b/src/rogue/utilities/StreamZip.cpp index 9424f2331..994709e52 100644 --- a/src/rogue/utilities/StreamZip.cpp +++ b/src/rogue/utilities/StreamZip.cpp @@ -82,7 +82,7 @@ void ru::StreamZip::acceptFrame(ris::FramePtr frame) { strm.avail_in = (*rBuff)->getPayload(); wBuff = newFrame->beginBuffer(); - strm.next_out = reinterpret_cast((*wBuff)->begin()); + strm.next_out = reinterpret_cast((*wBuff)->begin()); strm.avail_out = (*wBuff)->getAvailable(); // Use the iterators to move data @@ -110,7 +110,7 @@ void ru::StreamZip::acceptFrame(ris::FramePtr frame) { } else { ++wBuff; } - strm.next_out = reinterpret_cast((*wBuff)->begin()); + strm.next_out = reinterpret_cast((*wBuff)->begin()); strm.avail_out = (*wBuff)->getAvailable(); } } while (ret != BZ_STREAM_END); diff --git a/src/rogue/utilities/fileio/LegacyStreamReader.cpp b/src/rogue/utilities/fileio/LegacyStreamReader.cpp index 1de300fd4..b2ed5ebff 100644 --- a/src/rogue/utilities/fileio/LegacyStreamReader.cpp +++ b/src/rogue/utilities/fileio/LegacyStreamReader.cpp @@ -176,7 +176,9 @@ void ruf::LegacyStreamReader::runThread() { size = header & 0x0FFFFFFF; chan = header >> 28; - if (chan == 0) { size = size * 4; } + if (chan == 0) { + size = size * 4; + } // cout << "Frame with size" << size << "and channel" << chan; log.info("Got frame with header %" PRIx32 ", size %" PRIu32 " and channel %" PRIu8, header, size, chan); diff --git a/src/rogue/utilities/fileio/StreamWriter.cpp b/src/rogue/utilities/fileio/StreamWriter.cpp index a519bcc49..230c27570 100644 --- a/src/rogue/utilities/fileio/StreamWriter.cpp +++ b/src/rogue/utilities/fileio/StreamWriter.cpp @@ -306,7 +306,7 @@ void ruf::StreamWriter::intWrite(void* data, uint32_t size) { } currSize_ += size; totSize_ += size; - // Append to buffer if non zero + // Append to buffer if non zero } else if (buffSize_ > 0 && size > 0) { std::memcpy(buffer_ + currBuffer_, data, size); currBuffer_ += size; From c01e85071f1f4e50f496daf8f1fc24da8c09b270 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Wed, 10 Jul 2024 14:17:57 -0700 Subject: [PATCH 38/41] Delete = --- = | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 = diff --git a/= b/= deleted file mode 100644 index e69de29bb..000000000 From 316104b8692368a0af9e4b398bf58f5b4194b4e3 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Thu, 11 Jul 2024 14:48:11 -0500 Subject: [PATCH 39/41] Fix minimum value for Int --- python/pyrogue/_Model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pyrogue/_Model.py b/python/pyrogue/_Model.py index 73503fc9e..5b55764fb 100644 --- a/python/pyrogue/_Model.py +++ b/python/pyrogue/_Model.py @@ -430,7 +430,7 @@ def fromString(self, string): def minValue(self): """ """ - return -1 * ((2**(self.bitSize-1))-1) + return -1 * (2**(self.bitSize-1)) def maxValue(self): """ """ From f64ca1993f6877d2f50fc2ad0e606411489c4bfa Mon Sep 17 00:00:00 2001 From: Ryan Herbst Date: Mon, 22 Jul 2024 20:48:54 -0700 Subject: [PATCH 40/41] Fix high range byte for reads --- src/rogue/interfaces/memory/Block.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index ea1de57cd..baa994e60 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -196,7 +196,9 @@ void rim::Block::intStartTransaction(uint32_t type, bool forceWr, bool check, ri if (type == rim::Read || type == rim::Verify) { if (index < 0 || index >= var->numValues_) { lowByte = var->lowTranByte_[0]; - highByte = var->highTranByte_[0]; + + if ( var->numValues_ == 0 ) highByte = var->highTranByte_[0]; + else highByte = var->highTranByte_[var->numValues_-1]; } else { lowByte = var->lowTranByte_[index]; highByte = var->highTranByte_[index]; From f13d8495cc482e31b19efa91aefbf23e44352365 Mon Sep 17 00:00:00 2001 From: Larry Ruckman Date: Mon, 22 Jul 2024 21:11:00 -0700 Subject: [PATCH 41/41] linter fix --- src/rogue/interfaces/memory/Block.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/rogue/interfaces/memory/Block.cpp b/src/rogue/interfaces/memory/Block.cpp index baa994e60..f7f517f44 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -197,8 +197,11 @@ void rim::Block::intStartTransaction(uint32_t type, bool forceWr, bool check, ri if (index < 0 || index >= var->numValues_) { lowByte = var->lowTranByte_[0]; - if ( var->numValues_ == 0 ) highByte = var->highTranByte_[0]; - else highByte = var->highTranByte_[var->numValues_-1]; + if ( var->numValues_ == 0 ) { + highByte = var->highTranByte_[0]; + } else { + highByte = var->highTranByte_[var->numValues_-1]; + } } else { lowByte = var->lowTranByte_[index]; highByte = var->highTranByte_[index];