SOLA
Loading...
Searching...
No Matches
attribute_inquiry_answer.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_ATTRIBUTE_INQUIRY_ANSWER_H_
8#define MINHTON_MESSAGE_ATTRIBUTE_INQUIRY_ANSWER_H_
9
10#include <unordered_map>
11
12#include "minhton/algorithms/esearch/node_data.h"
13#include "minhton/message/message.h"
14#include "solanet/serializer/serialize.h"
15
16namespace minhton {
20class MessageAttributeInquiryAnswer : public MinhtonMessage<MessageAttributeInquiryAnswer> {
21public:
28 MinhtonMessageHeader header, NodeInfo inquired_node,
29 std::unordered_map<std::string, NodeData::ValueAndType> attribute_values_and_types = {},
30 std::vector<std::string> removed_attribute_keys = {});
31
32 NodeInfo getInquiredNode() const;
33 std::unordered_map<std::string, NodeData::ValueAndType> getAttributeValuesAndTypes() const;
34 std::vector<std::string> getRemovedAttributeKeys() const;
35
36 SERIALIZE(header_, inquired_node_, attribute_values_and_types_, removed_attribute_keys_);
37
39
40private:
41 friend MinhtonMessage;
42
44
46 bool validateImpl() const;
47
48 NodeInfo inquired_node_;
49
50 std::unordered_map<std::string, NodeData::ValueAndType> attribute_values_and_types_;
51
52 std::vector<std::string> removed_attribute_keys_;
53};
54} // namespace minhton
55
56#endif
Usage: The message that the node which received a MessageAttributeInquiryRequest sends back.
Definition attribute_inquiry_answer.h:20
Definition message_header.h:24
Definition message.h:28
Definition node_info.h:24
Definition minhton_watchdog_ns3.cpp:24