GHS
Leader Election Based on GHS Minimum Spanning Tree
|
Go to the documentation of this file.
81 template <std::
size_t NUM_AGENTS, std::
size_t MSG_Q_SIZE>
558 le::Errno set_response_required(
const agent_t &who,
const bool response_required);
571 le::Errno set_response_prompt(
const agent_t &who,
const msg::InPartPayload& m);
652 bool algorithm_converged;
657 std::array<agent_t,NUM_AGENTS> peers;
658 std::array<bool,NUM_AGENTS> waiting_for_response;
659 std::array<Edge,NUM_AGENTS> outgoing_edges;
660 std::array<msg::InPartPayload,NUM_AGENTS> response_prompt;
661 std::array<bool,NUM_AGENTS> response_required;
int agent_t
problems for GhsState
Definition: agent.h:51
le::Errno get_edge_metric(const agent_t &to, metric_t &m) const
Definition: ghs_impl.hpp:892
le::Errno get_response_prompt(const agent_t &who, msg::InPartPayload &m)
Definition: ghs_impl.hpp:825
le::Errno get_edge(const agent_t &to, Edge &out) const
Definition: ghs_impl.hpp:855
size_t waiting_count() const
Definition: ghs_impl.hpp:966
le::Errno typecast(const status_t status, const msg::Type, const msg::Data &, StaticQueue< Msg, MSG_Q_SIZE > &buf, size_t &) const
Definition: ghs_impl.hpp:625
le::Errno mst_broadcast(const msg::Type, const msg::Data &, StaticQueue< Msg, MSG_Q_SIZE > &buf, size_t &) const
Definition: ghs_impl.hpp:644
le::Errno mst_convergecast(const msg::Type, const msg::Data &, StaticQueue< Msg, MSG_Q_SIZE > &buf, size_t &) const
Definition: ghs_impl.hpp:662
unsigned long metric_t
Definition: edge.h:63
status_t
A status enumeration, for the ghs edges.
Definition: edge.h:82
le::Errno checked_index_of(const agent_t &, size_t &) const
Definition: ghs_impl.hpp:753
le::Errno start_round(StaticQueue< Msg, MSG_Q_SIZE > &outgoing_msgs, size_t &)
Definition: ghs_impl.hpp:102
Errno
Definition: errno.h:49
a static-sized single-ended queue for use in GhsState
Type
Stores what type of Msg this is.
Definition: msg.h:58
the implementation for le::ghs::GhsState
provides the defs for the struct le::ghs::msg
An aggregate type containing all the data to exchange with to/from information.
Definition: msg.h:143
level_t get_level() const
Definition: ghs_impl.hpp:735
le::Errno process(const Msg &msg, StaticQueue< Msg, MSG_Q_SIZE > &outgoing_buffer, size_t &sz)
Definition: ghs_impl.hpp:118
defintion for le::ghs::level_t
Edge mwoe() const
Definition: ghs_impl.hpp:113
size_t get_n_peers() const
Definition: ghs.h:172
a static-sized single-ended queue for use in GhsState
Definition: static_queue.h:60
Edge structure definition and functions.
le::Errno get_edge_status(const agent_t &to, status_t &out) const
Definition: ghs_impl.hpp:867
le::Errno is_response_required(const agent_t &who, bool &response_required)
Definition: ghs_impl.hpp:803
agent_t get_id() const
Definition: ghs_impl.hpp:991
provides le::ghs::agent_t defintion
Asks "Are you in my partition".
Definition: msg.h:92
bool has_edge(const agent_t to) const
Definition: ghs_impl.hpp:848
size_t delayed_count() const
Definition: ghs_impl.hpp:979
agent_t get_parent_id() const
Definition: ghs_impl.hpp:712
A struct to hold all the communication edge information.
Definition: edge.h:98
GhsState(agent_t my_id, Edge *edges, size_t num_edges)
Definition: ghs_impl.hpp:56
le::Errno is_waiting_for(const agent_t &who, bool &out_waiting_for)
Definition: ghs_impl.hpp:780
int level_t
A "level" which is an internal item for GhsState to track how many times the MST has merged with anot...
Definition: level.h:49
bool is_converged() const
Definition: ghs_impl.hpp:747
agent_t get_leader_id() const
Definition: ghs_impl.hpp:723
Provides error codes for all classes / functions.
The main state machine for the GHS algorithm
Definition: ghs.h:82