YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
MultiNameSpace.h
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
6#ifndef YARP_OS_MULTINAMESPACE_H
7#define YARP_OS_MULTINAMESPACE_H
8
9#include <yarp/os/NameSpace.h>
10#include <yarp/os/NameStore.h>
11
12namespace yarp::os {
13
15{
16public:
18
19 virtual ~MultiNameSpace();
20
21 bool setLocalMode(bool flag);
22
23 bool activate(bool force = false);
24
25 Contact getNameServerContact() const override;
26
27 Contact queryName(const std::string& name) override;
28
29 Contact registerName(const std::string& name) override;
30
31 Contact registerContact(const Contact& contact) override;
32
33 Contact unregisterName(const std::string& name) override;
34
35 Contact unregisterContact(const Contact& contact) override;
36
37 virtual bool setProperty(const std::string& name,
38 const std::string& key,
39 const Value& value) override;
40
41 Value* getProperty(const std::string& name, const std::string& key) override;
42
43 virtual bool connectPortToTopic(const Contact& src,
44 const Contact& dest,
45 const ContactStyle& style) override;
46
47 virtual bool connectTopicToPort(const Contact& src,
48 const Contact& dest,
49 const ContactStyle& style) override;
50
51 virtual bool disconnectPortFromTopic(const Contact& src,
52 const Contact& dest,
53 const ContactStyle& style) override;
54
55 virtual bool disconnectTopicFromPort(const Contact& src,
56 const Contact& dest,
57 const ContactStyle& style) override;
58
59 virtual bool connectPortToPortPersistently(const Contact& src,
60 const Contact& dest,
61 const ContactStyle& style) override;
62
63 virtual bool disconnectPortToPortPersistently(const Contact& src,
64 const Contact& dest,
65 const ContactStyle& style) override;
66
67 bool localOnly() const override;
68
69 bool usesCentralServer() const override;
70
71 bool serverAllocatesPortNumbers() const override;
72
73 bool connectionHasNameOfEndpoints() const override;
74
82 virtual void queryBypass(NameStore* store);
83
90 virtual NameStore* getQueryBypass();
91
92 virtual Contact detectNameServer(bool useDetectedServer,
93 bool& scanNeeded,
94 bool& serverUsed) override;
95
96 virtual bool writeToNameServer(PortWriter& cmd,
97 PortReader& reply,
98 const ContactStyle& style) override;
99
100private:
101 void* system_resource;
102 NameStore* altStore;
103};
104
105} // namespace yarp::os
106
107#endif // YARP_OS_MULTINAMESPACE_H
A mini-server for performing network communication in the background.
Preferences for how to communicate with a contact.
Represents how to reach a part of a YARP network.
Definition Contact.h:33
An abstract name space for ports.
Definition NameSpace.h:22
Abstract interface for a database of port names.
Definition NameStore.h:19
Interface implemented by all objects that can read themselves from the network, such as Bottle object...
Definition PortReader.h:24
Interface implemented by all objects that can write themselves to the network, such as Bottle objects...
Definition PortWriter.h:23
A single value (typically within a Bottle).
Definition Value.h:43
An interface to the operating system, including Port based communication.
#define YARP_os_API
Definition api.h:18