YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ControlBoardRemapper.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
9
10#include <yarp/os/Log.h>
11#include <yarp/os/LogStream.h>
12
13#include <algorithm>
14#include <iostream>
15#include <map>
16#include <mutex>
17#include <cassert>
18
19using namespace yarp::os;
20using namespace yarp::dev;
21using namespace yarp::sig;
22
24{
25 return detachAll();
26}
27
29{
30 // From ControlBoardRemapper_ParamsParser
31 bool parseok = parseParams(config);
32
33 this->setVerbose(m_verbose);
34
35 if (m_axesNames.size() == 0)
36 {
37 yCError(CONTROLBOARDREMAPPER, "Invalid axes name");
38 return false;
39 }
40
43
44 return true;
45}
46
51
const yarp::os::LogComponent & CONTROLBOARDREMAPPER()
bool parseParams(const yarp::os::Searchable &config) override
Parse the DeviceDriver parameters.
bool close() override
Close the device driver by deallocating all resources and closing ports.
bool open(yarp::os::Searchable &prop) override
Open the device driver.
bool detachAll() override
Detach the object (you must have first called attach).
bool attachAll(const yarp::dev::PolyDriverList &l) override
Attach to a list of objects.
void setAxesNames(const std::vector< std::string > &axesNames)
void setVerbose(bool v)
Set the value of the verbose flag.
bool attachAllDevices(const yarp::dev::PolyDriverList &l)
void setNrOfControlledAxes(const size_t nrOfControlledAxes)
Set the number of controlled axes, resizing appropriately all the necessary buffers.
A mini-server for performing network communication in the background.
A base class for nested structures that can be searched.
Definition Searchable.h:31
#define yCError(component,...)
For streams capable of holding different kinds of content, check what they actually have.
An interface to the operating system, including Port based communication.