YARP
Yet Another Robot Platform
yarp::dev::IService Class Reference

Common interface for devices that act like services (by which we mean they do something for remote users, with minimal interaction with their creator other than initial configuration). More...

#include <yarp/dev/ServiceInterfaces.h>

+ Inheritance diagram for yarp::dev::IService:

Public Member Functions

virtual ~IService ()
 
virtual bool startService ()
 Initiate the service, whatever it is. More...
 
virtual bool updateService ()
 Give the service the chance to run for a while. More...
 
virtual bool stopService ()
 Shut down the service, whatever it is. More...
 

Detailed Description

Common interface for devices that act like services (by which we mean they do something for remote users, with minimal interaction with their creator other than initial configuration).

Definition at line 28 of file ServiceInterfaces.h.

Constructor & Destructor Documentation

◆ ~IService()

virtual yarp::dev::IService::~IService ( )
inlinevirtual

Definition at line 30 of file ServiceInterfaces.h.

Member Function Documentation

◆ startService()

virtual bool yarp::dev::IService::startService ( )
inlinevirtual

Initiate the service, whatever it is.

The service should then run by itself, without any further interaction with its creator until stopService() is called.

Returns
true if the service started and needs no help running. If false is returned, the service expects updateService() to be called repeatedly until that function too returns false. This is useful for devices that don't want to manage their own service threads.

Reimplemented in ServerFrameGrabber, DevicePipe, DeviceGroup, and yarp::dev::OVRHeadset.

Definition at line 42 of file ServiceInterfaces.h.

◆ stopService()

virtual bool yarp::dev::IService::stopService ( )
inlinevirtual

Shut down the service, whatever it is.

Returns
true iff the service shut down ok.

Reimplemented in ServerFrameGrabber, DevicePipe, DeviceGroup, and yarp::dev::OVRHeadset.

Definition at line 62 of file ServiceInterfaces.h.

◆ updateService()

virtual bool yarp::dev::IService::updateService ( )
inlinevirtual

Give the service the chance to run for a while.

This is an alternative to calling startService(). It is more appropriate in a single-threaded environment.

Returns
true iff the service is willing to run some more. A return value of false means that the service would like to stop.

Reimplemented in ServerFrameGrabber, DevicePipe, DeviceGroup, and yarp::dev::OVRHeadset.

Definition at line 54 of file ServiceInterfaces.h.


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