SOLA
Loading...
Searching...
No Matches
subscription_order.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_SUBSCRIPTION_ORDER_H_
8#define MINHTON_MESSAGE_SUBSCRIPTION_ORDER_H_
9
10#include "minhton/algorithms/esearch/node_data.h"
11#include "minhton/message/message.h"
12#include "solanet/serializer/serialize.h"
13
14namespace minhton {
18class MessageSubscriptionOrder : public MinhtonMessage<MessageSubscriptionOrder> {
19public:
22 MessageSubscriptionOrder(MinhtonMessageHeader header, std::vector<NodeData::Key> keys,
23 bool subscribe = false);
24
25 std::vector<NodeData::Key> getKeys() const;
26 bool getSubscribe() const;
27
28 SERIALIZE(header_, keys_, subscribe_);
29
30 MessageSubscriptionOrder() = default;
31
32private:
33 friend MinhtonMessage;
34
37
39 bool validateImpl() const;
40
41 std::vector<NodeData::Key> keys_;
42
43 bool subscribe_ = false; // false = unsubscribe
44};
45} // namespace minhton
46
47#endif
Usage: A node can send a MessageSubscriptionOrder to subscribe or unsubscribe itself from the data an...
Definition subscription_order.h:18
Definition message_header.h:24
Definition message.h:28
Definition minhton_watchdog_ns3.cpp:24