From 9c952d5006ba387e7d58f94bcd6704f440c63fec Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Wed, 13 Sep 2023 12:17:39 -0700 Subject: [PATCH] Formatting --- python/pyrogue/_Variable.py | 19 +++- src/rogue/interfaces/memory/Variable.cpp | 109 ++++++++++++----------- 2 files changed, 72 insertions(+), 56 deletions(-) diff --git a/python/pyrogue/_Variable.py b/python/pyrogue/_Variable.py index 26983dde4..637806a9e 100644 --- a/python/pyrogue/_Variable.py +++ b/python/pyrogue/_Variable.py @@ -1042,9 +1042,22 @@ def __init__(self, *, listData = VariableListData(numValues,valueBits,valueStride) # Setup C++ Base class - rim.Variable.__init__(self,self._name,self._mode,self._minimum,self._maximum, - offset, bitOffset, bitSize, overlapEn, verify, - self._bulkOpEn, self._updateNotify, self._base, listData, retryCount) + rim.Variable.__init__( + self, + self._name, + self._mode, + self._minimum, + self._maximum, + offset, + bitOffset, + bitSize, + overlapEn, + verify, + self._bulkOpEn, + self._updateNotify, + self._base, + listData, + retryCount) ############################## diff --git a/src/rogue/interfaces/memory/Variable.cpp b/src/rogue/interfaces/memory/Variable.cpp index cfb92dc56..01934be9b 100644 --- a/src/rogue/interfaces/memory/Variable.cpp +++ b/src/rogue/interfaces/memory/Variable.cpp @@ -43,65 +43,68 @@ namespace bp = boost::python; #endif //! Class factory which returns a pointer to a Variable (VariablePtr) -rim::VariablePtr rim::Variable::create(std::string name, - std::string mode, - double minimum, - double maximum, - uint64_t offset, - std::vector bitOffset, - std::vector bitSize, - bool overlapEn, - bool verify, - bool bulkOpEn, - bool updateNotify, - uint32_t modelId, - bool byteReverse, - bool bitReverse, - uint32_t binPoint, - uint32_t numValues, - uint32_t valueBits, - uint32_t valueStride, - uint32_t retryCount) { - rim::VariablePtr v = std::make_shared(name, - mode, - minimum, - maximum, - offset, - bitOffset, - bitSize, - overlapEn, - verify, - bulkOpEn, - updateNotify, - modelId, - byteReverse, - bitReverse, - binPoint, - numValues, - valueBits, - valueStride, - retryCount); +rim::VariablePtr rim::Variable::create( + std::string name, + std::string mode, + double minimum, + double maximum, + uint64_t offset, + std::vector bitOffset, + std::vector bitSize, + bool overlapEn, + bool verify, + bool bulkOpEn, + bool updateNotify, + uint32_t modelId, + bool byteReverse, + bool bitReverse, + uint32_t binPoint, + uint32_t numValues, + uint32_t valueBits, + uint32_t valueStride, + uint32_t retryCount) { + rim::VariablePtr v = std::make_shared( + name, + mode, + minimum, + maximum, + offset, + bitOffset, + bitSize, + overlapEn, + verify, + bulkOpEn, + updateNotify, + modelId, + byteReverse, + bitReverse, + binPoint, + numValues, + valueBits, + valueStride, + retryCount); return (v); } // Setup class for use in python void rim::Variable::setup_python() { #ifndef NO_PYTHON - bp::class_("Variable", - bp::init()) + bp::class_( + "Variable", + bp::init()) .def("_varBytes", &rim::Variable::varBytes) .def("_offset", &rim::Variable::offset) .def("_shiftOffsetDown", &rim::Variable::shiftOffsetDown)