33 if(config.
check(
"default-config")) {
37 if (config.
check(
"nws_thrift_port_prefix")){
38 prefix = config.
find(
"nws_thrift_port_prefix").asString() + (
default_config ? m_defaultConfigPrefix :
"");
39 if(prefix[0] !=
'/') {prefix =
"/"+prefix;}
40 m_thriftPortName = prefix +
"/" + m_deviceName +
"/thrift";
44 m_thriftPortName = prefix +
"/" + m_deviceName +
"/thrift";
48 if(!m_thriftPort.
open(m_thriftPortName))
53 if(!this->
yarp().attachAsServer(m_thriftPort))
78 std::lock_guard <std::mutex>
lg(m_pd_mutex);
85 std::lock_guard <std::mutex>
lg(m_pd_mutex);
99 std::lock_guard <std::mutex>
lg(m_pd_mutex);
113 std::lock_guard <std::mutex>
lg(m_pd_mutex);
127 std::lock_guard <std::mutex>
lg(m_pd_mutex);
142 std::lock_guard <std::mutex>
lg(m_pd_mutex);
146 (!m_pDriver->
view(m_iSetIf) || m_iSetIf ==
nullptr) ||
147 (!m_pDriver->
view(m_iUtilsIf) || m_iUtilsIf ==
nullptr))
bool view(T *&x)
Get an interface to the device driver.
A container for a device driver.
bool isValid() const
Check if device is valid.
A mini-server for performing network communication in the background.
static bool checkNetwork()
Check if the YARP Network is up and running.
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.
bool isOpen() const
Check if the port has been opened.
A base class for nested structures that can be searched.
virtual bool check(const std::string &key) const =0
Check if there exists a property of the given name.
virtual Value & find(const std::string &key) const =0
Gets a value corresponding to a given keyword.
yarp::os::WireLink & yarp()
Get YARP state associated with this object.
#define yCError(component,...)
#define yCWarning(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.