34 #include <boost/python.hpp>
35namespace bp = boost::python;
44void rpp::Application::setup_python() {
47 bp::class_<rpp::Application, rpp::ApplicationPtr, bp::bases<ris::Master, ris::Slave>, boost::noncopyable>(
51 bp::implicitly_convertible<rpp::ApplicationPtr, ris::MasterPtr>();
52 bp::implicitly_convertible<rpp::ApplicationPtr, ris::SlavePtr>();
57rpp::Application::Application(uint8_t
id) {
63rpp::Application::~Application() {
79 std::weak_ptr<rpp::Controller> prevCntl = cntl_;
83 thread_ = std::make_unique<std::thread>(&rpp::Application::runThread,
this);
92 pthread_setname_np(thread_->native_handle(),
"PackApp");
97ris::FramePtr rpp::Application::acceptReq(uint32_t size,
bool zeroCopyEn) {
101 "Packetizer controller has been destroyed"));
102 return (cntl->reqFrame(size));
117void rpp::Application::runThread() {
119 Logging log(
"packetizer.Application");
123 if ((frame = queue_.pop()) != NULL) sendFrame(frame);
static GeneralError create(std::string src, const char *fmt,...)
Creates a formatted error instance.
RAII helper that releases the Python GIL for a scope.
Structured Rogue logging helper.
std::shared_ptr< rogue::interfaces::stream::Frame > FramePtr
Shared pointer alias for Frame.
std::shared_ptr< rogue::protocols::packetizer::Application > ApplicationPtr
std::shared_ptr< rogue::protocols::packetizer::Controller > ControllerPtr