YARP
Yet Another Robot Platform
DeviceGroup.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_DEV_DEVICEGROUP_H
8#define YARP_DEV_DEVICEGROUP_H
9
10#include <yarp/dev/PolyDriver.h>
12
21{
22public:
23 DeviceGroup() = default;
24 DeviceGroup(const DeviceGroup&) = delete;
28 ~DeviceGroup() override;
29
30 bool open(yarp::os::Searchable& config) override;
31
32 bool close() override
33 {
34 return closeMain();
35 }
36
37 bool startService() override;
38
39 bool stopService() override
40 {
41 return close();
42 }
43
44 bool updateService() override;
45
46private:
47 void* implementation{nullptr};
48
49 bool closeMain();
50
53
54 bool open(const char *key,
57 const char *comment);
58};
59
60
61#endif // YARP_DEV_DEVICEGROUP_H
group: Lets you make a bunch of devices as a group.
Definition: DeviceGroup.h:21
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool updateService() override
Give the service the chance to run for a while.
bool startService() override
Initiate the service, whatever it is.
DeviceGroup(DeviceGroup &&)=delete
DeviceGroup()=default
DeviceGroup & operator=(const DeviceGroup &)=delete
bool stopService() override
Shut down the service, whatever it is.
Definition: DeviceGroup.h:39
~DeviceGroup() override
DeviceGroup & operator=(DeviceGroup &&)=delete
bool close() override
Close the DeviceDriver.
Definition: DeviceGroup.h:32
DeviceGroup(const DeviceGroup &)=delete
Interface implemented by all device drivers.
Definition: DeviceDriver.h:30
Common interface for devices that act like services (by which we mean they do something for remote us...
A container for a device driver.
Definition: PolyDriver.h:23
A base class for nested structures that can be searched.
Definition: Searchable.h:63