YARP
Yet Another Robot Platform
ServiceInterfaces.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * Copyright (C) 2006-2010 RobotCub Consortium
4  * All rights reserved.
5  *
6  * This software may be modified and distributed under the terms of the
7  * BSD-3-Clause license. See the accompanying LICENSE file for details.
8  */
9 
10 #ifndef YARP_DEV_SERVICEINTERFACES_H
11 #define YARP_DEV_SERVICEINTERFACES_H
12 
13 #include <yarp/dev/api.h>
14 
15 namespace yarp {
16  namespace dev {
17  class IService;
18  }
19 }
20 
29 public:
30  virtual ~IService() {}
31 
42  virtual bool startService() {
43  return false;
44  }
45 
54  virtual bool updateService() {
55  return false;
56  }
57 
62  virtual bool stopService() {
63  return false;
64  }
65 };
66 
67 #endif // YARP_DEV_SERVICEINTERFACES_H
Common interface for devices that act like services (by which we mean they do something for remote us...
virtual bool startService()
Initiate the service, whatever it is.
virtual bool stopService()
Shut down the service, whatever it is.
virtual bool updateService()
Give the service the chance to run for a while.
The main, catch-all namespace for YARP.
Definition: environment.h:18
#define YARP_dev_API
Definition: api.h:19