// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. #include #include #include #include namespace nb = nanobind; using namespace mscclpp; void register_proxy_channel(nb::module_& m) { nb::class_(m, "BaseProxyService") .def("start_proxy", &BaseProxyService::startProxy) .def("stop_proxy", &BaseProxyService::stopProxy); nb::class_(m, "ProxyService") .def(nb::init(), nb::arg("comm")) .def("start_proxy", &ProxyService::startProxy) .def("stop_proxy", &ProxyService::stopProxy) .def("add_semaphore", &ProxyService::addSemaphore, nb::arg("connection")) .def("add_memory", &ProxyService::addMemory, nb::arg("memory")) .def("semaphore", &ProxyService::semaphore, nb::arg("id")) .def("device_channel", &ProxyService::deviceChannel, nb::arg("id")); nb::class_(m, "ProxyChannel") .def(nb::init(), nb::arg("semaphoreId"), nb::arg("semaphore"), nb::arg("fifo")); nb::class_(m, "SimpleProxyChannel") .def(nb::init(), nb::arg("proxy_chan"), nb::arg("dst"), nb::arg("src")) .def(nb::init(), nb::arg("proxy_chan")); };