20 const std::tuple<solanet::UUID, LevelNumber> own_node;
21 const std::tuple<solanet::UUID, LevelNumber> last_node;
22 const std::tuple<solanet::UUID, LevelNumber> initial_node;
24 const std::string topic;
25 const solanet::UUID msg_id;
26 const std::string content;
27 const uint32_t current_round;
30 inline uint32_t ownLevel()
const {
return std::get<0>(getOwnNodePos()); }
31 inline uint32_t ownNumber()
const {
return std::get<1>(getOwnNodePos()); }
32 inline uint32_t ownFanout()
const {
return std::get<2>(getOwnNodePos()); }
35 inline uint32_t lastLevel()
const {
return std::get<0>(getLastNodePos()); }
36 inline uint32_t lastNumber()
const {
return std::get<1>(getLastNodePos()); }
37 inline uint32_t lastFanout()
const {
return std::get<2>(getLastNodePos()); }
40 inline uint32_t initialLevel()
const {
return std::get<0>(getInitialNodePos()); }
41 inline uint32_t initialNumber()
const {
return std::get<1>(getInitialNodePos()); }
42 inline uint32_t initialFanout()
const {
return std::get<2>(getInitialNodePos()); }
44 inline LevelNumber getOwnNodePos()
const {
return std::get<1>(own_node); }
45 inline LevelNumber getLastNodePos()
const {
return std::get<1>(last_node); }
46 inline LevelNumber getInitialNodePos()
const {
return std::get<1>(initial_node); }
48 bool isInitialSender()
const {
return initial_node == own_node; }
49 bool receivedDirectlyFromAbove()
const {
return lastLevel() + 1 == ownLevel(); }
50 bool receivedFromAbove()
const {
return lastLevel() < ownLevel(); }
51 bool parentFromInitial()
const {
52 return childFromNode(std::get<1>(initial_node), std::get<1>(own_node));
54 bool allowedDownForward()
const {
return ownLevel() < forwarding_limit.down(); }
55 bool allowedUpForward()
const {
return ownLevel() > forwarding_limit.up(); }
56 bool receivedFromLowerAdjacent()
const {
57 return lastLevel() > ownLevel() && lastLevel() - 1 > ownLevel();