MADARA  3.2.3
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>
21 #include "madara/utility/StdInt.h"
22 #include "madara/MadaraExport.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:
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 
72 
77 
82 
87 
92  };
93  }
94 }
95 
96 #endif // _MADARA_FILTERS_ENDPOINT_DISCOVERY_H_
knowledge::containers::Map endpoints_
A map of discovered peers.
knowledge::KnowledgeRecord::Integer heart_beat_
The time to keep record of a peer.
Filter for discovering remote hosts that have sent messages.
Abstract base class for implementing aggregate record filters via a functor interface.
bool initialized_
Tracks if the peers_ map has been initialized.
std::string prefix_
The context.
Provides context about the transport.
static struct madara::knowledge::tags::string_t string
This class stores a map of strings to KaRL variables.
Definition: Map.h:32
::std::map< std::string, KnowledgeRecord > KnowledgeMap
knowledge::KnowledgeRecord::Integer last_clear_
The time of the last clear of the peer_list.
Copyright (c) 2015 Carnegie Mellon University.
Provides an interface for external functions into the MADARA KaRL variable settings.