17#ifndef DAISI_PATH_PLANNING_CONSENSUS_PAXOS_CONSENSUS_H_
18#define DAISI_PATH_PLANNING_CONSENSUS_PAXOS_CONSENSUS_H_
22#include "path_planning/consensus/consensus_base.h"
23#include "paxos_acceptor.h"
24#include "paxos_data.h"
25#include "paxos_proposer.h"
26#include "sola-ns3/sola_ns3_wrapper.h"
28namespace daisi::path_planning::consensus {
31 PaxosConsensus(std::shared_ptr<sola_ns3::SOLAWrapperNs3> sola, uint32_t node_id,
32 PaxosSettings settings, std::shared_ptr<PathPlanningLoggerNs3> logger);
38 void findConsensusImpl(
const PointTimePairs &points,
double seconds_earliest_start,
39 std::function<
void(uint32_t,
double)> success_cb,
40 std::function<
void(uint32_t)> fail_cb);
41 void recvTopicMessageImpl(
const std::string &topic,
const std::string &msg);
43 void processPaxosMessage(
const std::string &topic,
const std::string &msg_content);
CRTP base class for a consensus algorithm.
Definition consensus_base.h:29
Implementation for an acceptor in the paxos consensus algorithm.
Definition paxos_acceptor.h:30
Definition paxos_consensus.h:29
Implementation for an proposer in the paxos consensus algorithm.
Definition paxos_proposer.h:32
Definition paxos_settings.h:23