@@ -155,12 +155,12 @@ void DeviceBindings::bind(pybind11::module& m, void* pCallstack){
155155 // Non blocking constructor
156156 py::gil_scoped_release release;
157157 return std::make_unique<DeviceBase>(version, deviceInfo, usb2Mode);
158- }), py::arg (" version" ), py::arg (" deviceDesc " ), py::arg (" usb2Mode" ) = false , DOC (dai, DeviceBase, DeviceBase, 15 ))
158+ }), py::arg (" version" ), py::arg (" devInfo " ), py::arg (" usb2Mode" ) = false , DOC (dai, DeviceBase, DeviceBase, 15 ))
159159 .def (py::init ([](OpenVINO::Version version, const DeviceInfo& deviceInfo, std::string pathToCmd){
160160 // Non blocking constructor
161161 py::gil_scoped_release release;
162162 return std::make_unique<DeviceBase>(version, deviceInfo, pathToCmd);
163- }), py::arg (" version" ), py::arg (" deviceDesc " ), py::arg (" pathToCmd" ), DOC (dai, DeviceBase, DeviceBase, 16 ))
163+ }), py::arg (" version" ), py::arg (" devInfo " ), py::arg (" pathToCmd" ), DOC (dai, DeviceBase, DeviceBase, 16 ))
164164
165165 .def (" isPipelineRunning" , [](DeviceBase& d) { py::gil_scoped_release release; return d.isPipelineRunning (); }, DOC (dai, DeviceBase, isPipelineRunning))
166166 .def (" startPipeline" , [](DeviceBase& d){
@@ -198,6 +198,8 @@ void DeviceBindings::bind(pybind11::module& m, void* pCallstack){
198198 .def (" getMxId" , [](DeviceBase& d) { py::gil_scoped_release release; return d.getMxId (); }, DOC (dai, DeviceBase, getMxId))
199199 .def (" readCalibration" , [](DeviceBase& d) { py::gil_scoped_release release; return d.readCalibration (); }, DOC (dai, DeviceBase, readCalibration))
200200 .def (" flashCalibration" , [](DeviceBase& d, CalibrationHandler calibrationDataHandler) { py::gil_scoped_release release; return d.flashCalibration (calibrationDataHandler); }, py::arg (" calibrationDataHandler" ), DOC (dai, DeviceBase, flashCalibration))
201+ .def (" setXLinkChunkSize" , [](DeviceBase& d, int s) { py::gil_scoped_release release; d.setXLinkChunkSize (s); }, py::arg (" sizeBytes" ), DOC (dai, DeviceBase, setXLinkChunkSize))
202+ .def (" getXLinkChunkSize" , [](DeviceBase& d) { py::gil_scoped_release release; return d.getXLinkChunkSize (); }, DOC (dai, DeviceBase, getXLinkChunkSize))
201203 ;
202204
203205
@@ -222,6 +224,27 @@ void DeviceBindings::bind(pybind11::module& m, void* pCallstack){
222224 return std::make_unique<Device>(pipeline, deviceInfo, pathToCmd);
223225 }), py::arg (" pipeline" ), py::arg (" devInfo" ), py::arg (" pathToCmd" ), DOC (dai, Device, Device, 7 ))
224226
227+ // Device constructor - OpenVINO version
228+ .def (py::init ([](OpenVINO::Version version){ return deviceConstructorHelper<Device>(version); }), py::arg (" version" ) = Pipeline::DEFAULT_OPENVINO_VERSION, DOC (dai, DeviceBase, DeviceBase, 10 ))
229+ .def (py::init ([](OpenVINO::Version version, bool usb2Mode){
230+ // Blocking constructor
231+ return deviceConstructorHelper<Device>(version, std::string (" " ), usb2Mode);
232+ }), py::arg (" version" ), py::arg (" usb2Mode" ), DOC (dai, DeviceBase, DeviceBase, 11 ))
233+ .def (py::init ([](OpenVINO::Version version, const std::string& pathToCmd){
234+ // Blocking constructor
235+ return deviceConstructorHelper<Device>(version, pathToCmd);
236+ }), py::arg (" version" ), py::arg (" pathToCmd" ), DOC (dai, DeviceBase, DeviceBase, 12 ))
237+ .def (py::init ([](OpenVINO::Version version, const DeviceInfo& deviceInfo, bool usb2Mode){
238+ // Non blocking constructor
239+ py::gil_scoped_release release;
240+ return std::make_unique<Device>(version, deviceInfo, usb2Mode);
241+ }), py::arg (" version" ), py::arg (" devInfo" ), py::arg (" usb2Mode" ) = false , DOC (dai, DeviceBase, DeviceBase, 15 ))
242+ .def (py::init ([](OpenVINO::Version version, const DeviceInfo& deviceInfo, std::string pathToCmd){
243+ // Non blocking constructor
244+ py::gil_scoped_release release;
245+ return std::make_unique<Device>(version, deviceInfo, pathToCmd);
246+ }), py::arg (" version" ), py::arg (" devInfo" ), py::arg (" pathToCmd" ), DOC (dai, DeviceBase, DeviceBase, 16 ))
247+
225248 .def (" getOutputQueue" , static_cast <std::shared_ptr<DataOutputQueue>(Device::*)(const std::string&)>(&Device::getOutputQueue), py::arg (" name" ), DOC (dai, Device, getOutputQueue))
226249 .def (" getOutputQueue" , static_cast <std::shared_ptr<DataOutputQueue>(Device::*)(const std::string&, unsigned int , bool )>(&Device::getOutputQueue), py::arg (" name" ), py::arg (" maxSize" ), py::arg (" blocking" ) = true , DOC (dai, Device, getOutputQueue, 2 ))
227250 .def (" getOutputQueueNames" , &Device::getOutputQueueNames, DOC (dai, Device, getOutputQueueNames))
0 commit comments