SOLA
Loading...
Searching...
No Matches
remove_neighbor.h
1// Copyright The SOLA Contributors
2//
3// Licensed under the MIT License.
4// For details on the licensing terms, see the LICENSE file.
5// SPDX-License-Identifier: MIT
6
7#ifndef MINHTON_MESSAGE_REMOVE_NEIGHBOR_H_
8#define MINHTON_MESSAGE_REMOVE_NEIGHBOR_H_
9
10#include "minhton/message/message.h"
11#include "solanet/serializer/serialize.h"
12
13namespace minhton {
17class MessageRemoveNeighbor : public MinhtonMessage<MessageRemoveNeighbor> {
18public:
21 MessageRemoveNeighbor(MinhtonMessageHeader header, NodeInfo removed_position_node,
22 bool acknowledge = false);
23
24 NodeInfo getRemovedPositionNode() const;
25 bool getShouldAcknowledge() const;
26
27 SERIALIZE(header_, removed_position_node_, acknowledge_);
28
29 MessageRemoveNeighbor() = default;
30
31private:
32 friend MinhtonMessage;
33
36
38 bool validateImpl() const;
39
41 NodeInfo removed_position_node_;
42
43 bool acknowledge_ = false;
44};
45} // namespace minhton
46
47#endif
Usage: A node is leaving the network. This is a notification to remove the given node from the routin...
Definition remove_neighbor.h:17
Definition message_header.h:24
Definition message.h:28
Definition node_info.h:24
Definition minhton_watchdog_ns3.cpp:24