Created
May 20, 2019 20:20
-
-
Save QiMata/33d364ac9873eca30413ccb5a7606fa8 to your computer and use it in GitHub Desktop.
The python portion of the shared memory provider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOST_PYTHON_MODULE(ScryUnlimitedCommunicator) | |
{ | |
Py_Initialize(); | |
class_<SeralizedPythonSharedMemoryConsumer, boost::noncopyable>("SeralizedSharedMemoryConsumer",init<std::string>()) | |
.def("set_callable", &SeralizedPythonSharedMemoryConsumer::set_callable) | |
.def("start",&SeralizedPythonSharedMemoryConsumer::start) | |
.def("wait",&SeralizedPythonSharedMemoryConsumer::wait); | |
class_<ImagePythonSharedMemoryConsumer, boost::noncopyable>("ImageSharedMemoryConsumer",init<std::string>()) | |
.def("set_callable", &ImagePythonSharedMemoryConsumer::set_callable) | |
.def("start",&ImagePythonSharedMemoryConsumer::start) | |
.def("wait",&ImagePythonSharedMemoryConsumer::wait); | |
class_<SeralizedSharedMemoryProducer, boost::noncopyable>("SeralizedSharedMemoryProducer",init<std::string>()) | |
.def("write_data", &SeralizedSharedMemoryProducer::write_data); | |
class_<ImageSharedMemoryProducer, boost::noncopyable>("ImageSharedMemoryProducer",init<std::string>()) | |
.def("write_data", &ImageSharedMemoryProducer::write_data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment