SOLA
Loading...
Searching...
No Matches
natter_scenariofile.h
1// Copyright 2023 The SOLA authors
2//
3// This file is part of DAISI.
4//
5// DAISI is free software: you can redistribute it and/or modify it under the terms of the GNU
6// General Public License as published by the Free Software Foundation; version 2.
7//
8// DAISI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
9// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
10// Public License for more details.
11//
12// You should have received a copy of the GNU General Public License along with DAISI. If not, see
13// <https://www.gnu.org/licenses/>.
14//
15// SPDX-License-Identifier: GPL-2.0-only
16
17#ifndef DAISI_NATTER_NS3_NATTER_SCENARIOFILE_H_
18#define DAISI_NATTER_NS3_NATTER_SCENARIOFILE_H_
19
20#include <string>
21#include <variant>
22
23#include "manager/general_scenariofile.h"
24#include "ns3/core-module.h"
25
26namespace daisi::natter_ns3 {
27
28struct Join {
29 static std::string typeName() { return "join"; }
30
31 std::string mode;
32 std::optional<ns3::Time> delay;
33
34 void parse(const YAML::Node &node);
35};
36
37struct Publish {
38 static std::string typeName() { return "publish"; }
39
40 std::string mode;
41 uint64_t number = 0;
42 std::optional<ns3::Time> delay;
43 uint64_t message_size = 0;
44
45 void parse(const YAML::Node &node);
46};
47
49 std::variant<Join, Publish> step;
50
51 void parse(const YAML::Node &node);
52};
53
55 explicit NatterScenariofile(const std::string &path_to_file);
56
57 uint16_t fanout = 0;
58 uint32_t number_nodes = 0;
59 std::string mode;
60
61 std::vector<NatterScenarioSequenceStep> scenario_sequence;
62};
63} // namespace daisi::natter_ns3
64#endif
Definition general_scenariofile.h:28
Definition natter_scenariofile.h:28
Definition natter_scenariofile.h:48
Definition natter_scenariofile.h:54
Definition natter_scenariofile.h:37