From 0ef13515388cd31995995b18bda048d7124a2870 Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Wed, 16 Oct 2024 12:28:35 -0700 Subject: [PATCH] Replace C header includes with C++ includes, rerun clang-format --- include/rogue/hardware/drivers/DmaDriver.h | 21 +++-- include/rogue/interfaces/memory/Block.h | 4 +- include/rogue/interfaces/stream/Master.h | 2 +- include/rogue/protocols/packetizer/CRC.h | 14 ++-- include/rogue/protocols/xilinx/JtagDriver.h | 7 +- src/package.cpp | 3 +- src/rogue/Logging.cpp | 6 +- src/rogue/Version.cpp | 2 +- src/rogue/hardware/MemMap.cpp | 2 +- src/rogue/hardware/axi/AxiMemMap.cpp | 4 +- src/rogue/hardware/axi/AxiStreamDma.cpp | 10 +-- src/rogue/interfaces/ZmqClient.cpp | 6 +- src/rogue/interfaces/ZmqServer.cpp | 8 +- src/rogue/interfaces/api/Bsp.cpp | 15 +--- src/rogue/interfaces/memory/Block.cpp | 76 +++++++------------ src/rogue/interfaces/memory/Emulate.cpp | 2 +- src/rogue/interfaces/memory/Hub.cpp | 4 +- src/rogue/interfaces/memory/Master.cpp | 2 +- src/rogue/interfaces/memory/Slave.cpp | 20 ++--- src/rogue/interfaces/memory/TcpClient.cpp | 1 - src/rogue/interfaces/memory/TcpServer.cpp | 1 - src/rogue/interfaces/memory/Transaction.cpp | 6 +- src/rogue/interfaces/memory/Variable.cpp | 20 ++--- src/rogue/interfaces/stream/Buffer.cpp | 2 +- src/rogue/interfaces/stream/Frame.cpp | 14 +--- src/rogue/interfaces/stream/Master.cpp | 12 +-- 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/CoreV1.cpp | 2 +- src/rogue/protocols/batcher/InverterV1.cpp | 2 +- src/rogue/protocols/batcher/SplitterV1.cpp | 2 +- src/rogue/protocols/packetizer/Controller.cpp | 2 +- .../protocols/packetizer/ControllerV1.cpp | 8 +- .../protocols/packetizer/ControllerV2.cpp | 8 +- src/rogue/protocols/rssi/Controller.cpp | 15 ++-- src/rogue/protocols/rssi/Header.cpp | 2 +- src/rogue/protocols/srp/SrpV0.cpp | 2 +- src/rogue/protocols/srp/SrpV3.cpp | 2 +- src/rogue/protocols/udp/Client.cpp | 4 +- src/rogue/protocols/udp/Server.cpp | 4 +- src/rogue/protocols/xilinx/JtagDriver.cpp | 18 ++--- src/rogue/protocols/xilinx/Xvc.cpp | 5 +- src/rogue/protocols/xilinx/XvcConnection.cpp | 12 +-- src/rogue/protocols/xilinx/XvcServer.cpp | 6 +- src/rogue/utilities/Prbs.cpp | 8 +- .../utilities/fileio/LegacyStreamReader.cpp | 8 +- src/rogue/utilities/fileio/StreamReader.cpp | 2 +- src/rogue/utilities/fileio/StreamWriter.cpp | 5 +- tests/api_test/src/api_test.cpp | 6 +- 51 files changed, 144 insertions(+), 259 deletions(-) diff --git a/include/rogue/hardware/drivers/DmaDriver.h b/include/rogue/hardware/drivers/DmaDriver.h index 858f44ed3..9f679faf5 100644 --- a/include/rogue/hardware/drivers/DmaDriver.h +++ b/include/rogue/hardware/drivers/DmaDriver.h @@ -133,10 +133,6 @@ struct DmaRegisterData { // Conditional inclusion for non-kernel environments #ifndef DMA_IN_KERNEL - #include - #include - #include - #include #include #include #include @@ -144,6 +140,11 @@ struct DmaRegisterData { #include #include + #include + #include + #include + #include + /** * dmaWrite - Writes data to a DMA channel. * @fd: File descriptor for the DMA device. @@ -167,7 +168,7 @@ static inline ssize_t dmaWrite(int32_t fd, const void* buf, size_t size, uint32_ w.flags = flags; w.size = size; w.is32 = (sizeof(void*) == 4); - w.data = (uint64_t)buf;//NOLINT + w.data = (uint64_t)buf; // NOLINT return (write(fd, &w, sizeof(struct DmaWriteData))); } @@ -237,7 +238,7 @@ static inline ssize_t dmaWriteVector(int32_t fd, w.flags = (x == 0) ? begFlags : ((x == (iovlen - 1)) ? endFlags : midFlags); w.size = iov[x].iov_len; w.is32 = (sizeof(void*) == 4); - w.data = (uint64_t)iov[x].iov_base;//NOLINT + w.data = (uint64_t)iov[x].iov_base; // NOLINT do { res = write(fd, &w, sizeof(struct DmaWriteData)); @@ -288,7 +289,7 @@ static inline ssize_t dmaWriteIndexVector(int32_t fd, w.flags = (x == 0) ? begFlags : ((x == (iovlen - 1)) ? endFlags : midFlags); w.size = iov[x].iov_len; w.is32 = (sizeof(void*) == 4); - w.index = (uint32_t)(((uint64_t)iov[x].iov_base) & 0xFFFFFFFF);//NOLINT + w.index = (uint32_t)(((uint64_t)iov[x].iov_base) & 0xFFFFFFFF); // NOLINT do { res = write(fd, &w, sizeof(struct DmaWriteData)); @@ -324,7 +325,7 @@ static inline ssize_t dmaRead(int32_t fd, void* buf, size_t maxSize, uint32_t* f memset(&r, 0, sizeof(struct DmaReadData)); r.size = maxSize; r.is32 = (sizeof(void*) == 4); - r.data = (uint64_t)buf;//NOLINT + r.data = (uint64_t)buf; // NOLINT ret = read(fd, &r, sizeof(struct DmaReadData)); @@ -645,9 +646,7 @@ static inline ssize_t dmaGetBuffCount(int32_t fd) { */ 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) { - return ""; - } + if (ioctl(fd, DMA_Get_GITV, gitv) < 0) { return ""; } gitv[32 - 1] = '\0'; // Ensure null-termination return std::string(gitv); } diff --git a/include/rogue/interfaces/memory/Block.h b/include/rogue/interfaces/memory/Block.h index 5943bcef4..0989ea26e 100644 --- a/include/rogue/interfaces/memory/Block.h +++ b/include/rogue/interfaces/memory/Block.h @@ -48,9 +48,7 @@ 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; } diff --git a/include/rogue/interfaces/stream/Master.h b/include/rogue/interfaces/stream/Master.h index f64316074..02951561c 100644 --- a/include/rogue/interfaces/stream/Master.h +++ b/include/rogue/interfaces/stream/Master.h @@ -19,8 +19,8 @@ #include "rogue/Directives.h" #include -#include +#include #include #include #include diff --git a/include/rogue/protocols/packetizer/CRC.h b/include/rogue/protocols/packetizer/CRC.h index e9862039d..088b18419 100644 --- a/include/rogue/protocols/packetizer/CRC.h +++ b/include/rogue/protocols/packetizer/CRC.h @@ -273,11 +273,11 @@ 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: @@ -553,9 +553,7 @@ 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; } @@ -585,9 +583,7 @@ 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; } diff --git a/include/rogue/protocols/xilinx/JtagDriver.h b/include/rogue/protocols/xilinx/JtagDriver.h index 67889471f..263c9e530 100644 --- a/include/rogue/protocols/xilinx/JtagDriver.h +++ b/include/rogue/protocols/xilinx/JtagDriver.h @@ -20,18 +20,17 @@ #include "rogue/Directives.h" -#include #include #include -#include -#include #include +#include +#include +#include #include #include #include #include -#include #include "rogue/GeneralError.h" #include "rogue/Logging.h" diff --git a/src/package.cpp b/src/package.cpp index 19a9092be..f9e02bfe7 100644 --- a/src/package.cpp +++ b/src/package.cpp @@ -17,9 +17,8 @@ #include "rogue/Directives.h" -#include - #include +#include #include "rogue/Version.h" #include "rogue/module.h" diff --git a/src/rogue/Logging.cpp b/src/rogue/Logging.cpp index d9f95c5a0..5f6c7729c 100644 --- a/src/rogue/Logging.cpp +++ b/src/rogue/Logging.cpp @@ -20,14 +20,14 @@ #include #include -#include #include #include +#include +#include #include -#include #include -#include +#include #if defined(__linux__) #include diff --git a/src/rogue/Version.cpp b/src/rogue/Version.cpp index 0bcb18bce..2c5c8c4b4 100644 --- a/src/rogue/Version.cpp +++ b/src/rogue/Version.cpp @@ -22,9 +22,9 @@ #include #include +#include #include #include -#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" diff --git a/src/rogue/hardware/MemMap.cpp b/src/rogue/hardware/MemMap.cpp index 33fe8c8d1..3de1fd946 100644 --- a/src/rogue/hardware/MemMap.cpp +++ b/src/rogue/hardware/MemMap.cpp @@ -20,12 +20,12 @@ #include #include -#include #include #include #include #include +#include #include #include #include diff --git a/src/rogue/hardware/axi/AxiMemMap.cpp b/src/rogue/hardware/axi/AxiMemMap.cpp index ac6b98a10..628df613f 100644 --- a/src/rogue/hardware/axi/AxiMemMap.cpp +++ b/src/rogue/hardware/axi/AxiMemMap.cpp @@ -20,16 +20,16 @@ #include #include -#include #include #include #include #include +#include #include #include -#include #include +#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" diff --git a/src/rogue/hardware/axi/AxiStreamDma.cpp b/src/rogue/hardware/axi/AxiStreamDma.cpp index 20a85e04c..eaf0fd480 100644 --- a/src/rogue/hardware/axi/AxiStreamDma.cpp +++ b/src/rogue/hardware/axi/AxiStreamDma.cpp @@ -19,11 +19,11 @@ #include "rogue/hardware/axi/AxiStreamDma.h" #include -#include -#include -#include #include +#include +#include +#include #include #include "rogue/GeneralError.h" @@ -133,9 +133,7 @@ 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; diff --git a/src/rogue/interfaces/ZmqClient.cpp b/src/rogue/interfaces/ZmqClient.cpp index 274b5bda7..0f3db6151 100644 --- a/src/rogue/interfaces/ZmqClient.cpp +++ b/src/rogue/interfaces/ZmqClient.cpp @@ -22,9 +22,9 @@ #include #include +#include #include #include -#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" @@ -289,9 +289,7 @@ 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 d7a967b52..97c8195ae 100644 --- a/src/rogue/interfaces/ZmqServer.cpp +++ b/src/rogue/interfaces/ZmqServer.cpp @@ -243,9 +243,7 @@ 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)); } @@ -260,9 +258,7 @@ 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 0d87d4e3a..fa804cae4 100644 --- a/src/rogue/interfaces/api/Bsp.cpp +++ b/src/rogue/interfaces/api/Bsp.cpp @@ -17,9 +17,8 @@ #include "rogue/interfaces/api/Bsp.h" #include - -#include #include +#include #include "rogue/GeneralError.h" @@ -57,9 +56,7 @@ 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)()) { @@ -113,18 +110,14 @@ 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 bebcaff5f..931929c9f 100644 --- a/src/rogue/interfaces/memory/Block.cpp +++ b/src/rogue/interfaces/memory/Block.cpp @@ -20,17 +20,17 @@ #include "rogue/interfaces/memory/Block.h" #include -#include #include #include +#include +#include #include #include #include #include -#include #include -#include +#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" @@ -191,19 +191,17 @@ 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) { if (index < 0 || index >= var->numValues_) { - lowByte = var->lowTranByte_[0]; + lowByte = var->lowTranByte_[0]; - if ( var->numValues_ == 0 ) { + if (var->numValues_ == 0) { highByte = var->highTranByte_[0]; } else { - highByte = var->highTranByte_[var->numValues_-1]; + highByte = var->highTranByte_[var->numValues_ - 1]; } } else { lowByte = var->lowTranByte_[index]; @@ -514,14 +512,14 @@ 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( @@ -735,9 +733,7 @@ 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_); } } ////////////////////////////////////////// @@ -926,15 +922,11 @@ void rim::Block::setUIntPy(bp::object& value, rim::Variable* var, int32_t index) if (PyArray_TYPE(arr) == NPY_UINT64) { uint64_t* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(uint64_t); - for (x = 0; x < dims[0]; x++) { - setUInt(src[x * stride], var, index + x); - } + for (x = 0; x < dims[0]; x++) { setUInt(src[x * stride], var, index + x); } } else if (PyArray_TYPE(arr) == NPY_UINT32) { uint32_t* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(uint32_t); - for (x = 0; x < dims[0]; x++) { - setUInt(src[x * stride], var, index + x); - } + for (x = 0; x < dims[0]; x++) { setUInt(src[x * stride], var, index + x); } } else { throw(rogue::GeneralError::create("Block::setUIntPy", "Passed nparray is not of type (uint64 or uint32) for %s", @@ -1089,17 +1081,13 @@ void rim::Block::setIntPy(bp::object& value, rim::Variable* var, int32_t index) var->name_.c_str())); if (PyArray_TYPE(arr) == NPY_INT64) { - int64_t* src = reinterpret_cast(PyArray_DATA(arr)); + int64_t* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(int64_t); - for (x = 0; x < dims[0]; x++) { - setInt(src[x * stride], var, index + x); - } + for (x = 0; x < dims[0]; x++) { setInt(src[x * stride], var, index + x); } } else if (PyArray_TYPE(arr) == NPY_INT32) { - int32_t* src = reinterpret_cast(PyArray_DATA(arr)); + int32_t* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(int32_t); - for (x = 0; x < dims[0]; x++) { - setInt(src[x * stride], var, index + x); - } + for (x = 0; x < dims[0]; x++) { setInt(src[x * stride], var, index + x); } } else { throw(rogue::GeneralError::create("Block::setIntPy", "Passed nparray is not of type (int64 or int32) for %s", @@ -1260,11 +1248,9 @@ void rim::Block::setBoolPy(bp::object& value, rim::Variable* var, int32_t index) var->name_.c_str())); if (PyArray_TYPE(arr) == NPY_BOOL) { - bool* src = reinterpret_cast(PyArray_DATA(arr)); + bool* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(bool); - for (x = 0; x < dims[0]; x++) { - setBool(src[x * stride], var, index + x); - } + for (x = 0; x < dims[0]; x++) { setBool(src[x * stride], var, index + x); } } else { throw(rogue::GeneralError::create("Block::setBoolPy", "Passed nparray is not of type (bool) for %s", @@ -1472,11 +1458,9 @@ void rim::Block::setFloatPy(bp::object& value, rim::Variable* var, int32_t index var->name_.c_str())); if (PyArray_TYPE(arr) == NPY_FLOAT32) { - float* src = reinterpret_cast(PyArray_DATA(arr)); + float* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(float); - for (x = 0; x < dims[0]; x++) { - setFloat(src[x * stride], var, index + x); - } + for (x = 0; x < dims[0]; x++) { setFloat(src[x * stride], var, index + x); } } else { throw(rogue::GeneralError::create("Block::setFLoatPy", "Passed nparray is not of type (float32) for %s", @@ -1621,11 +1605,9 @@ void rim::Block::setDoublePy(bp::object& value, rim::Variable* var, int32_t inde var->name_.c_str())); if (PyArray_TYPE(arr) == NPY_FLOAT64) { - double* src = reinterpret_cast(PyArray_DATA(arr)); + double* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(double); - for (x = 0; x < dims[0]; x++) { - setDouble(src[x * stride], var, index + x); - } + for (x = 0; x < dims[0]; x++) { setDouble(src[x * stride], var, index + x); } } else { throw(rogue::GeneralError::create("Block::setFLoatPy", "Passed nparray is not of type (double) for %s", @@ -1770,11 +1752,9 @@ void rim::Block::setFixedPy(bp::object& value, rim::Variable* var, int32_t index var->name_.c_str())); if (PyArray_TYPE(arr) == NPY_FLOAT64) { - double* src = reinterpret_cast(PyArray_DATA(arr)); + double* src = reinterpret_cast(PyArray_DATA(arr)); npy_intp stride = strides[0] / sizeof(double); - for (x = 0; x < dims[0]; x++) { - setFixed(src[x * stride], var, index + x); - } + for (x = 0; x < dims[0]; x++) { setFixed(src[x * stride], var, index + x); } } else { throw(rogue::GeneralError::create("Block::setFixedPy", "Passed nparray is not of type (double) for %s", @@ -1875,9 +1855,7 @@ void rim::Block::setFixed(const double& val, rim::Variable* var, int32_t index) int64_t fPoint = static_cast(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); } @@ -1888,9 +1866,7 @@ 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 edc793c57..62520905c 100644 --- a/src/rogue/interfaces/memory/Emulate.cpp +++ b/src/rogue/interfaces/memory/Emulate.cpp @@ -21,8 +21,8 @@ #include "rogue/interfaces/memory/Emulate.h" #include -#include +#include #include #include #include diff --git a/src/rogue/interfaces/memory/Hub.cpp b/src/rogue/interfaces/memory/Hub.cpp index 95c1958ef..f0f431597 100644 --- a/src/rogue/interfaces/memory/Hub.cpp +++ b/src/rogue/interfaces/memory/Hub.cpp @@ -181,9 +181,7 @@ 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 71dd56843..be47fe6eb 100644 --- a/src/rogue/interfaces/memory/Master.cpp +++ b/src/rogue/interfaces/memory/Master.cpp @@ -19,8 +19,8 @@ #include "rogue/interfaces/memory/Master.h" #include -#include +#include #include #include #include diff --git a/src/rogue/interfaces/memory/Slave.cpp b/src/rogue/interfaces/memory/Slave.cpp index 80d4e8bf6..317a7e16f 100644 --- a/src/rogue/interfaces/memory/Slave.cpp +++ b/src/rogue/interfaces/memory/Slave.cpp @@ -100,9 +100,7 @@ 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; } @@ -190,9 +188,7 @@ 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()); @@ -211,9 +207,7 @@ 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()); @@ -232,9 +226,7 @@ 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()); @@ -254,9 +246,7 @@ void rim::SlaveWrap::doTransaction(rim::TransactionPtr transaction) { try { pb(transaction); return; - } catch (...) { - PyErr_Print(); - } + } catch (...) { PyErr_Print(); } } } rim::Slave::doTransaction(transaction); diff --git a/src/rogue/interfaces/memory/TcpClient.cpp b/src/rogue/interfaces/memory/TcpClient.cpp index b227a82cd..586561a2c 100644 --- a/src/rogue/interfaces/memory/TcpClient.cpp +++ b/src/rogue/interfaces/memory/TcpClient.cpp @@ -19,7 +19,6 @@ #include "rogue/interfaces/memory/TcpClient.h" #include -#include #include #include diff --git a/src/rogue/interfaces/memory/TcpServer.cpp b/src/rogue/interfaces/memory/TcpServer.cpp index 46ad41f47..be04cf6da 100644 --- a/src/rogue/interfaces/memory/TcpServer.cpp +++ b/src/rogue/interfaces/memory/TcpServer.cpp @@ -19,7 +19,6 @@ #include "rogue/interfaces/memory/TcpServer.h" #include -#include #include #include diff --git a/src/rogue/interfaces/memory/Transaction.cpp b/src/rogue/interfaces/memory/Transaction.cpp index 62f69d16e..5a8230c88 100644 --- a/src/rogue/interfaces/memory/Transaction.cpp +++ b/src/rogue/interfaces/memory/Transaction.cpp @@ -22,9 +22,9 @@ #include #include +#include #include #include -#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" @@ -109,9 +109,7 @@ 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 ae2779b26..29eff3c28 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -18,17 +18,17 @@ #include "rogue/interfaces/memory/Variable.h" -#include #include #include +#include +#include #include #include #include #include -#include -#include #include +#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" @@ -473,7 +473,7 @@ void rim::Variable::shiftOffsetDown(uint32_t shift, uint32_t minSize) { highTranByte_[0] = varBytes_ - 1; staleHighByte_ = highTranByte_[0]; - // List variable + // List variable } else { for (x = 0; x < numValues_; x++) { lowTranByte_[x] = @@ -623,9 +623,7 @@ void rim::VariableWrap::queueUpdate() { try { pb(); return; - } catch (...) { - PyErr_Print(); - } + } catch (...) { PyErr_Print(); } } } @@ -654,9 +652,7 @@ 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); @@ -666,9 +662,7 @@ 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/Buffer.cpp b/src/rogue/interfaces/stream/Buffer.cpp index 6f6f32a3a..21b18c88e 100644 --- a/src/rogue/interfaces/stream/Buffer.cpp +++ b/src/rogue/interfaces/stream/Buffer.cpp @@ -19,8 +19,8 @@ #include -#include #include +#include #include "rogue/GeneralError.h" #include "rogue/interfaces/stream/Frame.h" diff --git a/src/rogue/interfaces/stream/Frame.cpp b/src/rogue/interfaces/stream/Frame.cpp index f59994e6e..6713079f9 100644 --- a/src/rogue/interfaces/stream/Frame.cpp +++ b/src/rogue/interfaces/stream/Frame.cpp @@ -20,8 +20,8 @@ #include -#include #include +#include #include "rogue/GeneralError.h" #include "rogue/interfaces/stream/Buffer.h" @@ -434,9 +434,7 @@ 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 @@ -444,9 +442,7 @@ 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(); @@ -472,9 +468,7 @@ 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/Master.cpp b/src/rogue/interfaces/stream/Master.cpp index 34bcff666..297d697a3 100644 --- a/src/rogue/interfaces/stream/Master.cpp +++ b/src/rogue/interfaces/stream/Master.cpp @@ -156,9 +156,7 @@ void ris::Master::equalsPy(boost::python::object p) { 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 @@ -174,9 +172,7 @@ void ris::Master::equalsPy(boost::python::object p) { 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) @@ -204,9 +200,7 @@ bp::object ris::Master::rshiftPy(bp::object p) { 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 e7a918a46..5a3e0013e 100644 --- a/src/rogue/interfaces/stream/Pool.cpp +++ b/src/rogue/interfaces/stream/Pool.cpp @@ -49,9 +49,7 @@ 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 19bed311f..a369b5b2c 100644 --- a/src/rogue/interfaces/stream/RateDrop.cpp +++ b/src/rogue/interfaces/stream/RateDrop.cpp @@ -21,8 +21,8 @@ #include #include -#include #include +#include #include "rogue/Logging.h" #include "rogue/interfaces/stream/Frame.h" diff --git a/src/rogue/interfaces/stream/Slave.cpp b/src/rogue/interfaces/stream/Slave.cpp index dbd1d9971..0c6894ef7 100644 --- a/src/rogue/interfaces/stream/Slave.cpp +++ b/src/rogue/interfaces/stream/Slave.cpp @@ -21,12 +21,12 @@ #include "rogue/interfaces/stream/Slave.h" #include -#include #include +#include +#include #include #include -#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" @@ -115,9 +115,7 @@ void ris::SlaveWrap::acceptFrame(ris::FramePtr frame) { try { pb(frame); return; - } catch (...) { - PyErr_Print(); - } + } catch (...) { PyErr_Print(); } } } ris::Slave::acceptFrame(frame); diff --git a/src/rogue/interfaces/stream/TcpCore.cpp b/src/rogue/interfaces/stream/TcpCore.cpp index f363e95e6..514ab3311 100644 --- a/src/rogue/interfaces/stream/TcpCore.cpp +++ b/src/rogue/interfaces/stream/TcpCore.cpp @@ -19,9 +19,9 @@ #include "rogue/interfaces/stream/TcpCore.h" #include -#include #include +#include #include #include diff --git a/src/rogue/protocols/batcher/CoreV1.cpp b/src/rogue/protocols/batcher/CoreV1.cpp index fff5014f2..cfbedada8 100644 --- a/src/rogue/protocols/batcher/CoreV1.cpp +++ b/src/rogue/protocols/batcher/CoreV1.cpp @@ -41,9 +41,9 @@ #include "rogue/protocols/batcher/CoreV1.h" #include -#include #include +#include #include #include diff --git a/src/rogue/protocols/batcher/InverterV1.cpp b/src/rogue/protocols/batcher/InverterV1.cpp index 56aed6007..ad6ab7437 100644 --- a/src/rogue/protocols/batcher/InverterV1.cpp +++ b/src/rogue/protocols/batcher/InverterV1.cpp @@ -18,9 +18,9 @@ #include "rogue/protocols/batcher/InverterV1.h" -#include #include +#include #include #include diff --git a/src/rogue/protocols/batcher/SplitterV1.cpp b/src/rogue/protocols/batcher/SplitterV1.cpp index df8a82b07..1048bf349 100644 --- a/src/rogue/protocols/batcher/SplitterV1.cpp +++ b/src/rogue/protocols/batcher/SplitterV1.cpp @@ -18,9 +18,9 @@ #include "rogue/protocols/batcher/SplitterV1.h" -#include #include +#include #include #include diff --git a/src/rogue/protocols/packetizer/Controller.cpp b/src/rogue/protocols/packetizer/Controller.cpp index a70d0d99c..90146cc0b 100644 --- a/src/rogue/protocols/packetizer/Controller.cpp +++ b/src/rogue/protocols/packetizer/Controller.cpp @@ -17,8 +17,8 @@ #include "rogue/protocols/packetizer/Controller.h" #include -#include +#include #include #include "rogue/GeneralError.h" diff --git a/src/rogue/protocols/packetizer/ControllerV1.cpp b/src/rogue/protocols/packetizer/ControllerV1.cpp index 9204a4612..f37f9445c 100644 --- a/src/rogue/protocols/packetizer/ControllerV1.cpp +++ b/src/rogue/protocols/packetizer/ControllerV1.cpp @@ -17,11 +17,11 @@ #include "rogue/protocols/packetizer/ControllerV1.h" #include -#include -#include #include #include +#include +#include #include #include "rogue/GeneralError.h" @@ -165,9 +165,7 @@ 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 b5ea3f1f1..1990f8d70 100644 --- a/src/rogue/protocols/packetizer/ControllerV2.cpp +++ b/src/rogue/protocols/packetizer/ControllerV2.cpp @@ -17,11 +17,11 @@ #include "rogue/protocols/packetizer/ControllerV2.h" #include -#include -#include #include #include +#include +#include #include #include "rogue/GeneralError.h" @@ -233,9 +233,7 @@ 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 1e9ea10c4..ce9300d37 100644 --- a/src/rogue/protocols/rssi/Controller.cpp +++ b/src/rogue/protocols/rssi/Controller.cpp @@ -17,15 +17,14 @@ #include "rogue/protocols/rssi/Controller.h" #include -#include -#include -#include #include #include #include -#include +#include +#include #include +#include #include #include "rogue/GeneralError.h" @@ -237,9 +236,7 @@ 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 @@ -391,9 +388,7 @@ 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_) { diff --git a/src/rogue/protocols/rssi/Header.cpp b/src/rogue/protocols/rssi/Header.cpp index a453e9cbe..93cf22910 100644 --- a/src/rogue/protocols/rssi/Header.cpp +++ b/src/rogue/protocols/rssi/Header.cpp @@ -19,9 +19,9 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/src/rogue/protocols/srp/SrpV0.cpp b/src/rogue/protocols/srp/SrpV0.cpp index ff9a71742..cd66d4d65 100644 --- a/src/rogue/protocols/srp/SrpV0.cpp +++ b/src/rogue/protocols/srp/SrpV0.cpp @@ -20,8 +20,8 @@ #include #include -#include +#include #include #include diff --git a/src/rogue/protocols/srp/SrpV3.cpp b/src/rogue/protocols/srp/SrpV3.cpp index 754e56902..73a4fdb01 100644 --- a/src/rogue/protocols/srp/SrpV3.cpp +++ b/src/rogue/protocols/srp/SrpV3.cpp @@ -20,8 +20,8 @@ #include #include -#include +#include #include #include diff --git a/src/rogue/protocols/udp/Client.cpp b/src/rogue/protocols/udp/Client.cpp index 6fc700534..e64120b7c 100644 --- a/src/rogue/protocols/udp/Client.cpp +++ b/src/rogue/protocols/udp/Client.cpp @@ -19,10 +19,10 @@ #include "rogue/protocols/udp/Client.h" #include -#include -#include #include +#include +#include #include #include diff --git a/src/rogue/protocols/udp/Server.cpp b/src/rogue/protocols/udp/Server.cpp index 5b201ce5d..a24a4f63b 100644 --- a/src/rogue/protocols/udp/Server.cpp +++ b/src/rogue/protocols/udp/Server.cpp @@ -19,10 +19,10 @@ #include "rogue/protocols/udp/Server.h" #include -#include -#include #include +#include +#include #include #include diff --git a/src/rogue/protocols/xilinx/JtagDriver.cpp b/src/rogue/protocols/xilinx/JtagDriver.cpp index 91ed7b543..31f7ee3c9 100644 --- a/src/rogue/protocols/xilinx/JtagDriver.cpp +++ b/src/rogue/protocols/xilinx/JtagDriver.cpp @@ -21,14 +21,14 @@ #include #include -#include #include #include #include -#include -#include +#include #include +#include +#include namespace rpx = rogue::protocols::xilinx; @@ -132,9 +132,7 @@ 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; @@ -152,9 +150,7 @@ 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; } @@ -204,9 +200,7 @@ 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&) {} diff --git a/src/rogue/protocols/xilinx/Xvc.cpp b/src/rogue/protocols/xilinx/Xvc.cpp index 3e6d1b7e5..23e990774 100644 --- a/src/rogue/protocols/xilinx/Xvc.cpp +++ b/src/rogue/protocols/xilinx/Xvc.cpp @@ -19,13 +19,12 @@ #include "rogue/protocols/xilinx/Xvc.h" #include -#include -#include #include +#include +#include #include #include -#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" diff --git a/src/rogue/protocols/xilinx/XvcConnection.cpp b/src/rogue/protocols/xilinx/XvcConnection.cpp index b8735edcc..38b0c2d6a 100644 --- a/src/rogue/protocols/xilinx/XvcConnection.cpp +++ b/src/rogue/protocols/xilinx/XvcConnection.cpp @@ -93,9 +93,7 @@ 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() { @@ -194,9 +192,7 @@ 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_) @@ -213,9 +209,7 @@ 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 b7c8bca86..fb3edd9dd 100644 --- a/src/rogue/protocols/xilinx/XvcServer.cpp +++ b/src/rogue/protocols/xilinx/XvcServer.cpp @@ -19,12 +19,12 @@ #include #include -#include #include #include #include #include +#include #include #include "rogue/protocols/xilinx/XvcConnection.h" @@ -75,9 +75,7 @@ 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 8cbcb0e32..1d4bd67fb 100644 --- a/src/rogue/utilities/Prbs.cpp +++ b/src/rogue/utilities/Prbs.cpp @@ -20,12 +20,12 @@ #include #include -#include #include #include -#include #include +#include +#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" @@ -198,9 +198,7 @@ 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 diff --git a/src/rogue/utilities/fileio/LegacyStreamReader.cpp b/src/rogue/utilities/fileio/LegacyStreamReader.cpp index 7e348b8c6..0d76cf049 100644 --- a/src/rogue/utilities/fileio/LegacyStreamReader.cpp +++ b/src/rogue/utilities/fileio/LegacyStreamReader.cpp @@ -21,13 +21,13 @@ #include #include #include -#include #include +#include #include #include -#include #include +#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" @@ -177,9 +177,7 @@ 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/StreamReader.cpp b/src/rogue/utilities/fileio/StreamReader.cpp index 6f960c6db..849663d72 100644 --- a/src/rogue/utilities/fileio/StreamReader.cpp +++ b/src/rogue/utilities/fileio/StreamReader.cpp @@ -24,8 +24,8 @@ #include #include -#include #include +#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" diff --git a/src/rogue/utilities/fileio/StreamWriter.cpp b/src/rogue/utilities/fileio/StreamWriter.cpp index 48cb25480..6e614d285 100644 --- a/src/rogue/utilities/fileio/StreamWriter.cpp +++ b/src/rogue/utilities/fileio/StreamWriter.cpp @@ -35,15 +35,14 @@ #include #include #include -#include #include #include #include -#include -#include #include +#include #include +#include #include "rogue/GeneralError.h" #include "rogue/GilRelease.h" diff --git a/tests/api_test/src/api_test.cpp b/tests/api_test/src/api_test.cpp index 9e8f166d3..2be13af88 100644 --- a/tests/api_test/src/api_test.cpp +++ b/tests/api_test/src/api_test.cpp @@ -9,10 +9,10 @@ * ---------------------------------------------------------------------------- **/ -#include "rogue/interfaces/api/Bsp.h" - -#include #include +#include + +#include "rogue/interfaces/api/Bsp.h" void varListener(std::string path, std::string value) { printf("Var Listener: %s = %s\n", path.c_str(), value.c_str());