80 bool isPresent = presentFields[i];
87 else if (isPresent && !m_optional[i]) {
120 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
138 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
166 BOOST_THROW_EXCEPTION(
ArgumentError(
"LocalControlFeature is invalid"));
216 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
245 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
272 BOOST_THROW_EXCEPTION(
ArgumentError(
"Name must not be ndn:/"));
324 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
358 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
void validate(const ControlParameters ¶meters) const
verify that all required fields are present, and all present fields are either required or optional ...
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.
virtual void applyDefaultsToRequest(ControlParameters ¶meters) const
apply default values to missing fields in request
virtual void applyDefaultsToRequest(ControlParameters ¶meters) const
apply default values to missing fields in request
represents parameters in a ControlCommand request or response
virtual void validateRequest(const ControlParameters ¶meters) const
validate request parameters
virtual void validateResponse(const ControlParameters ¶meters) const
validate response parameters
size_t wireEncode(EncodingImpl< TAG > &encoder) const
virtual void validateResponse(const ControlParameters ¶meters) const
validate response parameters
FieldValidator m_requestValidator
FieldValidator for request ControlParameters.
base class of NFD ControlCommand
virtual void validateResponse(const ControlParameters ¶meters) const
validate response parameters
virtual void validateResponse(const ControlParameters ¶meters) const
validate response parameters
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
ControlCommand(const std::string &module, const std::string &verb)
StrategyChoiceSetCommand()
virtual void validateRequest(const ControlParameters ¶meters) const
validate request parameters
const Name & getName() const
FaceLocalControlCommand(const std::string &verb)
FaceDisableLocalControlCommand()
Name getRequestName(const Name &commandPrefix, const ControlParameters ¶meters) const
construct the Name for a request Interest
FaceEnableLocalControlCommand()
Copyright (c) 2011-2015 Regents of the University of California.
virtual void validateResponse(const ControlParameters ¶meters) const
validate response parameters
FieldValidator & required(ControlParameterField field)
declare a required field
Name abstraction to represent an absolute name.
const std::string CONTROL_PARAMETER_FIELD[CONTROL_PARAMETER_UBOUND]
const std::vector< bool > & getPresentFields() const
uint64_t getFaceId() const
virtual void validateResponse(const ControlParameters ¶meters) const
validate response parameters
size_t size() const
Get the number of components.
virtual void validateResponse(const ControlParameters ¶meters) const
validate response parameters
virtual void validateResponse(const ControlParameters ¶meters) const
validate response parameters
virtual void applyDefaultsToRequest(ControlParameters ¶meters) const
apply default values to missing fields in request
ControlParameters & setCost(uint64_t cost)
virtual void validateResponse(const ControlParameters ¶meters) const
validate response parameters
bool hasFacePersistency() const
Base class for faces/[*]-local-control commands.
Name & append(const uint8_t *value, size_t valueLength)
Append a new component, copying from value of length valueLength.
ControlParameters & setOrigin(uint64_t origin)
ControlParameters & setFacePersistency(FacePersistency persistency)
FibRemoveNextHopCommand()
represents an error in ControlParameters
LocalControlFeature getLocalControlFeature() const
virtual void applyDefaultsToRequest(ControlParameters ¶meters) const
apply default values to missing fields in request
virtual void applyDefaultsToRequest(ControlParameters ¶meters) const
apply default values to missing fields in request
virtual void validateRequest(const ControlParameters ¶meters) const
validate request parameters
FieldValidator & optional(ControlParameterField field)
declare an optional field