22 std::lock_guard <std::mutex>
lg(m_mutex);
24 std::vector<DeviceDescription>
dev_list;
37 std::lock_guard <std::mutex>
lg(m_mutex);
39 std::vector<DeviceDescription>
dev_list;
52 std::lock_guard <std::mutex>
lg(m_mutex);
64 std::lock_guard <std::mutex>
lg(m_mutex);
76 std::lock_guard <std::mutex>
lg(m_mutex);
115 m_RPC = std::make_unique<IRobotDescriptiond>(
ird);
124 std::lock_guard lock (
m_mutex);
137 if (!connection.
isValid()) {
return false;}
138 if (!
m_RPC) {
return false;}
140 std::lock_guard<std::mutex> lock(
m_mutex);
143 bool b =
m_RPC->read(connection);
virtual yarp::dev::ReturnValue unregisterAllRPC() override
virtual return_getAllDevices getAllDevicesRPC() override
virtual yarp::dev::ReturnValue registerDeviceRPC(const yarp::dev::DeviceDescription &dev) override
virtual return_getAllDevicesByType getAllDevicesByTypeRPC(const std::string &type) override
virtual yarp::dev::ReturnValue unregisterDeviceRPC(const std::string &dev) override
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
bool read(yarp::os::ConnectionReader &connection) override
Read this object from a network connection.
std::unique_ptr< IRobotDescriptiond > m_RPC
bool attach(yarp::dev::PolyDriver *driver) override
Attach to another object.
bool close() override
Close the DeviceDriver.
yarp::os::Port m_rpc_port
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
bool detach() override
Detach the object (you must have first called attach).
std::vector< yarp::dev::DeviceDescription > devices
yarp::dev::ReturnValue ret
yarp::dev::ReturnValue ret
std::vector< yarp::dev::DeviceDescription > devices
bool view(T *&x)
Get an interface to the device driver.
This interface allows users to retrieve a list which contains the names and the types of the currentl...
virtual yarp::dev::ReturnValue registerDevice(const DeviceDescription &dev)=0
Register a new running yarp device into a robot description server.
virtual yarp::dev::ReturnValue getAllDevices(std::vector< DeviceDescription > &dev_list)=0
Ask the complete list of all yarp device drivers registered by a robot description server.
virtual yarp::dev::ReturnValue unregisterDevice(const std::string &device_name)=0
Unregister a running yarp device from a robot description server.
virtual yarp::dev::ReturnValue unregisterAll()=0
Unregister all the devices.
virtual yarp::dev::ReturnValue getAllDevicesByType(const std::string &type, std::vector< DeviceDescription > &dev_list)=0
Ask a list of all registered yarp device drivers whose type corresponds to the given param.
A container for a device driver.
bool isValid() const
Check if device is valid.
A mini-server for performing network communication in the background.
An interface for reading from a network connection.
virtual bool isValid() const =0
void setReader(PortReader &reader) override
Set an external reader for port data.
void close() override
Stop port activity.
bool open(const std::string &name) override
Start port operation, with a specific name, with automatically-chosen network parameters.
A base class for nested structures that can be searched.
#define yCInfo(component,...)
#define yCError(component,...)
#define yCDebug(component,...)
#define YARP_LOG_COMPONENT(name,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.