Implements decoding, encoding, and validation of ControlParameters in control commands. More...
#include <ndn-cxx/mgmt/nfd/control-command.hpp>
Public Types | |
using | ParametersType = ControlParameters |
Public Member Functions | |
ControlParametersCommandFormat & | optional (ControlParameterField field) |
Declare an optional field. More... | |
ControlParametersCommandFormat & | required (ControlParameterField field) |
Declare a required field. More... | |
void | validate (const ControlParameters ¶ms) const |
Verify that all required fields are present, and all present fields are either required or optional. More... | |
Static Public Member Functions | |
static shared_ptr< ControlParameters > | decode (const Interest &interest, size_t prefixLen) |
Extract the parameters from the request interest . More... | |
static void | encode (Interest &interest, const ControlParameters ¶ms) |
Serialize the parameters into the request interest . More... | |
Implements decoding, encoding, and validation of ControlParameters in control commands.
According to this format, the request parameters are encoded as a single GenericNameComponent in the Interest name, immediately after the command module and command verb components.
Definition at line 53 of file control-command.hpp.
Definition at line 56 of file control-command.hpp.
|
static |
Extract the parameters from the request interest
.
Definition at line 53 of file control-command.cpp.
|
static |
Serialize the parameters into the request interest
.
params
are valid. Definition at line 60 of file control-command.cpp.
|
inline |
Declare an optional field.
Definition at line 72 of file control-command.hpp.
|
inline |
Declare a required field.
Definition at line 62 of file control-command.hpp.
void ndn::nfd::ControlParametersCommandFormat::validate | ( | const ControlParameters & | params | ) | const |
Verify that all required fields are present, and all present fields are either required or optional.
ArgumentError | Parameters validation failed. |
Definition at line 27 of file control-command.cpp.