Alexander Afanasyev | c169a81 | 2014-05-20 20:37:29 -0400 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 2 | /** |
Alexander Afanasyev | c169a81 | 2014-05-20 20:37:29 -0400 | [diff] [blame] | 3 | * Copyright (c) 2013-2014 Regents of the University of California. |
Alexander Afanasyev | dfa52c4 | 2014-04-24 21:10:11 -0700 | [diff] [blame] | 4 | * |
| 5 | * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions). |
Alexander Afanasyev | dfa52c4 | 2014-04-24 21:10:11 -0700 | [diff] [blame] | 6 | * |
Alexander Afanasyev | c169a81 | 2014-05-20 20:37:29 -0400 | [diff] [blame] | 7 | * ndn-cxx library is free software: you can redistribute it and/or modify it under the |
| 8 | * terms of the GNU Lesser General Public License as published by the Free Software |
| 9 | * Foundation, either version 3 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY |
| 12 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
| 13 | * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
| 14 | * |
| 15 | * You should have received copies of the GNU General Public License and GNU Lesser |
| 16 | * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see |
| 17 | * <http://www.gnu.org/licenses/>. |
| 18 | * |
| 19 | * See AUTHORS.md for complete list of ndn-cxx authors and contributors. |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 20 | */ |
| 21 | |
| 22 | #ifndef NDN_MANAGEMENT_NFD_CONTROL_PARAMETERS_HPP |
| 23 | #define NDN_MANAGEMENT_NFD_CONTROL_PARAMETERS_HPP |
| 24 | |
Junxiao Shi | 65f1a71 | 2014-11-20 14:59:36 -0700 | [diff] [blame] | 25 | #include "../encoding/nfd-constants.hpp" |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 26 | #include "../name.hpp" |
Alexander Afanasyev | 15f6731 | 2014-07-22 15:11:09 -0700 | [diff] [blame] | 27 | #include "../util/time.hpp" |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 28 | |
| 29 | namespace ndn { |
| 30 | namespace nfd { |
| 31 | |
Alexander Afanasyev | 4671bf7 | 2014-05-19 09:01:37 -0400 | [diff] [blame] | 32 | /** |
| 33 | * \ingroup management |
| 34 | */ |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 35 | enum ControlParameterField { |
| 36 | CONTROL_PARAMETER_NAME, |
| 37 | CONTROL_PARAMETER_FACE_ID, |
| 38 | CONTROL_PARAMETER_URI, |
| 39 | CONTROL_PARAMETER_LOCAL_CONTROL_FEATURE, |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 40 | CONTROL_PARAMETER_ORIGIN, |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 41 | CONTROL_PARAMETER_COST, |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 42 | CONTROL_PARAMETER_FLAGS, |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 43 | CONTROL_PARAMETER_STRATEGY, |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 44 | CONTROL_PARAMETER_EXPIRATION_PERIOD, |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 45 | CONTROL_PARAMETER_UBOUND |
| 46 | }; |
| 47 | |
| 48 | const std::string CONTROL_PARAMETER_FIELD[CONTROL_PARAMETER_UBOUND] = { |
| 49 | "Name", |
| 50 | "FaceId", |
| 51 | "Uri", |
| 52 | "LocalControlFeature", |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 53 | "Origin", |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 54 | "Cost", |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 55 | "Flags", |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 56 | "Strategy", |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 57 | "ExpirationPeriod", |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 58 | }; |
| 59 | |
Alexander Afanasyev | 4671bf7 | 2014-05-19 09:01:37 -0400 | [diff] [blame] | 60 | /** |
| 61 | * \ingroup management |
| 62 | */ |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 63 | enum LocalControlFeature { |
| 64 | LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID = 1, |
| 65 | LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID = 2 |
| 66 | }; |
| 67 | |
Alexander Afanasyev | 4671bf7 | 2014-05-19 09:01:37 -0400 | [diff] [blame] | 68 | /** |
Junxiao Shi | 7091165 | 2014-08-12 10:14:24 -0700 | [diff] [blame] | 69 | * @ingroup management |
| 70 | * @brief represents parameters in a ControlCommand request or response |
| 71 | * @sa http://redmine.named-data.net/projects/nfd/wiki/ControlCommand#ControlParameters |
| 72 | * @detail This type is copyable because it's an abstraction of a TLV type. |
Junxiao Shi | 7b6b79d | 2014-03-26 20:59:35 -0700 | [diff] [blame] | 73 | */ |
| 74 | class ControlParameters |
| 75 | { |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 76 | public: |
Steve DiBenedetto | 54ce668 | 2014-07-22 13:22:57 -0600 | [diff] [blame] | 77 | class Error : public tlv::Error |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 78 | { |
| 79 | public: |
| 80 | explicit |
| 81 | Error(const std::string& what) |
Steve DiBenedetto | 54ce668 | 2014-07-22 13:22:57 -0600 | [diff] [blame] | 82 | : tlv::Error(what) |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 83 | { |
| 84 | } |
| 85 | }; |
| 86 | |
Junxiao Shi | 7091165 | 2014-08-12 10:14:24 -0700 | [diff] [blame] | 87 | ControlParameters(); |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 88 | |
| 89 | explicit |
Junxiao Shi | 7091165 | 2014-08-12 10:14:24 -0700 | [diff] [blame] | 90 | ControlParameters(const Block& block); |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 91 | |
| 92 | template<bool T> |
| 93 | size_t |
| 94 | wireEncode(EncodingImpl<T>& encoder) const; |
| 95 | |
| 96 | const Block& |
| 97 | wireEncode() const; |
| 98 | |
| 99 | void |
| 100 | wireDecode(const Block& wire); |
| 101 | |
| 102 | public: // getters & setters |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 103 | |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 104 | bool |
| 105 | hasName() const |
| 106 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 107 | return m_hasFields[CONTROL_PARAMETER_NAME]; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | const Name& |
| 111 | getName() const |
| 112 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 113 | BOOST_ASSERT(this->hasName()); |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 114 | return m_name; |
| 115 | } |
| 116 | |
| 117 | ControlParameters& |
| 118 | setName(const Name& name) |
| 119 | { |
| 120 | m_wire.reset(); |
| 121 | m_name = name; |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 122 | m_hasFields[CONTROL_PARAMETER_NAME] = true; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 123 | return *this; |
| 124 | } |
| 125 | |
| 126 | ControlParameters& |
| 127 | unsetName() |
| 128 | { |
| 129 | m_wire.reset(); |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 130 | m_hasFields[CONTROL_PARAMETER_NAME] = false; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 131 | return *this; |
| 132 | } |
| 133 | |
| 134 | bool |
| 135 | hasFaceId() const |
| 136 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 137 | return m_hasFields[CONTROL_PARAMETER_FACE_ID]; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 138 | } |
| 139 | |
| 140 | uint64_t |
| 141 | getFaceId() const |
| 142 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 143 | BOOST_ASSERT(this->hasFaceId()); |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 144 | return m_faceId; |
| 145 | } |
| 146 | |
| 147 | ControlParameters& |
| 148 | setFaceId(uint64_t faceId) |
| 149 | { |
| 150 | m_wire.reset(); |
| 151 | m_faceId = faceId; |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 152 | m_hasFields[CONTROL_PARAMETER_FACE_ID] = true; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 153 | return *this; |
| 154 | } |
| 155 | |
| 156 | ControlParameters& |
| 157 | unsetFaceId() |
| 158 | { |
| 159 | m_wire.reset(); |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 160 | m_hasFields[CONTROL_PARAMETER_FACE_ID] = false; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 161 | return *this; |
| 162 | } |
| 163 | |
| 164 | bool |
| 165 | hasUri() const |
| 166 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 167 | return m_hasFields[CONTROL_PARAMETER_URI]; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 168 | } |
| 169 | |
| 170 | const std::string& |
| 171 | getUri() const |
| 172 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 173 | BOOST_ASSERT(this->hasUri()); |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 174 | return m_uri; |
| 175 | } |
| 176 | |
| 177 | ControlParameters& |
| 178 | setUri(const std::string& uri) |
| 179 | { |
| 180 | m_wire.reset(); |
| 181 | m_uri = uri; |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 182 | m_hasFields[CONTROL_PARAMETER_URI] = true; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 183 | return *this; |
| 184 | } |
| 185 | |
| 186 | ControlParameters& |
| 187 | unsetUri() |
| 188 | { |
| 189 | m_wire.reset(); |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 190 | m_hasFields[CONTROL_PARAMETER_URI] = false; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 191 | return *this; |
| 192 | } |
| 193 | |
| 194 | bool |
| 195 | hasLocalControlFeature() const |
| 196 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 197 | return m_hasFields[CONTROL_PARAMETER_LOCAL_CONTROL_FEATURE]; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 198 | } |
| 199 | |
| 200 | LocalControlFeature |
| 201 | getLocalControlFeature() const |
| 202 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 203 | BOOST_ASSERT(this->hasLocalControlFeature()); |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 204 | return m_localControlFeature; |
| 205 | } |
| 206 | |
| 207 | ControlParameters& |
| 208 | setLocalControlFeature(LocalControlFeature localControlFeature) |
| 209 | { |
| 210 | m_wire.reset(); |
| 211 | m_localControlFeature = localControlFeature; |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 212 | m_hasFields[CONTROL_PARAMETER_LOCAL_CONTROL_FEATURE] = true; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 213 | return *this; |
| 214 | } |
| 215 | |
| 216 | ControlParameters& |
| 217 | unsetLocalControlFeature() |
| 218 | { |
| 219 | m_wire.reset(); |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 220 | m_hasFields[CONTROL_PARAMETER_LOCAL_CONTROL_FEATURE] = false; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 221 | return *this; |
| 222 | } |
| 223 | |
| 224 | bool |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 225 | hasOrigin() const |
| 226 | { |
| 227 | return m_hasFields[CONTROL_PARAMETER_ORIGIN]; |
| 228 | } |
| 229 | |
| 230 | uint64_t |
| 231 | getOrigin() const |
| 232 | { |
| 233 | BOOST_ASSERT(this->hasOrigin()); |
| 234 | return m_origin; |
| 235 | } |
| 236 | |
| 237 | ControlParameters& |
| 238 | setOrigin(uint64_t origin) |
| 239 | { |
| 240 | m_wire.reset(); |
| 241 | m_origin = origin; |
| 242 | m_hasFields[CONTROL_PARAMETER_ORIGIN] = true; |
| 243 | return *this; |
| 244 | } |
| 245 | |
| 246 | ControlParameters& |
| 247 | unsetOrigin() |
| 248 | { |
| 249 | m_wire.reset(); |
| 250 | m_hasFields[CONTROL_PARAMETER_ORIGIN] = false; |
| 251 | return *this; |
| 252 | } |
| 253 | |
| 254 | bool |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 255 | hasCost() const |
| 256 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 257 | return m_hasFields[CONTROL_PARAMETER_COST]; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 258 | } |
| 259 | |
| 260 | uint64_t |
| 261 | getCost() const |
| 262 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 263 | BOOST_ASSERT(this->hasCost()); |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 264 | return m_cost; |
| 265 | } |
| 266 | |
| 267 | ControlParameters& |
| 268 | setCost(uint64_t cost) |
| 269 | { |
| 270 | m_wire.reset(); |
| 271 | m_cost = cost; |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 272 | m_hasFields[CONTROL_PARAMETER_COST] = true; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 273 | return *this; |
| 274 | } |
| 275 | |
| 276 | ControlParameters& |
| 277 | unsetCost() |
| 278 | { |
| 279 | m_wire.reset(); |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 280 | m_hasFields[CONTROL_PARAMETER_COST] = false; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 281 | return *this; |
| 282 | } |
| 283 | |
| 284 | bool |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 285 | hasFlags() const |
| 286 | { |
| 287 | return m_hasFields[CONTROL_PARAMETER_FLAGS]; |
| 288 | } |
| 289 | |
| 290 | uint64_t |
| 291 | getFlags() const |
| 292 | { |
| 293 | BOOST_ASSERT(this->hasFlags()); |
| 294 | return m_flags; |
| 295 | } |
| 296 | |
| 297 | ControlParameters& |
| 298 | setFlags(uint64_t flags) |
| 299 | { |
| 300 | m_wire.reset(); |
| 301 | m_flags = flags; |
| 302 | m_hasFields[CONTROL_PARAMETER_FLAGS] = true; |
| 303 | return *this; |
| 304 | } |
| 305 | |
| 306 | ControlParameters& |
| 307 | unsetFlags() |
| 308 | { |
| 309 | m_wire.reset(); |
| 310 | m_hasFields[CONTROL_PARAMETER_FLAGS] = false; |
| 311 | return *this; |
| 312 | } |
| 313 | |
| 314 | bool |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 315 | hasStrategy() const |
| 316 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 317 | return m_hasFields[CONTROL_PARAMETER_STRATEGY]; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 318 | } |
| 319 | |
| 320 | const Name& |
| 321 | getStrategy() const |
| 322 | { |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 323 | BOOST_ASSERT(this->hasStrategy()); |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 324 | return m_strategy; |
| 325 | } |
| 326 | |
| 327 | ControlParameters& |
| 328 | setStrategy(const Name& strategy) |
| 329 | { |
| 330 | m_wire.reset(); |
| 331 | m_strategy = strategy; |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 332 | m_hasFields[CONTROL_PARAMETER_STRATEGY] = true; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 333 | return *this; |
| 334 | } |
| 335 | |
| 336 | ControlParameters& |
| 337 | unsetStrategy() |
| 338 | { |
| 339 | m_wire.reset(); |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 340 | m_hasFields[CONTROL_PARAMETER_STRATEGY] = false; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 341 | return *this; |
| 342 | } |
| 343 | |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 344 | bool |
| 345 | hasExpirationPeriod() const |
| 346 | { |
| 347 | return m_hasFields[CONTROL_PARAMETER_EXPIRATION_PERIOD]; |
| 348 | } |
| 349 | |
| 350 | const time::milliseconds& |
| 351 | getExpirationPeriod() const |
| 352 | { |
| 353 | BOOST_ASSERT(this->hasExpirationPeriod()); |
| 354 | return m_expirationPeriod; |
| 355 | } |
| 356 | |
| 357 | ControlParameters& |
| 358 | setExpirationPeriod(const time::milliseconds& expirationPeriod) |
| 359 | { |
| 360 | m_wire.reset(); |
| 361 | m_expirationPeriod = expirationPeriod; |
| 362 | m_hasFields[CONTROL_PARAMETER_EXPIRATION_PERIOD] = true; |
| 363 | return *this; |
| 364 | } |
| 365 | |
| 366 | ControlParameters& |
| 367 | unsetExpirationPeriod() |
| 368 | { |
| 369 | m_wire.reset(); |
| 370 | m_hasFields[CONTROL_PARAMETER_EXPIRATION_PERIOD] = false; |
| 371 | return *this; |
| 372 | } |
| 373 | |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 374 | const std::vector<bool>& |
| 375 | getPresentFields() const |
| 376 | { |
| 377 | return m_hasFields; |
| 378 | } |
| 379 | |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 380 | private: // fields |
Junxiao Shi | 5ec8022 | 2014-03-25 20:08:05 -0700 | [diff] [blame] | 381 | std::vector<bool> m_hasFields; |
| 382 | |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 383 | Name m_name; |
| 384 | uint64_t m_faceId; |
| 385 | std::string m_uri; |
| 386 | LocalControlFeature m_localControlFeature; |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 387 | uint64_t m_origin; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 388 | uint64_t m_cost; |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 389 | uint64_t m_flags; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 390 | Name m_strategy; |
Junxiao Shi | 5f6c74f | 2014-04-18 16:29:44 -0700 | [diff] [blame] | 391 | time::milliseconds m_expirationPeriod; |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 392 | |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 393 | private: |
| 394 | mutable Block m_wire; |
| 395 | }; |
| 396 | |
Junxiao Shi | 7091165 | 2014-08-12 10:14:24 -0700 | [diff] [blame] | 397 | std::ostream& |
| 398 | operator<<(std::ostream& os, const ControlParameters& parameters); |
Junxiao Shi | bc19b37 | 2014-03-23 16:59:25 -0700 | [diff] [blame] | 399 | |
| 400 | } // namespace nfd |
| 401 | } // namespace ndn |
| 402 | |
| 403 | #endif // NDN_MANAGEMENT_NFD_CONTROL_PARAMETERS_HPP |