MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
EndpointDiscovery.h
Go to the documentation of this file.
1
2
3
#ifndef _MADARA_FILTERS_ENDPOINT_DISCOVERY_H_
4
#define _MADARA_FILTERS_ENDPOINT_DISCOVERY_H_
5
15
#include <string>
16
#include <vector>
17
#include <map>
18
#include <list>
19
#include "
madara/knowledge/KnowledgeRecord.h
"
20
#include "
madara/knowledge/Functions.h
"
21
#include "
madara/utility/stdint.h
"
22
#include "madara/MADARA_export.h"
23
#include "
madara/transport/TransportContext.h
"
24
#include "
madara/knowledge/ExternFunctionVariables.h
"
25
#include "
madara/knowledge/containers/Map.h
"
26
27
#include "
AggregateFilter.h
"
28
29
namespace
madara
30
{
31
namespace
filters
32
{
36
class
MADARA_Export
EndpointDiscovery
:
public
AggregateFilter
37
{
38
public
:
47
EndpointDiscovery
(
48
const
std::string
& prefix =
".endpoints"
,
49
knowledge::KnowledgeRecord::Integer
heart_beat = -1);
50
54
virtual
~
EndpointDiscovery
();
55
62
virtual
void
filter (
knowledge::KnowledgeMap
& records,
63
const
transport::TransportContext
& transport_context,
64
knowledge::Variables
& vars);
65
66
protected
:
67
71
bool
initialized_
;
72
76
std::string
prefix_
;
77
81
knowledge::containers::Map
endpoints_
;
82
86
knowledge::KnowledgeRecord::Integer
heart_beat_
;
87
91
knowledge::KnowledgeRecord::Integer
last_clear_
;
92
};
93
}
94
}
95
96
#endif // _MADARA_FILTERS_ENDPOINT_DISCOVERY_H_
madara::filters::EndpointDiscovery::endpoints_
knowledge::containers::Map endpoints_
A map of discovered peers.
Definition:
EndpointDiscovery.h:81
Functions.h
madara::filters::EndpointDiscovery::heart_beat_
knowledge::KnowledgeRecord::Integer heart_beat_
The time to keep record of a peer.
Definition:
EndpointDiscovery.h:86
AggregateFilter.h
KnowledgeRecord.h
madara::filters::EndpointDiscovery
Filter for discovering remote hosts that have sent messages.
Definition:
EndpointDiscovery.h:36
madara::filters::AggregateFilter
Abstract base class for implementing aggregate record filters via a functor interface.
Definition:
AggregateFilter.h:34
Map.h
madara::knowledge::KnowledgeRecord::Integer
int64_t Integer
Definition:
KnowledgeRecord.h:103
madara::filters::EndpointDiscovery::initialized_
bool initialized_
Tracks if the peers_ map has been initialized.
Definition:
EndpointDiscovery.h:71
TransportContext.h
madara::filters::EndpointDiscovery::prefix_
std::string prefix_
The context.
Definition:
EndpointDiscovery.h:76
madara::transport::TransportContext
Provides context about the transport.
Definition:
TransportContext.h:19
ExternFunctionVariables.h
madara::knowledge::containers::Map
This class stores a map of strings to KaRL variables.
Definition:
Map.h:32
madara::knowledge::KnowledgeMap
::std::map< std::string, KnowledgeRecord > KnowledgeMap
Definition:
KnowledgeRecord.h:1457
madara::knowledge::tags::string
static constexpr struct madara::knowledge::tags::string_t string
stdint.h
madara::filters::EndpointDiscovery::last_clear_
knowledge::KnowledgeRecord::Integer last_clear_
The time of the last clear of the peer_list.
Definition:
EndpointDiscovery.h:91
madara
Copyright (c) 2015 Carnegie Mellon University.
Definition:
AggregateFilter.h:30
madara::knowledge::Variables
Provides an interface for external functions into the MADARA KaRL variable settings.
Definition:
ExternFunctionVariables.h:51
include
madara
filters
EndpointDiscovery.h
Generated on Wed May 9 2018 18:17:14 for MADARA by
1.8.11