64 name.append(m_module).append(m_verb);
81 bool isPresent = presentFields[i];
87 else if (isPresent && !m_optional[i]) {
94 BOOST_THROW_EXCEPTION(
ArgumentError(
"Flags must be accompanied by Mask"));
134 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must be valid"));
170 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must be valid"));
188 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must be valid"));
228 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must be valid"));
257 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must be valid"));
291 BOOST_THROW_EXCEPTION(
ArgumentError(
"Count must be positive"));
301 BOOST_THROW_EXCEPTION(
ArgumentError(
"Capacity must be positive"));
328 BOOST_THROW_EXCEPTION(
ArgumentError(
"Name must not be ndn:/"));
380 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must be valid"));
414 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must be valid"));
void validate(const ControlParameters ¶meters) const
verify that all required fields are present, and all present fields are either required or optional ...
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
ControlParameters & setFaceId(uint64_t faceId)
virtual void applyDefaultsToResponse(ControlParameters ¶meters) const
apply default values to missing fields in response
Copyright (c) 2011-2015 Regents of the University of California.
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
represents parameters in a ControlCommand request or response
virtual void validateResponse(const ControlParameters ¶meters) const
validate response parameters
size_t wireEncode(EncodingImpl< TAG > &encoder) const
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
FieldValidator m_requestValidator
FieldValidator for request ControlParameters.
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
base class of NFD ControlCommand
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
ControlParameters & setFlags(uint64_t flags)
StrategyChoiceUnsetCommand()
FieldValidator m_responseValidator
FieldValidator for response ControlParameters.
virtual void validateRequest(const ControlParameters ¶meters) const
validate request parameters
virtual void applyDefaultsToRequest(ControlParameters ¶meters) const
apply default values to missing fields in request
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
ControlCommand(const std::string &module, const std::string &verb)
StrategyChoiceSetCommand()
virtual ~ControlCommand()
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
void validateRequest(const ControlParameters ¶meters) const override
validate request parameters
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
uint64_t getCapacity() const
const Name & getName() const
uint64_t getCount() const
Name getRequestName(const Name &commandPrefix, const ControlParameters ¶meters) const
construct the Name for a request Interest
Copyright (c) 2011-2015 Regents of the University of California.
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
FieldValidator & required(ControlParameterField field)
declare a required field
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
Represents an absolute name.
const std::string CONTROL_PARAMETER_FIELD[CONTROL_PARAMETER_UBOUND]
void validateResponse(const ControlParameters ¶meters) const override
void validateRequest(const ControlParameters ¶meters) const override
validate request parameters
const std::vector< bool > & getPresentFields() const
uint64_t getFaceId() const
size_t size() const
Get number of components.
ControlParameters & setCost(uint64_t cost)
void validateRequest(const ControlParameters ¶meters) const override
validate request parameters
bool hasFacePersistency() const
void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
ControlParameters & setFacePersistency(FacePersistency persistency)
ControlParameters & setOrigin(RouteOrigin origin)
FibRemoveNextHopCommand()
represents an error in ControlParameters
const uint64_t INVALID_FACE_ID
FieldValidator & optional(ControlParameterField field)
declare an optional field