MADARA
3.1.8
Main Page
Namespaces
Classes
Files
File List
File Members
PeerDiscovery.h
Go to the documentation of this file.
1
2
3
#ifndef _MADARA_FILTERS_PEER_DISCOVERY_H_
4
#define _MADARA_FILTERS_PEER_DISCOVERY_H_
5
13
#include <string>
14
#include <vector>
15
#include <map>
16
#include <list>
17
#include "
madara/knowledge/KnowledgeRecord.h
"
18
#include "
madara/knowledge/Functions.h
"
19
#include "
madara/utility/stdint.h
"
20
#include "madara/MADARA_export.h"
21
#include "
madara/transport/TransportContext.h
"
22
#include "
madara/knowledge/ExternFunctionVariables.h
"
23
#include "
madara/knowledge/containers/Map.h
"
24
25
#include "
AggregateFilter.h
"
26
27
namespace
madara
28
{
29
namespace
filters
30
{
34
class
MADARA_Export
PeerDiscovery
:
public
AggregateFilter
35
{
36
public
:
45
PeerDiscovery
(
46
const
std::string
& prefix =
".peers"
,
47
knowledge::KnowledgeRecord::Integer
heart_beat = -1);
48
52
virtual
~
PeerDiscovery
();
53
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
peers_
;
82
86
knowledge::KnowledgeRecord::Integer
heart_beat_
;
87
91
knowledge::KnowledgeRecord::Integer
last_clear_
;
92
};
93
}
94
}
95
96
#endif // _MADARA_FILTERS_PEER_DISCOVERY_H_
Functions.h
AggregateFilter.h
KnowledgeRecord.h
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
TransportContext.h
madara::transport::TransportContext
Provides context about the transport.
Definition:
TransportContext.h:19
ExternFunctionVariables.h
madara::filters::PeerDiscovery::heart_beat_
knowledge::KnowledgeRecord::Integer heart_beat_
The time to keep record of a peer.
Definition:
PeerDiscovery.h:86
madara::filters::PeerDiscovery::prefix_
std::string prefix_
The context.
Definition:
PeerDiscovery.h:76
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::PeerDiscovery::last_clear_
knowledge::KnowledgeRecord::Integer last_clear_
The time of the last clear of the peer_list.
Definition:
PeerDiscovery.h:91
madara::filters::PeerDiscovery::peers_
knowledge::containers::Map peers_
A map of discovered peers.
Definition:
PeerDiscovery.h:81
madara
Copyright (c) 2015 Carnegie Mellon University.
Definition:
AggregateFilter.h:30
madara::filters::PeerDiscovery
Filter for discovering neighboring peers.
Definition:
PeerDiscovery.h:34
madara::knowledge::Variables
Provides an interface for external functions into the MADARA KaRL variable settings.
Definition:
ExternFunctionVariables.h:51
madara::filters::PeerDiscovery::initialized_
bool initialized_
Tracks if the peers_ map has been initialized.
Definition:
PeerDiscovery.h:71
include
madara
filters
PeerDiscovery.h
Generated on Wed May 9 2018 18:17:14 for MADARA by
1.8.11