22 #ifndef NDN_CXX_MGMT_NFD_CONTROL_COMMAND_HPP
23 #define NDN_CXX_MGMT_NFD_CONTROL_COMMAND_HPP
45 : std::invalid_argument(what)
82 ControlCommand(
const std::string& module,
const std::string& verb);
94 m_required[field] =
true;
103 m_optional[field] =
true;
115 std::vector<bool> m_required;
116 std::vector<bool> m_optional;
Represents an absolute name.
Represents a name component.
represents an error in ControlParameters
ArgumentError(const std::string &what)
FieldValidator & required(ControlParameterField field)
declare a required field
FieldValidator & optional(ControlParameterField field)
declare an optional field
void validate(const ControlParameters ¶meters) const
verify that all required fields are present, and all present fields are either required or optional
base class of NFD ControlCommand
ControlCommand(const std::string &module, const std::string &verb)
Name getRequestName(const Name &commandPrefix, const ControlParameters ¶meters) const
construct the Name for a request Interest
virtual void validateResponse(const ControlParameters ¶meters) const
validate response parameters
virtual void applyDefaultsToRequest(ControlParameters ¶meters) const
apply default values to missing fields in request
virtual void validateRequest(const ControlParameters ¶meters) const
validate request parameters
virtual void applyDefaultsToResponse(ControlParameters ¶meters) const
apply default values to missing fields in response
FieldValidator m_responseValidator
FieldValidator for response ControlParameters.
FieldValidator m_requestValidator
FieldValidator for request ControlParameters.
virtual ~ControlCommand()
represents parameters in a ControlCommand request or response
represents a cs/config command
represents a cs/erase command
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
void validateRequest(const ControlParameters ¶meters) const override
validate request parameters
represents a faces/create command
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
represents a faces/destroy command
void validateRequest(const ControlParameters ¶meters) const override
validate request parameters
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
represents a faces/update command
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
void validateResponse(const ControlParameters ¶meters) const override
represents a fib/add-nexthop command
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
represents a fib/remove-nexthop command
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
FibRemoveNextHopCommand()
represents a rib/register command
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
represents a rib/unregister command
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
represents a strategy-choice/set command
StrategyChoiceSetCommand()
represents a strategy-choice/set command
void validateRequest(const ControlParameters ¶meters) const override
validate request parameters
StrategyChoiceUnsetCommand()
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters