forked from zivid/zivid-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSingletonApplication.cpp
More file actions
24 lines (20 loc) · 881 Bytes
/
SingletonApplication.cpp
File metadata and controls
24 lines (20 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <Zivid/CameraInfo.h>
#include <ZividPython/SingletonApplication.h>
#include <pybind11/pybind11.h>
namespace py = pybind11;
namespace ZividPython
{
void wrapClass(pybind11::class_<SingletonApplication> pyClass)
{
pyClass.def(py::init())
.def("cameras", &SingletonApplication::cameras)
.def("connect_camera", [](SingletonApplication &application) { return application.connectCamera(); })
.def(
"connect_camera",
[](SingletonApplication &application, const std::string &serialNumber) {
return application.connectCamera(Zivid::CameraInfo::SerialNumber{ serialNumber });
},
py::arg("serial_number"))
.def("create_file_camera", &SingletonApplication::createFileCamera, py::arg("frame_file"));
}
} // namespace ZividPython