mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-12-30 16:11:19 +01:00
python compiles
This commit is contained in:
@@ -21,16 +21,16 @@ void init_bit(py::module &m) {
|
||||
.def(py::init<uint32_t>())
|
||||
.def(py::init<const RegisterAddress &>())
|
||||
.def("__repr__", &RegisterAddress::str)
|
||||
.def("str", &RegisterAddress::str);
|
||||
.def("str", &RegisterAddress::str)
|
||||
.def("uint32", [](const RegisterAddress &v) { return static_cast<uint32_t>(v); })
|
||||
.def(py::self == py::self)
|
||||
.def(py::self != py::self)
|
||||
.def(py::self != py::self);
|
||||
|
||||
py::class_<BitPosition>(m, "BitPosition")
|
||||
.def(py::init())
|
||||
.def(py::init<RegisterAddress address, int>())
|
||||
.def(py::init<RegisterAddress, int>())
|
||||
.def("__repr__", &BitPosition::str)
|
||||
.def("str", &BitPosition::str);
|
||||
.def("str", &BitPosition::str)
|
||||
.def("address", &BitPosition::address)
|
||||
.def("bitPosition", &BitPosition::bitPosition)
|
||||
.def("setAddress", &BitPosition::setAddress)
|
||||
|
||||
@@ -16,10 +16,13 @@
|
||||
#include <chrono>
|
||||
namespace py = pybind11;
|
||||
void init_det(py::module &m) {
|
||||
using sls::BitPosition;
|
||||
using sls::defs;
|
||||
using sls::Detector;
|
||||
using sls::ns;
|
||||
using sls::Positions;
|
||||
using sls::RegisterAddress;
|
||||
using sls::RegisterValue;
|
||||
using sls::Result;
|
||||
|
||||
m.def("freeSharedMemory",
|
||||
|
||||
@@ -19,6 +19,9 @@ void init_det(py::module &m) {
|
||||
using sls::ns;
|
||||
using sls::Positions;
|
||||
using sls::Result;
|
||||
using sls::RegisterAddress;
|
||||
using sls::RegisterValue;
|
||||
using sls::BitPosition;
|
||||
|
||||
m.def("freeSharedMemory", (void (*)(const int, const int)) &sls::freeSharedMemory, py::arg() = 0, py::arg() = -1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user