17#ifndef DAISI_MINHTON_NS3_MINHTON_SCENARIO_STEPS_H_
18#define DAISI_MINHTON_NS3_MINHTON_SCENARIO_STEPS_H_
24#include "manager/scenariofile_component.h"
25#include "ns3/core-module.h"
27namespace daisi::minhton_ns3 {
30 static std::string typeName() {
return "join-one"; }
32 std::optional<ns3::Time> delay;
33 std::optional<uint32_t> level;
34 std::optional<uint32_t> number;
35 std::optional<uint32_t> index;
37 void parse(
const YAML::Node &node) {
38 SERIALIZE_NS3_TIME_OPTIONAL(delay);
40 SERIALIZE_VAR(number);
46 static std::string typeName() {
return "join-many"; }
48 std::optional<ns3::Time> delay;
52 void parse(
const YAML::Node &node) {
53 SERIALIZE_NS3_TIME_OPTIONAL(delay);
54 SERIALIZE_VAR(number);
60 static std::string typeName() {
return "leave-one"; }
62 std::optional<ns3::Time> delay;
63 std::optional<uint32_t> level;
64 std::optional<uint32_t> number;
65 std::optional<uint32_t> index;
67 void parse(
const YAML::Node &node) {
68 SERIALIZE_NS3_TIME_OPTIONAL(delay);
70 SERIALIZE_VAR(number);
76 static std::string typeName() {
return "leave-many"; }
78 std::optional<ns3::Time> delay;
82 void parse(
const YAML::Node &node) {
83 SERIALIZE_NS3_TIME_OPTIONAL(delay);
84 SERIALIZE_VAR(number);
90 static std::string typeName() {
return "search-many"; }
92 std::optional<ns3::Time> delay;
95 void parse(
const YAML::Node &node) {
96 SERIALIZE_NS3_TIME_OPTIONAL(delay);
97 SERIALIZE_VAR(number);
102 static std::string typeName() {
return "search-all"; }
104 std::optional<ns3::Time> delay;
106 void parse(
const YAML::Node &node) { SERIALIZE_NS3_TIME_OPTIONAL(delay); }
110 static std::string typeName() {
return "fail-one"; }
112 std::optional<ns3::Time> delay;
113 std::optional<uint32_t> level;
114 std::optional<uint32_t> number;
115 std::optional<uint32_t> index;
117 void parse(
const YAML::Node &node) {
118 SERIALIZE_NS3_TIME_OPTIONAL(delay);
119 SERIALIZE_VAR(level);
120 SERIALIZE_VAR(number);
121 SERIALIZE_VAR(index);
126 static std::string typeName() {
return "fail-many"; }
128 std::optional<ns3::Time> delay;
131 void parse(
const YAML::Node &node) {
132 SERIALIZE_NS3_TIME_OPTIONAL(delay);
133 SERIALIZE_VAR(number);
138 static std::string typeName() {
return "mixed-execution"; }
140 std::optional<ns3::Time> delay;
141 uint32_t join_number;
142 uint32_t leave_number;
143 uint32_t search_number;
145 void parse(
const YAML::Node &node) {
146 SERIALIZE_NS3_TIME_OPTIONAL(delay);
147 SERIALIZE_VAR(join_number);
148 SERIALIZE_VAR(leave_number);
149 SERIALIZE_VAR(search_number);
154 static std::string typeName() {
return "validate-leave"; }
156 std::optional<ns3::Time> delay;
158 void parse(
const YAML::Node &node) { SERIALIZE_NS3_TIME_OPTIONAL(delay); }
162 static std::string typeName() {
return "find-query"; }
168 uint32_t validity_threshold;
170 void parse(
const YAML::Node &node) {
171 SERIALIZE_VAR(level);
172 SERIALIZE_VAR(number);
173 SERIALIZE_VAR(scope);
174 SERIALIZE_VAR(query);
175 SERIALIZE_VAR(validity_threshold);
180 static std::string typeName() {
return "time"; }
184 void parse(
const YAML::Node &node) { SERIALIZE_NS3_TIME(time); }
188 static std::string typeName() {
return "static-build"; }
192 void parse(
const YAML::Node &node) { SERIALIZE_VAR(number); }
196 static std::string typeName() {
return "request-countdown"; }
200 void parse(
const YAML::Node &node) { SERIALIZE_VAR(number); }
Definition scenario_steps.h:125
Definition scenario_steps.h:109
Definition scenario_steps.h:161
Definition scenario_steps.h:45
Definition scenario_steps.h:29
Definition scenario_steps.h:75
Definition scenario_steps.h:59
Definition scenario_steps.h:137
Definition scenario_steps.h:195
Definition scenario_steps.h:101
Definition scenario_steps.h:89
Definition scenario_steps.h:187
Definition scenario_steps.h:179
Definition scenario_steps.h:153