GHS
Leader Election Based on GHS Minimum Spanning Tree
Namespaces | Classes | Enumerations | Functions
le Namespace Reference

Namespaces

 ghs
 

Classes

class  LocalGraph
 

Enumerations

enum  Errno {
  OK = 0, PROCESS_SELFMSG, PROCESS_NOTME, PROCESS_INVALID_TYPE,
  PROCESS_REQ_MST, SRCH_INAVLID_SENDER, SRCH_STILL_WAITING, ERR_QUEUE_MSGS,
  PROCESS_NO_EDGE_FOUND, UNEXPECTED_SRCH_RET, ACK_NOT_WAITING, BAD_MSG,
  JOIN_BAD_LEADER, JOIN_BAD_LEVEL, JOIN_INIT_BAD_LEADER, JOIN_INIT_BAD_LEVEL,
  JOIN_MY_LEADER, JOIN_UNEXPECTED_REPLY, ERR_IMPL, CAST_INVALID_EDGE,
  SET_INVALID_EDGE, SET_INVALID_EDGE_METRIC, SET_INVALID_EDGE_NOT_ROOT, SET_INVALID_EDGE_NO_AGENT,
  SET_INVALID_EDGE_SELF_LOOP, PARENT_UNRECOGNIZED, PARENT_REQ_MST, NO_SUCH_PEER,
  IMPL_REQ_PEER_MY_ID, TOO_MANY_AGENTS, PARTIAL_RESULT, NO_AGENTS,
  ERR_QUEUE_FULL, ERR_QUEUE_EMPTY, ERR_BAD_IDX, ERR_NO_SUCH_ELEMENT
}
 

Functions

const char * strerror (const Errno e)
 

Detailed Description

LE

Leader Election

Enumeration Type Documentation

◆ Errno

enum le::Errno

The Errno enumeration used by all classes for all function calls that may fail.

Enumerator
OK 

The operation was successful.

PROCESS_SELFMSG 

Could not process a message from self.

PROCESS_NOTME 

Could not process a message not directed towards this agent.

PROCESS_INVALID_TYPE 

Did not recognize or could not process this type of message.

PROCESS_REQ_MST 

This type of message (possibly only at this time) should have come over and MST link, but did not.

SRCH_INAVLID_SENDER 

There is no reason to expect a SRCH message from this sender (usually parent and MST link required)

SRCH_STILL_WAITING 

THere is no way to process a SRCH message when we're still executing the last search ( waiting_count() > 0 )

ERR_QUEUE_MSGS 

Unable to enqueue messages, received seque::Retcode not OK.

PROCESS_NO_EDGE_FOUND 

Unable to process the message when we don't have an edge to that agent.

UNEXPECTED_SRCH_RET 

Unexpected srch_ret message at this time (not searching or not waiting for that agent)

ACK_NOT_WAITING 

We cannot process an ACK message if we aren't expecting one.

BAD_MSG 

Likely malformed message.

JOIN_BAD_LEADER 

Received join message with a leader not our own, yet we are not on a partition boundary.

JOIN_BAD_LEVEL 

Received join message with a non-matching level, yet we received join msg with different level.

JOIN_INIT_BAD_LEADER 

Told to init join to another parition, but leader unrecognized.

JOIN_INIT_BAD_LEVEL 

Told to init join to another partition, but level unrecognized.

JOIN_MY_LEADER 

Other partition suggested we join our own partition.

JOIN_UNEXPECTED_REPLY 

received higher-level join message: Impossible since we should not have replied to their SRCH yet

ERR_IMPL 

Implementation error: Reached branch that should not have been reachable.

CAST_INVALID_EDGE 

*cast operation failed because of bad edge

SET_INVALID_EDGE 

add- or set edge failed because of malformed edge

SET_INVALID_EDGE_METRIC 

add- or set edge failed because metric_val==WORST_METRIC

SET_INVALID_EDGE_NOT_ROOT 

add- or set edge failed because edge was not rooted on my_id

SET_INVALID_EDGE_NO_AGENT 

add- or set edge failed because of NO_AGENT as peer/root

SET_INVALID_EDGE_SELF_LOOP 

add- or set edge failed because Edge.peer == my_id

PARENT_UNRECOGNIZED 

Cannot set parent ID to unrecognized node (no edge to them!)

PARENT_REQ_MST 

Cannot set parent ID to non-MST node (bad edge type)

NO_SUCH_PEER 

Cannot find peer idx – no edge or unrecognized ID?

IMPL_REQ_PEER_MY_ID 

Cannot treat my_id as peer – bad message?

TOO_MANY_AGENTS 

Set- or add edge failed, too many agents in static storage already.

PARTIAL_RESULT 

When returning the result, this means we have not converged yet.

NO_AGENTS 

Operation failed because we have no outgoing edges.

ERR_QUEUE_FULL 

Operation failed, the queue is full.

ERR_QUEUE_EMPTY 

Operation failed, the queue is empty.

ERR_BAD_IDX 

Operation failed and is not possible to succeed: that idx is beyond the static size of the queue.

ERR_NO_SUCH_ELEMENT 

Operation failed, there are less elements than the given index in the queue.

Function Documentation

◆ strerror()

const char * le::strerror ( const Errno  e)
Returns
a human-readable string for any value of the passed in Retcode
Parameters
ra le::Errnoo