SOLA
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
minhton Namespace Reference

Classes

struct  AccessContainer
 
class  AlgorithmException
 
class  AlgorithmInterface
 
struct  AlgorithmTypesContainer
 
class  AndExpression
 
class  AtomicBooleanExpression
 
class  BooleanExpression
 
class  BootstrapAlgorithmGeneral
 
class  BootstrapAlgorithmInterface
 
class  ConfigNode
 
struct  ConnectionInfo
 
class  DistributedData
 
class  DSNHandler
 
class  EmptyExpression
 
class  EntitySearchAlgorithmInterface
 
class  FindQuery
 
class  FindQueryParser
 
class  FiniteStateMachine
 
class  FSMException
 
class  FuzzyValue
 
class  InvalidMessageException
 
class  ISerializer
 
class  JoinAlgorithmGeneral
 
class  JoinAlgorithmInterface
 
struct  JoinInfo
 
class  LeaveAlgorithmGeneral
 
class  LeaveAlgorithmInterface
 
class  LocalData
 
class  Logger
 
struct  LoggerInfoAddContent
 
struct  LoggerInfoAddEvent
 
struct  LoggerInfoAddFindQuery
 
struct  LoggerInfoAddFindQueryResult
 
struct  LoggerInfoAddNeighbor
 
struct  LoggerInfoAddNode
 
struct  LoggerInfoNodeState
 
struct  LoggerInfoSearchExact
 
class  LoggerInterface
 
struct  LoggerPhysicalNodeInfo
 
class  LogicalNodeInfo
 
struct  LogicalNodeInfoHasher
 
class  LogicContainer
 
class  MessageAttributeInquiryAnswer
  More...
 
class  MessageAttributeInquiryRequest
  More...
 
class  MessageBootstrapDiscover
 
  • Usage: A node wants to join the network but does not have access to a node's network information to send the initial Join message to. Therefore a MessageBootstrapDiscover gets send through a Multicast to discover a node's network information.
More...
 
class  MessageBootstrapResponse
  More...
 
class  MessageEmpty
 
  • Usage: A helper message type for the Search Exact Test. It has no functionality by itself. Not to be used outside of Search Exact Tests.
More...
 
class  MessageFindQueryAnswer
  More...
 
class  MessageFindQueryRequest
 
  • Usage: A node that wants to find data in the network can call the Entity Search Algorithm, which sends MessageFindQueryRequests to the requesting node's DSNs.
More...
 
class  MessageFindReplacement
 
  • Usage: A node wants to leave the network, but cannot leave the position directly because it would violate the trees balancing conditions. Another node that can leave the position has to be found to replace the position of the leaving node. For this, the MessageFindReplacement gets forwarded (similar to Join messages) until a fitting node to replace is found.
More...
 
class  MessageGetNeighbors
 
  • Usage: Currently only used in the join accept procedure in rare cases by the parent to get the correct adjacent neighbors for the child. The sender is giving a vector of neighbor relationships which he wants to know about from the targets routing information. The answer is supposed to be a MessageInformAboutNeighbors.
More...
 
class  MessageInformAboutNeighbors
 
  • Usage: This message is an answer to a MessageGetNeighbors. It contains the node information about the requested relationships and/or network information. The node sends the message back.
More...
 
class  MessageJoin
 
  • Usage: When a node wants to join the network, it sends a MessageJoin to one node in the network. If the fitting join position has been found, the target accepts the node as a new child. Otherwise, the target forwards the message with the set entering node further.
More...
 
class  MessageJoinAccept
 
  • Usage: A fitting join position has been found by forwarding the MessageJoin appropriately. The target of the last MessageJoin sends a MessageJoinAccept to the entering node (new child). This message contains all information the entering node needs about its new neighbors and the network's fanout.
More...
 
class  MessageJoinAcceptAck
 
  • Usage: After receiving a MessageJoinAccept, the new child must send a MessageJoinAcceptAck back to the new parent. It is needed to make sure the entering node still wants to join. Only after receiving this message, the parent node will send update messages through the network to inform the other neighbors about the joined node.
More...
 
class  MessageLockNeighborRequest
 
  • Usage: The parent of a successor node sends a Lock Neighbor Request to its right and left neighbor. The receivers try to lock themselves for the leave procedure and respond with a MessageLockNeighborResponse, indicating success or failure of locking themselves.
More...
 
class  MessageLockNeighborResponse
  More...
 
class  MessageRemoveAndUpdateNeighbors
 
  • Usage: Used in the leave and response algorithms for updating the routing information.
More...
 
class  MessageRemoveNeighbor
 
  • Usage: A node is leaving the network. This is a notification to remove the given node from the routing information.
More...
 
class  MessageRemoveNeighborAck
 
  • Usage: Is sent as a reply to either a MessageReplacementUpdate or MessageRemoveAndUpdateNeighbor to acknowledge the update of the routing information.
More...
 
class  MessageReplacementAck
 
  • Usage: The node that wants to leave the network receives a MessageReplacementOffer from a node that is willing to replace its position. As a response, the leaving node sends all of its necessary information in the MessageReplacementAck to the replacing node. After this message was sent, the node can finally leave the network.
More...
 
class  MessageReplacementNack
 
  • Usage: A MessageReplacementNack is sent back to the node to replace in case of a failure during the leave process. A failure can occur when the chosen successor is already replacing enother node or a MessageSignOffParentAnswer informed the current node about an unsucessful sign off from the parent.
More...
 
class  MessageReplacementOffer
  More...
 
class  MessageReplacementUpdate
 
  • Usage: During the replacement process, the neighbor nodes of the leaving node / the replaced position need to get an update about the network information of the replaced position. Through the information in this message the neighbors can update the network information and eventually also remove the removed position from their information if they also have it as their neighbor.
More...
 
class  MessageSearchExact
 
  • Usage: A node wants to send a message to another node in the network, but does not know the physical address, only the tree position. The Search Exact message gets forwarded into the right direction until it reaches its destination.
More...
 
class  MessageSearchExactFailure
  More...
 
class  MessageSignoffParentAnswer
  More...
 
class  MessageSignoffParentRequest
  More...
 
class  MessageSubscriptionOrder
 
  • Usage: A node can send a MessageSubscriptionOrder to subscribe or unsubscribe itself from the data another node maintains for the specified keys.
More...
 
class  MessageSubscriptionUpdate
 
  • Usage: If a node's local data is modified (inserted, updated or removed), it will send a subscription update the the subscribers of the key.
More...
 
class  MessageUnlockNeighbor
 
  • Usage: Used for unlocking nodes after they were locked during a concurrent operation like leave.
More...
 
class  MessageUpdateNeighbors
 
  • Usage: Informing a node about a new or updated neighbor. Used mainly in the join accept and leave procedure. The relationship of how to update the node has to be given.
More...
 
class  Minhton
 
class  MinhtonEntitySearchAlgorithm
 
class  MinhtonFindEndAlgorithm
 
class  MinhtonJoinAlgorithm
 
class  MinhtonLeaveAlgorithm
 
class  MinhtonLoggerNs3
 
class  MinhtonMessage
 
class  MinhtonMessageHeader
 
class  MinhtonNode
 
class  MinhtonSearchExactAlgorithm
 
class  NetworkFacade
 
class  NodeData
 
class  NodeInfo
 
struct  NodeInfoHasher
 
class  NotExpression
 
class  NumericComparisonExpression
 
class  OrExpression
 
struct  Overload
 Definition of a helper struct used for visiting variant types. More...
 
class  PhysicalNodeInfo
 
struct  PhysicalNodeInfoHasher
 
class  PresenceExpression
 
class  ProcedureInfo
 
struct  ReceiveMessage
 
class  ResponseAlgorithmGeneral
 
class  ResponseAlgorithmInterface
 
class  RoutingInformation
 
class  SearchExactAlgorithmGeneral
 
class  SearchExactAlgorithmInterface
 
struct  SendMessage
 
struct  Signal
 
class  StringEqualityExpression
 
struct  Timeout
 
struct  TimeoutLengthsContainer
 

Typedefs

using NeighborCallbackFct = std::function< void(const ConnectionInfo &neighbor)>
 
using Entry = std::tuple< std::string, std::variant< int, float, bool, std::string >, minhton::NodeData::ValueType >
 
using FindResult = std::vector< std::vector< Entry > >
 
using MessageSEVariant = std::variant< MessageAttributeInquiryAnswer, MessageAttributeInquiryRequest, MessageBootstrapDiscover, MessageBootstrapResponse, MessageEmpty, MessageFindQueryAnswer, MessageFindQueryRequest, MessageFindReplacement, MessageGetNeighbors, MessageInformAboutNeighbors, MessageJoin, MessageJoinAccept, MessageJoinAcceptAck, MessageLockNeighborRequest, MessageLockNeighborResponse, MessageRemoveAndUpdateNeighbors, MessageRemoveNeighbor, MessageRemoveNeighborAck, MessageReplacementAck, MessageReplacementNack, MessageReplacementOffer, MessageReplacementUpdate, MessageSignoffParentAnswer, MessageSignoffParentRequest, MessageSubscriptionOrder, MessageSubscriptionUpdate, MessageUnlockNeighbor, MessageUpdateNeighbors >
 
using MessageVariant = std::variant< MessageAttributeInquiryAnswer, MessageAttributeInquiryRequest, MessageBootstrapDiscover, MessageBootstrapResponse, MessageEmpty, MessageFindQueryAnswer, MessageFindQueryRequest, MessageFindReplacement, MessageGetNeighbors, MessageInformAboutNeighbors, MessageJoin, MessageJoinAccept, MessageJoinAcceptAck, MessageLockNeighborRequest, MessageLockNeighborResponse, MessageRemoveAndUpdateNeighbors, MessageRemoveNeighbor, MessageRemoveNeighborAck, MessageReplacementAck, MessageReplacementNack, MessageReplacementOffer, MessageReplacementUpdate, MessageSearchExact, MessageSearchExactFailure, MessageSignoffParentAnswer, MessageSignoffParentRequest, MessageSubscriptionOrder, MessageSubscriptionUpdate, MessageUnlockNeighbor, MessageUpdateNeighbors >
 

Enumerations

enum class  ComparisonTypes {
  kEqualTo , kNotEqualTo , kLessThan , kGreater ,
  kLessThanOrEqualTo , kGreaterThanOrEqualTo
}
 
enum class  SearchExactTestEntryTypes : uint8_t { kStart = 0 , kHop = 1 , kSuccess = 2 , kFailure = 3 }
 
enum class  MessageProcessingModes : uint8_t { kReceiving = 0 , kSending = 1 }
 
enum class  NeighborRelationship : uint8_t {
  kParent = 0 , kChild = 1 , kAdjacentLeft = 2 , kAdjacentRight = 3 ,
  kRoutingTableNeighbor = 4 , kRoutingTableNeighborChild = 5 , kUnknownRelationship = 6
}
 
enum class  EventType : uint8_t { kJoinEvent = 0 , kLeaveEvent = 1 , kFindQueryEvent = 3 , kRequestCountdownStart = 4 }
 
enum class  ContentStatus : uint8_t { kContentInsertUpdate = 0 , kContentRemove = 1 }
 
enum class  SignalType : uint8_t { kJoinNetwork = 0 , kLeaveNetwork = 1 , kCleanupSignal = 2 }
 
enum class  TimeoutType : uint8_t {
  kBootstrapResponseTimeout = 0 , kJoinAcceptResponseTimeout = 1 , kJoinAcceptAckResponseTimeout = 2 , kReplacementAckResponseTimeout = 3 ,
  kReplacementOfferResponseTimeout = 4 , kDsnAggregationTimeout = 5 , kInquiryAggregationTimeout = 6 , kSelfDepartureRetry = 7 ,
  kJoinRetry = 8
}
 
enum  FSMState : int {
  kIdle , kWaitForBootstrapResponse , kWaitForJoinAccept , kConnected ,
  kConnectedAcceptingChild , kConnectedReplacing , kWaitForReplacementOffer , kErrorState ,
  kConnectedWaitingParentResponse , kSignOffFromInlevelNeighbors , kConnectedWaitingParentResponseDirectLeaveWoReplacement , kSignOffFromInlevelNeighborsDirectLeaveWoReplacement ,
  kJoinFailed
}
 
enum class  JoinAlgorithms { kJoinMinhton }
 
enum class  LeaveAlgorithms { kLeaveMinhton }
 
enum class  SearchExactAlgorithms { kSearchExactMinhton }
 
enum class  ResponseAlgorithms { kResponseGeneral }
 
enum class  BootstrapAlgorithms { kBootstrapGeneral }
 
enum class  State { kStarted , kConnected , kIdle , kError }
 
enum class  NodeStatus : uint8_t { kUninit = 0 , kRunning = 1 , kLeft = 2 , kFailed = 3 }
 
enum class  AlgorithmType : uint8_t { kUndefinedAlgorithm = 0 , kJoinAlgorithm = 1 , kLeaveAlgorithm = 2 , kUpdatingAlgorithm = 4 }
 
enum class  LogLevel { kDebug , kInfo , kWarning , kCritical }
 
enum  SearchProgress {
  kSearchRight , kSearchLeft , kNone , kCheckRight ,
  kReplacementNode
}
 Used by the minhton join & leave algorithm to save the progress of the position finding.
 
enum class  MessageType : uint32_t {
  kInit = 0 , kJoin = 10 , kJoinAccept = 12 , kJoinAcceptAck = 14 ,
  kFindQueryRequest = 20 , kFindQueryAnswer = 22 , kAttributeInquiryRequest = 24 , kAttributeInquiryAnswer = 26 ,
  kSubscriptionOrder = 28 , kSubscriptionUpdate = 30 , kSearchExact = 40 , kSearchExactFailure = 41 ,
  kEmpty = 42 , kBootstrapDiscover = 50 , kBootstrapResponse = 52 , kRemoveNeighbor = 60 ,
  kRemoveNeighborAck = 62 , kUpdateNeighbors = 64 , kReplacementUpdate = 66 , kGetNeighbors = 70 ,
  kInformAboutNeighbors = 72 , kFindReplacement = 80 , kReplacementNack = 81 , kSignOffParentRequest = 82 ,
  kLockNeighborRequest = 84 , kLockNeighborResponse = 86 , kSignOffParentAnswer = 88 , kRemoveAndUpdateNeighbor = 90 ,
  kReplacementOffer = 92 , kReplacementAck = 94 , kUnlockNeighbor = 96
}
 
enum class  ProcedureKey : uint8_t {
  kBootstrapProcess , kJoinProcedure , kLeaveProcedure , kAcceptChildProcedure ,
  kFindReplacementProcedure , kEntitySearchUndecidedNodeInquiries
}
 

Functions

uint64_t getCurrentTime ()
 
bool getFillLevelRightToLeft (uint32_t level)
 
bool isNodePartOfPrioSet (uint32_t level, uint32_t number, uint16_t fanout)
 
std::tuple< uint32_t, uint32_t > calcParent (uint32_t level, uint32_t number, uint16_t fanout)
 
std::vector< std::tuple< uint32_t, uint32_t > > calcChildren (uint32_t level, uint32_t number, uint16_t fanout)
 
std::vector< uint32_t > calcRoutingSequence (uint32_t level, uint16_t fanout)
 
std::vector< std::tuple< uint32_t, uint32_t > > calcLeftRT (uint32_t level, uint32_t number, uint16_t fanout)
 
std::vector< std::tuple< uint32_t, uint32_t > > calcRightRT (uint32_t level, uint32_t number, uint16_t fanout)
 
std::set< uint32_t > calcPrioSet (uint32_t level, uint16_t fanout)
 returns an ordered set
 
bool isPositionValid (uint32_t level, uint32_t number, uint16_t fanout)
 
bool isFanoutValid (uint16_t fanout)
 
double treeMapper (uint32_t level, uint32_t number, uint16_t fanout, double K)
 
std::tuple< double, double, double > treeMapperInternal (uint32_t level, uint32_t number, uint16_t fanout, uint8_t K)
 
std::tuple< uint32_t, uint32_t > getCoveringDSN (uint32_t level, uint32_t number, uint16_t fanout)
 
std::vector< std::tuple< uint32_t, uint32_t > > getCoverArea (uint32_t level, uint32_t number, uint16_t fanout)
 
std::vector< uint32_t > getDSNSet (uint32_t level, uint16_t fanout)
 
std::string getMessageTypeString (MessageType type)
 
template<class... Ts>
 Overload (Ts...) -> Overload< Ts... >
 Explicit deduction guide for the Overload template.
 
bool operator== (const minhton::LogicalNodeInfo &p1, const minhton::LogicalNodeInfo &p2)
 
bool operator!= (const minhton::LogicalNodeInfo &p1, const minhton::LogicalNodeInfo &p2)
 
bool operator< (const minhton::LogicalNodeInfo &p1, const minhton::LogicalNodeInfo &p2)
 
bool operator<= (const minhton::LogicalNodeInfo &p1, const minhton::LogicalNodeInfo &p2)
 
bool operator> (const minhton::LogicalNodeInfo &p1, const minhton::LogicalNodeInfo &p2)
 
bool operator>= (const minhton::LogicalNodeInfo &p1, const minhton::LogicalNodeInfo &p2)
 
bool operator== (const minhton::NodeInfo &n1, const minhton::NodeInfo &n2)
 
bool operator!= (const minhton::NodeInfo &n1, const minhton::NodeInfo &n2)
 
bool operator< (const minhton::NodeInfo &n1, const minhton::NodeInfo &n2)
 
bool operator<= (const minhton::NodeInfo &n1, const minhton::NodeInfo &n2)
 
bool operator> (const minhton::NodeInfo &n1, const minhton::NodeInfo &n2)
 
bool operator>= (const minhton::NodeInfo &n1, const minhton::NodeInfo &n2)
 
bool operator== (const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
 
bool operator!= (const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
 
bool operator< (const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
 
bool operator<= (const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
 
bool operator> (const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
 
bool operator>= (const minhton::PhysicalNodeInfo &n1, const minhton::PhysicalNodeInfo &n2)
 

Variables

const std::unordered_map< uint32_t, std::string > kMapMinhtonMessageTypeStrings
 
const uint32_t kTreeMapperRootValue = 100
 
const uint16_t kFanoutMinimum = 2
 
const uint16_t kFanoutMaximum = 255
 
const uint16_t kFanoutDefault = 2
 
const int kBootstrapRepeats = 1
 Bootstrap UDP Multicast Settings.
 
const int kMulticastPort = 11999
 UDP Multicast Bootstrap Port.
 
const std::string kMulticastAddress = "224.1.1.1"
 UDP Multicast Bootstrap Address.
 
const uint16_t kDefaultIpPort = 2000
 
const uint16_t kDefaultTimeoutLength = 2500
 
constexpr uint16_t kPortMin = 1024
 
constexpr uint16_t kPortMax = UINT16_MAX
 

Detailed Description

Global definition of constants that are used in many different files

Enumeration Type Documentation

◆ MessageType

enum class minhton::MessageType : uint32_t
strong

there are various types of the messages for MinhtonNode. For further details for about the messages, check the corresponding message headers

Function Documentation

◆ calcChildren()

std::vector< std::tuple< uint32_t, uint32_t > > minhton::calcChildren ( uint32_t  level,
uint32_t  number,
uint16_t  fanout 
)

Gets an ordered list (vector) of tuples with the level and number of children of a specific node, by providing the level, number and fanout.

Typical usage:

std::vector<std::tuple<uint16_t, uint16_t>> children = calcChildren(1, 1, 3);
// an ordered child list of node 1:1 for fanout 3 -> (2:3, 2:4, 2:5)
std::vector< std::tuple< uint32_t, uint32_t > > calcChildren(uint32_t level, uint32_t number, uint16_t fanout)
Definition routing_calculations.cpp:43
Parameters
levelThe level of a node
numberThe number of a node
fanoutThe fanout the network is working with
Returns
An ordered vector (or list) of the children for the given level, number and fanout. Throws std:invalid_argument when fanout is set to 0, or the provided level and number generates an overflow or cannot be present in the network (like node 1:5 for fanout 2)

◆ calcLeftRT()

std::vector< std::tuple< uint32_t, uint32_t > > minhton::calcLeftRT ( uint32_t  level,
uint32_t  number,
uint16_t  fanout 
)

Get the left routing table for a specifc node by providing the level, number and fanout. This will give you an ordered list (vector) of tuples, which describe the routing table neighbors

Typical usage:

std::vector<std::tuple<uint32_t, uint32_t>> children = calcLeftRT(1, 2, 3);
// this would give you: (1:1, 1:0)
std::vector< std::tuple< uint32_t, uint32_t > > calcLeftRT(uint32_t level, uint32_t number, uint16_t fanout)
Definition routing_calculations.cpp:89
Parameters
levelThe level of a node
numberThe number of a node
fanoutThe fanout the network is working with
Returns
An ordered list (vector) of tuples, containing level and number left routing table. Throws std:invalid_argument if fanout is 0 or level and number cannot exist in the network

◆ calcParent()

std::tuple< uint32_t, uint32_t > minhton::calcParent ( uint32_t  level,
uint32_t  number,
uint16_t  fanout 
)

Retrieve the parent-node of a node via level, number and fanout

Typical usage:

std::tuple<uint16_t, uint16_t> parent = calcParent(1, 0, 3);
std::tuple< uint32_t, uint32_t > calcParent(uint32_t level, uint32_t number, uint16_t fanout)
Definition routing_calculations.cpp:25
Parameters
levelThe level of a node
numberThe number of a node
fanoutThe fanout the network is working with
Returns
The tuple with level and number, otherwise throws std:invalid_argument if the level and number cannot exist in the network (like node 1:5 on fanout 2), or when retrieving the parent of the root node 0:0

◆ calcPrioSet()

std::set< uint32_t > minhton::calcPrioSet ( uint32_t  level,
uint16_t  fanout 
)

returns an ordered set

Calculates the numbers of the prio nodes, with a given level and fanout.

This method implements the formula described in the nBATON* paper.

Typical usage:

calcPrioNet(level, fanout);
Parameters
level
fanout
Returns
ordered set of numbers of the prio nodes on the level

◆ calcRightRT()

std::vector< std::tuple< uint32_t, uint32_t > > minhton::calcRightRT ( uint32_t  level,
uint32_t  number,
uint16_t  fanout 
)

Get the right routing table for a specifc node by providing the level, number and fanout. This will give you an ordered list (vector) of tuples, which describe the routing table neighbors

Typical usage:

std::vector<std::tuple<uint16_t, uint16_t>> children = calcRightRT(1, 0, 3);
// this would give you: (1:1, 1:2)
std::vector< std::tuple< uint32_t, uint32_t > > calcRightRT(uint32_t level, uint32_t number, uint16_t fanout)
Definition routing_calculations.cpp:108
Parameters
levelThe level of a node
numberThe number of a node
fanoutThe fanout the network is working with
Returns
An ordered list (vector) of tuples, containing level and number left routing table. Throws std:invalid_argument if fanout is 0, level and number cannot exist in the network or if an overflow occured.

◆ calcRoutingSequence()

std::vector< uint32_t > minhton::calcRoutingSequence ( uint32_t  level,
uint16_t  fanout 
)

Here we return a sequence of distances between node entries for the routing tables. More specific: We return for fanout 2 the sequence: 1, 2, 4, 8, ... This vector can be then used to calculate, depending on the nodes position, the actual number of a node in the routing table. The level is used to make a sufficient large sequence whereby the fanout describes the gaps between the numbers.

Typical usage:

std::vector<uint64_t> seq = calcRoutingSequence(2, 2);
std::vector< uint32_t > calcRoutingSequence(uint32_t level, uint16_t fanout)
Definition routing_calculations.cpp:71
Parameters
levelThe level to get a large enough sequence
fanoutThe fanout which describe the gaps inside the sequence
Returns
A sequence of numbers for the routing tables, throws std:invalid_argument if fanout is set to 0

◆ getFillLevelRightToLeft()

bool minhton::getFillLevelRightToLeft ( uint32_t  level)

This gets the Sweep Direction, which is needed for the sophisticated join procedure. Depending on the level a bool is returned, true if the level is being filled from right to left.

Typical usage:

bool fill_level_right_to_left = getFillLevelRightToLeft(0);
bool getFillLevelRightToLeft(uint32_t level)
Definition routing_calculations.cpp:17
Parameters
levelThe level, where you want to know the sweep direction.
Returns
a bool, true for filling the level from right to left

◆ isFanoutValid()

bool minhton::isFanoutValid ( uint16_t  fanout)
Returns
true if the fanout is >= 2 and not out of reange of uint16_t

◆ isNodePartOfPrioSet()

bool minhton::isNodePartOfPrioSet ( uint32_t  level,
uint32_t  number,
uint16_t  fanout 
)

Enter the Level, Number and fanout of a node, to check, whether this node is a PrioNode (-> a node handling the routing for the sophisticated join).

Typical usage:

bool isPrio = isNodePartOfPrioSet(1, 0, 3);
bool isNodePartOfPrioSet(uint32_t level, uint32_t number, uint16_t fanout)
Definition routing_calculations.cpp:19
Parameters
levelThe level of a node
numberThe number of a node
fanoutThe fanout the network is working with
Returns
True, if the given level, number and level belongs to a PrioNode

◆ isPositionValid()

bool minhton::isPositionValid ( uint32_t  level,
uint32_t  number,
uint16_t  fanout 
)
Returns
true if the position is valid, false if not.

◆ operator!=()

bool minhton::operator!= ( const minhton::PhysicalNodeInfo n1,
const minhton::PhysicalNodeInfo n2 
)
Returns
true if n1 and n2 are not equal

◆ operator<()

bool minhton::operator< ( const minhton::PhysicalNodeInfo n1,
const minhton::PhysicalNodeInfo n2 
)
Returns
true if the calculated unique value of n1 is smaller than that of n2

◆ operator<=()

bool minhton::operator<= ( const minhton::PhysicalNodeInfo n1,
const minhton::PhysicalNodeInfo n2 
)
Returns
true if the calculated unique value of n1 is smaller or equal than that of n2

◆ operator==()

bool minhton::operator== ( const minhton::PhysicalNodeInfo n1,
const minhton::PhysicalNodeInfo n2 
)
Returns
true if the address and port are the same

◆ operator>()

bool minhton::operator> ( const minhton::PhysicalNodeInfo n1,
const minhton::PhysicalNodeInfo n2 
)
Returns
true if the calculated unique value of n1 is larger than that of n2

◆ operator>=()

bool minhton::operator>= ( const minhton::PhysicalNodeInfo n1,
const minhton::PhysicalNodeInfo n2 
)
Returns
true if the calculated unique value of n1 is larger or equal than that of n2

◆ treeMapper()

double minhton::treeMapper ( uint32_t  level,
uint32_t  number,
uint16_t  fanout,
double  K 
)

With this method we can recursively calculate the relative horizontal value of each node, given its position in the tree, and the fanout of the network.

The constant K has to be the same in the different use-cases to for comparibility of the relative horizontal values.

Typical usage:

double value = treeMapper(level, number, fanout, 1000);
double treeMapper(uint32_t level, uint32_t number, uint16_t fanout, double K)
Definition routing_calculations.cpp:231
Parameters
level
number
fanout
Kan arbitrary constant which has to be the same
Returns
horizontal value

◆ treeMapperInternal()

std::tuple< double, double, double > minhton::treeMapperInternal ( uint32_t  level,
uint32_t  number,
uint16_t  fanout,
uint8_t  K 
)

Method internally used by the treeMapper to additionally pass lower and upper bounds. Only the center is used in the outer treeMapper method.

Returns
tuple of lower bound, upper bound, and center