MIRA
Public Member Functions | List of all members
ServiceCall< Ret(ARGS...)> Class Template Reference

A ServiceCall is a proxy for a specific method of a specific service, providing a functor-like interface to that method, and encapsulation for checking the availability of the service and method (name, signature). More...

#include <fw/ServiceCall.h>

Public Member Functions

 ServiceCall (std::string serviceProvider, std::string method)
 Construct a ServiceCall object referring to a specific service provider and method. More...
 
 ServiceCall ()=default
 Construct a new (invalid) ServiceCall object. More...
 
Ret operator() (const ARGS &... args) const
 Call operator to allow function like usage. More...
 
RPCFuture< Ret > call (const ARGS &... args) const
 
void waitForServiceCall () const
 
bool waitForServiceCall (Duration timeout) const
 
RPCSignature getSignature () const
 
template<typename Reflector >
void reflect (Reflector &r)
 

Detailed Description

template<class Ret, class... ARGS>
class mira::ServiceCall< Ret(ARGS...)>

A ServiceCall is a proxy for a specific method of a specific service, providing a functor-like interface to that method, and encapsulation for checking the availability of the service and method (name, signature).

See Authority::createServiceCall().

Constructor & Destructor Documentation

◆ ServiceCall() [1/2]

ServiceCall ( std::string  serviceProvider,
std::string  method 
)
inline

Construct a ServiceCall object referring to a specific service provider and method.

Parameters
serviceProviderThe resolved name of the service provider. This object knows nothing about namespaces and is unable to resolve an alias
methodThe method name

◆ ServiceCall() [2/2]

ServiceCall ( )
default

Construct a new (invalid) ServiceCall object.

A default constructor must exist to enable creating a ServiceCall object by deserializing its description.

Member Function Documentation

◆ operator()()

Ret operator() ( const ARGS &...  args) const
inline

Call operator to allow function like usage.

Parameters
argsexpected arguments
Returns
Ret return value

◆ call()

RPCFuture<Ret> call ( const ARGS &...  args) const
inline

◆ waitForServiceCall() [1/2]

void waitForServiceCall ( ) const
inline

◆ waitForServiceCall() [2/2]

bool waitForServiceCall ( Duration  timeout) const
inline

◆ getSignature()

RPCSignature getSignature ( ) const
inline

◆ reflect()

void reflect ( Reflector &  r)
inline

The documentation for this class was generated from the following file: