FREEDM DGI
CPeerNode.hpp
Go to the documentation of this file.
1 
25 #ifndef CPEERNODE_HPP_
26 #define CPEERNODE_HPP_
27 
28 #include <string>
29 
30 namespace freedm {
31 
32 namespace broker {
33 
34 class ModuleMessage;
35 
37 class CPeerNode
38 {
39  public:
41  CPeerNode();
43  CPeerNode(std::string uuid);
45  std::string GetUUID() const;
47  std::string GetHostname() const;
49  std::string GetPort() const;
51  void Send(const ModuleMessage& msg);
52  private:
53  std::string m_uuid;
54 };
55 
56 bool operator==(const CPeerNode& a, const CPeerNode& b);
57 bool operator<(const CPeerNode& a, const CPeerNode& b);
58 
59 } // namespace broker
60 } // namespace freedm
61 
62 #endif
std::string GetUUID() const
Gets the uuid of the node this addresses.
Definition: CPeerNode.cpp:70
std::string GetHostname() const
Gets the hostname of this peer.
Definition: CPeerNode.cpp:81
bool operator<(const CPeerNode &a, const CPeerNode &b)
Definition: CPeerNode.cpp:147
std::string m_uuid
Definition: CPeerNode.hpp:53
Base interface for agents/broker modules.
Definition: CPeerNode.hpp:37
void Send(const ModuleMessage &msg)
Sends a message to peer.
Definition: CPeerNode.cpp:115
CPeerNode()
Construct a peer node.
Definition: CPeerNode.cpp:58
bool operator==(const CPeerNode &a, const CPeerNode &b)
Definition: CPeerNode.cpp:138
General FREEDM Namespace.
Definition: CBroker.cpp:53
std::string GetPort() const
Gets the port of this peer.
Definition: CPeerNode.cpp:94