MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
UdpRegistryClient.h
Go to the documentation of this file.
1
#ifndef _MADARA_UDP_REGISTRY_CLIENT_TRANSPORT_H_
2
#define _MADARA_UDP_REGISTRY_CLIENT_TRANSPORT_H_
3
4
#include <string>
5
6
#include "madara/MADARA_export.h"
7
#include "
madara/transport/udp/UdpRegistryClientReadThread.h
"
8
#include "
madara/transport/Transport.h
"
9
#include "
madara/threads/Threader.h
"
10
#include "
madara/knowledge/containers/Map.h
"
11
12
#include <string>
13
#include <map>
14
15
#include "ace/INET_Addr.h"
16
#include "ace/SOCK_Dgram.h"
17
18
19
namespace
madara
20
{
21
namespace
transport
22
{
35
class
MADARA_Export
UdpRegistryClient
:
public
Base
36
{
37
public
:
38
39
enum
{
40
RELIABLE
= 0
41
};
42
43
enum
{
44
ERROR_UDP_NOT_STARTED = -1,
45
};
46
47
static
const
int
PROFILES = 1;
48
56
UdpRegistryClient
(
const
std::string
&
id
,
57
madara::knowledge::ThreadSafeContext
& context,
58
TransportSettings
& config,
bool
launch_transport);
59
63
virtual
~
UdpRegistryClient
();
64
65
69
void
send_register (
void
);
70
76
long
send_data (
const
madara::knowledge::KnowledgeRecords
& updates);
77
83
int
reliability (
void
)
const
;
84
90
int
reliability (
const
int
& setting);
91
long
read (
void
);
92
void
close (
void
);
93
int
setup (
void
);
94
protected
:
95
private
:
97
knowledge::KnowledgeBase
knowledge_
;
98
100
threads::Threader
read_threads_
;
101
103
std::map <std::string, ACE_INET_Addr>
servers_
;
104
106
std::map <std::string, ACE_INET_Addr>
clients_
;
107
108
knowledge::containers::Map
endpoints_
;
109
111
ACE_SOCK_Dgram
socket_
;
112
};
113
}
114
}
115
116
#endif // _MADARA_UDP_REGISTRY_CLIENT_TRANSPORT_H_
madara::transport::UdpRegistryClient::endpoints_
knowledge::containers::Map endpoints_
Definition:
UdpRegistryClient.h:108
madara::transport::UdpRegistryClient::socket_
ACE_SOCK_Dgram socket_
underlying socket for sending and receiving
Definition:
UdpRegistryClient.h:111
Map.h
UdpRegistryClientReadThread.h
madara::transport::RELIABLE
Definition:
TransportSettings.h:75
madara::knowledge::ThreadSafeContext
This class stores variables and their values for use by any entity needing state information in a thr...
Definition:
ThreadSafeContext.h:82
madara::transport::UdpRegistryClient::clients_
std::map< std::string, ACE_INET_Addr > clients_
registry clients
Definition:
UdpRegistryClient.h:106
madara::transport::UdpRegistryClient::servers_
std::map< std::string, ACE_INET_Addr > servers_
registry servers
Definition:
UdpRegistryClient.h:103
madara::transport::TransportSettings
Holds basic transport settings.
Definition:
TransportSettings.h:92
Transport.h
madara::knowledge::containers::Map
This class stores a map of strings to KaRL variables.
Definition:
Map.h:32
madara::knowledge::KnowledgeBase
This class provides a distributed knowledge base to users.
Definition:
KnowledgeBase.h:44
madara::knowledge::KnowledgeRecords
::std::map< std::string, KnowledgeRecord * > KnowledgeRecords
Definition:
KnowledgeRecord.h:1461
Threader.h
madara::knowledge::tags::string
static constexpr struct madara::knowledge::tags::string_t string
madara::threads::Threader
Starts threads with first class support of MADARA contexts.
Definition:
Threader.h:35
madara::transport::UdpRegistryClient::knowledge_
knowledge::KnowledgeBase knowledge_
knowledge base for threads to use
Definition:
UdpRegistryClient.h:97
madara
Copyright (c) 2015 Carnegie Mellon University.
Definition:
AggregateFilter.h:30
madara::transport::UdpRegistryClient
UDP-based transport for knowledge.
Definition:
UdpRegistryClient.h:35
madara::transport::Base
Base class from which all transports must be derived.
Definition:
Transport.h:62
madara::transport::UdpRegistryClient::read_threads_
threads::Threader read_threads_
threads for reading knowledge updates
Definition:
UdpRegistryClient.h:100
include
madara
transport
udp
UdpRegistryClient.h
Generated on Wed May 9 2018 18:17:17 for MADARA by
1.8.11