YARP
Yet Another Robot Platform
yarp::os::impl::NameServer Class Reference

Implementation of a YARP2-conforming name server. More...

#include <yarp/os/impl/NameServer.h>

+ Inheritance diagram for yarp::os::impl::NameServer:

Public Member Functions

 NameServer ()
 
virtual ~NameServer ()=default
 
Contact registerName (const std::string &name, const Contact &address)
 
Contact registerName (const std::string &name, const Contact &address, const std::string &remote)
 
Contact registerName (const std::string &name)
 
Contact queryName (const std::string &name)
 
Contact unregisterName (const std::string &name)
 
std::string apply (const std::string &txt, const Contact &remote) override
 
bool apply (const yarp::os::Bottle &cmd, yarp::os::Bottle &result, const Contact &remote)
 
std::string apply (const std::string &txt)
 
virtual void onEvent (yarp::os::Bottle &event)
 
void setBasePort (int basePort)
 
- Public Member Functions inherited from yarp::os::impl::NameServerStub
virtual ~NameServerStub ()=default
 
virtual std::string apply (const std::string &txt, const Contact &remote)=0
 

Static Public Member Functions

static std::string textify (const Contact &address)
 
static yarp::os::Bottle botify (const Contact &address)
 

Protected Member Functions

std::string terminate (const std::string &str)
 

Protected Attributes

int basePort
 

Detailed Description

Implementation of a YARP2-conforming name server.

Definition at line 42 of file NameServer.h.

Constructor & Destructor Documentation

◆ NameServer()

yarp::os::impl::NameServer::NameServer ( )
inline

Definition at line 45 of file NameServer.h.

◆ ~NameServer()

virtual yarp::os::impl::NameServer::~NameServer ( )
virtualdefault

Member Function Documentation

◆ apply() [1/3]

std::string yarp::os::impl::NameServer::apply ( const std::string &  txt)
inline

Definition at line 78 of file NameServer.h.

◆ apply() [2/3]

std::string NameServer::apply ( const std::string &  txt,
const Contact remote 
)
overridevirtual

Implements yarp::os::impl::NameServerStub.

Definition at line 689 of file NameServer.cpp.

◆ apply() [3/3]

bool NameServer::apply ( const yarp::os::Bottle cmd,
yarp::os::Bottle result,
const Contact remote 
)

Definition at line 724 of file NameServer.cpp.

◆ botify()

Bottle NameServer::botify ( const Contact address)
static

Definition at line 644 of file NameServer.cpp.

◆ onEvent()

virtual void yarp::os::impl::NameServer::onEvent ( yarp::os::Bottle event)
inlinevirtual

Definition at line 83 of file NameServer.h.

◆ queryName()

Contact NameServer::queryName ( const std::string &  name)

Definition at line 151 of file NameServer.cpp.

◆ registerName() [1/3]

Contact yarp::os::impl::NameServer::registerName ( const std::string &  name)
inline

Definition at line 65 of file NameServer.h.

◆ registerName() [2/3]

Contact yarp::os::impl::NameServer::registerName ( const std::string &  name,
const Contact address 
)
inline

Definition at line 55 of file NameServer.h.

◆ registerName() [3/3]

Contact NameServer::registerName ( const std::string &  name,
const Contact address,
const std::string &  remote 
)

Definition at line 79 of file NameServer.cpp.

◆ setBasePort()

void yarp::os::impl::NameServer::setBasePort ( int  basePort)
inline

Definition at line 91 of file NameServer.h.

◆ terminate()

std::string NameServer::terminate ( const std::string &  str)
protected

Definition at line 683 of file NameServer.cpp.

◆ textify()

std::string NameServer::textify ( const Contact address)
static

Definition at line 628 of file NameServer.cpp.

◆ unregisterName()

Contact NameServer::unregisterName ( const std::string &  name)

Definition at line 50 of file NameServer.cpp.

Member Data Documentation

◆ basePort

int yarp::os::impl::NameServer::basePort
protected

Definition at line 481 of file NameServer.h.


The documentation for this class was generated from the following files: