MeVisLab Scripting Reference
MLRemoteCallInterfaceWrapper Class Reference

#include <mlRemoteCallInterfaceWrapper.h>

Inherits MLRefCountedBaseWrapper.

Public Slots

Scripting access


bool checkConnectionLost ()
 
void callWithResult (PyObject *callable, const QString &method, const QVariant &arg0, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8, const QVariant &arg9)
 
void call (const QString &method, const QVariant &arg0, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8, const QVariant &arg9)
 
PythonQtObjectPtr asyncCall (const QString &method, const QVariant &arg0, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8, const QVariant &arg9)
 
void addInterfaceObject (const QString &objectName, PyObject *object)
 
void removeInterfaceObject (const QString &objectName)
 

Detailed Description

Script wrapper for RemoteCallInterface Offers to call methods on remote objects and to register local interface objects that can be called from a remote client.

Member Function Documentation

◆ addInterfaceObject

void MLRemoteCallInterfaceWrapper::addInterfaceObject ( const QString & objectName,
PyObject * object )
slot

Add a local interface object that is available to a remote client under the given objectName.

◆ asyncCall

PythonQtObjectPtr MLRemoteCallInterfaceWrapper::asyncCall ( const QString & method,
const QVariant & arg0,
const QVariant & arg1,
const QVariant & arg2,
const QVariant & arg3,
const QVariant & arg4,
const QVariant & arg5,
const QVariant & arg6,
const QVariant & arg7,
const QVariant & arg8,
const QVariant & arg9 )
slot

Call the given method with arguments and returns a future as result.

You can use the await keyword to wait for the call inside of an async function/method. Typically the method name is composed of an object name and a method name, separated by a dot. NOTE: This call is asynchronous. The call is done on the remote side of the connection. Example:

async def test():
result = await rpcObject.asyncCall("someObject.someMethod", "testArgument")
...
PythonQtObjectPtr asyncCall(const QString &method, const QVariant &arg0, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8, const QVariant &arg9)
Call the given method with arguments and returns a future as result.

◆ call

void MLRemoteCallInterfaceWrapper::call ( const QString & method,
const QVariant & arg0,
const QVariant & arg1,
const QVariant & arg2,
const QVariant & arg3,
const QVariant & arg4,
const QVariant & arg5,
const QVariant & arg6,
const QVariant & arg7,
const QVariant & arg8,
const QVariant & arg9 )
slot

Call the given method with arguments and ignores the result.

Typically the method name is composed of an object name and a method name, separated by a dot. NOTE: This call is asynchronous. The call is done on the remote side of the connection.

◆ callWithResult

void MLRemoteCallInterfaceWrapper::callWithResult ( PyObject * callable,
const QString & method,
const QVariant & arg0,
const QVariant & arg1,
const QVariant & arg2,
const QVariant & arg3,
const QVariant & arg4,
const QVariant & arg5,
const QVariant & arg6,
const QVariant & arg7,
const QVariant & arg8,
const QVariant & arg9 )
slot

Call the given method with arguments.

The result is passed to the given callable when available. Typically the method name is composed of an object name and a method name, separated by a dot. NOTE: This call is asynchronous. The call is done on the remote side of the connection.

◆ checkConnectionLost

bool MLRemoteCallInterfaceWrapper::checkConnectionLost ( )
slot

Checks if the socket connection is still active (this is an active check that checks the message queue for disconnect messages)

◆ removeInterfaceObject

void MLRemoteCallInterfaceWrapper::removeInterfaceObject ( const QString & objectName)
slot

Remove the local interface object.