SOLA
Loading...
Searching...
No Matches
minhton
include
minhton
message
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
14
namespace
minhton
{
18
class
MessageSubscriptionOrder
:
public
MinhtonMessage
<MessageSubscriptionOrder> {
19
public
:
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
32
private
:
33
friend
MinhtonMessage
;
34
36
MinhtonMessageHeader
header_;
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
minhton::MessageSubscriptionOrder
Usage: A node can send a MessageSubscriptionOrder to subscribe or unsubscribe itself from the data an...
Definition
subscription_order.h:18
minhton::MinhtonMessageHeader
Definition
message_header.h:24
minhton::MinhtonMessage
Definition
message.h:28
minhton
Definition
minhton_watchdog_ns3.cpp:24
Generated by
1.9.8