MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
TcpTransport.h
Go to the documentation of this file.
1
#ifndef _MADARA_TCP_TRANSPORT_H_
2
#define _MADARA_TCP_TRANSPORT_H_
3
4
#include <string>
5
6
#include "
madara/transport/tcp/TcpTransportReadThread.h
"
7
#include "
madara/knowledge/ThreadSafeContext.h
"
8
#include "
madara/transport/Transport.h
"
9
#include "
madara/threads/Threader.h
"
10
11
namespace
madara
12
{
13
namespace
transport
14
{
19
class
TcpTransport
:
public
Base
20
{
21
public
:
22
23
enum
{
24
RELIABLE
= 0
25
};
26
27
enum
{
28
ERROR_TCP_NOT_STARTED
= -1,
29
};
30
31
static
const
int
PROFILES
= 1;
32
40
TcpTransport
(
const
std::string
&
id
,
41
madara::knowledge::ThreadSafeContext
& context,
42
TransportSettings
& config,
bool
launch_transport);
43
47
virtual
~TcpTransport
();
48
54
long
send_data
(
const
madara::knowledge::KnowledgeRecords
& updates);
55
61
int
reliability
(
void
)
const
;
62
68
int
reliability
(
const
int
& setting);
69
long
read
(
void
);
70
void
close
(
void
);
71
int
setup
(
void
);
72
protected
:
73
private
:
75
knowledge::KnowledgeBase
knowledge_
;
76
78
threads::Threader
read_threads_
;
79
80
std::map <std::string, ACE_INET_Addr>
addresses_
;
81
82
};
83
}
84
}
85
86
#endif // _MADARA_TCP_TRANSPORT_H_
madara::transport::TcpTransport::read_threads_
threads::Threader read_threads_
threads for reading knowledge updates
Definition:
TcpTransport.h:78
madara::transport::TcpTransport::send_data
long send_data(const madara::knowledge::KnowledgeRecords &updates)
Sends a list of knowledge updates to listeners.
Definition:
TcpTransport.cpp:140
madara::transport::TcpTransport::setup
int setup(void)
all subclasses should call this method at the end of its setup
Definition:
TcpTransport.cpp:57
madara::transport::TcpTransport::~TcpTransport
virtual ~TcpTransport()
Destructor.
Definition:
TcpTransport.cpp:29
madara::transport::TcpTransport::knowledge_
knowledge::KnowledgeBase knowledge_
knowledge base for threads to use
Definition:
TcpTransport.h:75
madara::transport::TcpTransport::RELIABLE
Definition:
TcpTransport.h:24
ThreadSafeContext.h
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::TcpTransport::close
void close(void)
Closes this transport.
Definition:
TcpTransport.cpp:35
madara::transport::TcpTransport::addresses_
std::map< std::string, ACE_INET_Addr > addresses_
Definition:
TcpTransport.h:80
madara::transport::TransportSettings
Holds basic transport settings.
Definition:
TransportSettings.h:92
Transport.h
madara::transport::TcpTransport::ERROR_TCP_NOT_STARTED
Definition:
TcpTransport.h:28
madara::transport::TcpTransport::reliability
int reliability(void) const
Accesses reliability setting.
Definition:
TcpTransport.cpp:45
madara::transport::TcpTransport::PROFILES
static const int PROFILES
Definition:
TcpTransport.h:31
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::TcpTransport::read
long read(void)
Threader.h
madara::transport::TcpTransport::TcpTransport
TcpTransport(const std::string &id, madara::knowledge::ThreadSafeContext &context, TransportSettings &config, bool launch_transport)
Constructor.
Definition:
TcpTransport.cpp:14
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
TcpTransportReadThread.h
madara
Copyright (c) 2015 Carnegie Mellon University.
Definition:
AggregateFilter.h:30
madara::transport::Base
Base class from which all transports must be derived.
Definition:
Transport.h:62
madara::transport::TcpTransport
TCP-based transport (skeleton code)
Definition:
TcpTransport.h:19
include
madara
transport
tcp
TcpTransport.h
Generated on Wed May 9 2018 18:17:17 for MADARA by
1.8.11