mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 11:20:04 +02:00

* initital implementation * datetime replaces with sls::Duration in Python C bindings * using custom type caster * fix for conversion to seconds * added set_count in python * common header for pybind11 includes authored-by: Erik Frojdh <erik.frojdh@psi.ch>
18 lines
540 B
C++
18 lines
540 B
C++
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
#include "py_headers.h"
|
|
|
|
#include "sls/Pattern.h"
|
|
#include "sls/sls_detector_defs.h"
|
|
namespace py = pybind11;
|
|
void init_enums(py::module &m) {
|
|
py::class_<slsDetectorDefs> Defs(m, "slsDetectorDefs");
|
|
py::class_<slsDetectorDefs::xy> xy(m, "xy");
|
|
xy.def(py::init());
|
|
xy.def(py::init<int, int>());
|
|
xy.def_readwrite("x", &slsDetectorDefs::xy::x);
|
|
xy.def_readwrite("y", &slsDetectorDefs::xy::y);
|
|
|
|
[[ENUMS]]
|
|
}
|