ddt 1.2.1
Loading...
Searching...
No Matches
pyDdtRemoteLib.cpp File Reference

Python bindings for the remote component. More...

#include <boost/bind.hpp>
#include "pybind11/pybind11.h"
#include "pybind11/stl.h"
#include "ddt/ddtRemoteClient.hpp"
#include "ddt/ddtRemoteControl.hpp"
#include "ddt/widgets/ddtImageWidget.hpp"
#include <stdio.h>
#include <cstring>
#include <memory>
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
 
ddt::InitCodes init_helper (ddt::DdtRemoteClient &self, std::vector< std::string > &arguments)
 Helper method for calling DdtRemoteClient::Init(int argc, char** argv).
 
class __attribute__ ((visibility("hidden"))) PySlot
 Python slot for connecting to the DataAvailable signal.
 
void connect_remote_command_signal (ddt::DdtRemoteControl &self, const py::object object)
 Helper method for connecting the python slot to the DataAvailable signal.
 
 PYBIND11_MODULE (DdtRemoteLib, m)
 Construct a new pybind11 module object.
 

Detailed Description

Python bindings for the remote component.

Author
Monika Pfeil, CGI
Since
2021/09/24

Macro Definition Documentation

◆ BOOST_BIND_GLOBAL_PLACEHOLDERS

#define BOOST_BIND_GLOBAL_PLACEHOLDERS

Function Documentation

◆ __attribute__()

class __attribute__ ( (visibility("hidden")) )

Python slot for connecting to the DataAvailable signal.

This slot takes care of the GIL which is necessary for connecting a Python method to a C++ signal.

◆ connect_remote_command_signal()

void connect_remote_command_signal ( ddt::DdtRemoteControl & self,
const py::object object )

Helper method for connecting the python slot to the DataAvailable signal.

Parameters
selfThe DdtRemoteControl class which implements the connect method.
objectThe function to be called when the event occurs.

◆ init_helper()

ddt::InitCodes init_helper ( ddt::DdtRemoteClient & self,
std::vector< std::string > & arguments )

Helper method for calling DdtRemoteClient::Init(int argc, char** argv).

This method casts the entries of arguments of type std::string to char arrays and stores them in another array. This is important for having a '\0' at the end of each entry.

Parameters
selfThe DdtRemoteClient class which implements the Init method.
argumentsThe arguments with which the broker is to be started.

◆ PYBIND11_MODULE()

PYBIND11_MODULE ( DdtRemoteLib ,
m  )

Construct a new pybind11 module object.