MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
UdpTransport.h
Go to the documentation of this file.
1
#ifndef _MADARA_UDP_TRANSPORT_H_
2
#define _MADARA_UDP_TRANSPORT_H_
3
4
#include <string>
5
6
#include "madara/MADARA_export.h"
7
#include "
madara/transport/udp/UdpTransportReadThread.h
"
8
#include "
madara/transport/Transport.h
"
9
#include "
madara/threads/Threader.h
"
10
11
#include <string>
12
#include <map>
13
14
#include "ace/INET_Addr.h"
15
#include "ace/SOCK_Dgram.h"
16
17
18
namespace
madara
19
{
20
namespace
transport
21
{
34
class
MADARA_Export
UdpTransport
:
public
Base
35
{
36
public
:
37
38
enum
{
39
RELIABLE
= 0
40
};
41
42
enum
{
43
ERROR_UDP_NOT_STARTED = -1,
44
};
45
46
static
const
int
PROFILES = 1;
47
55
UdpTransport
(
const
std::string
&
id
,
56
madara::knowledge::ThreadSafeContext
& context,
57
TransportSettings
& config,
bool
launch_transport);
58
62
virtual
~
UdpTransport
();
63
69
long
send_data (
const
madara::knowledge::KnowledgeRecords
& updates);
70
76
int
reliability (
void
)
const
;
77
83
int
reliability (
const
int
& setting);
84
long
read (
void
);
85
void
close (
void
);
86
int
setup (
void
);
87
protected
:
88
private
:
90
knowledge::KnowledgeBase
knowledge_
;
91
93
threads::Threader
read_threads_
;
94
95
std::map <std::string, ACE_INET_Addr>
addresses_
;
96
98
ACE_SOCK_Dgram
write_socket_
;
99
101
ACE_SOCK_Dgram
read_socket_
;
102
};
103
}
104
}
105
106
#endif // _MADARA_UDP_TRANSPORT_H_
UdpTransportReadThread.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::UdpTransport::knowledge_
knowledge::KnowledgeBase knowledge_
knowledge base for threads to use
Definition:
UdpTransport.h:90
madara::transport::UdpTransport::addresses_
std::map< std::string, ACE_INET_Addr > addresses_
Definition:
UdpTransport.h:95
madara::transport::TransportSettings
Holds basic transport settings.
Definition:
TransportSettings.h:92
Transport.h
madara::transport::UdpTransport::read_threads_
threads::Threader read_threads_
threads for reading knowledge updates
Definition:
UdpTransport.h:93
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
madara::transport::UdpTransport::write_socket_
ACE_SOCK_Dgram write_socket_
underlying socket for sending
Definition:
UdpTransport.h:98
madara::transport::UdpTransport::read_socket_
ACE_SOCK_Dgram read_socket_
The socket we are reading from.
Definition:
UdpTransport.h:101
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
Copyright (c) 2015 Carnegie Mellon University.
Definition:
AggregateFilter.h:30
madara::transport::UdpTransport
UDP-based transport for knowledge.
Definition:
UdpTransport.h:34
madara::transport::Base
Base class from which all transports must be derived.
Definition:
Transport.h:62
include
madara
transport
udp
UdpTransport.h
Generated on Wed May 9 2018 18:17:17 for MADARA by
1.8.11