82 bool isPresent = presentFields[i];
89 else if (isPresent && !m_optional[i]) {
127 BOOST_THROW_EXCEPTION(
ArgumentError(
"Flags must be accompanied by Mask"));
137 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
169 BOOST_THROW_EXCEPTION(
ArgumentError(
"Flags must be accompanied by Mask"));
179 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
197 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
225 BOOST_THROW_EXCEPTION(
ArgumentError(
"LocalControlFeature is invalid"));
275 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
304 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
331 BOOST_THROW_EXCEPTION(
ArgumentError(
"Name must not be ndn:/"));
383 BOOST_THROW_EXCEPTION(
ArgumentError(
"FaceId must not be zero"));
417 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 ...
virtual 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.
virtual void validateRequest(const ControlParameters ¶meters) const override
validate request parameters
virtual void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
virtual 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
virtual void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
FieldValidator m_requestValidator
FieldValidator for request ControlParameters.
virtual void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
base class of NFD ControlCommand
virtual 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 validateRequest(const ControlParameters ¶meters) const override
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 ~ControlCommand()
virtual void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
virtual void validateRequest(const ControlParameters ¶meters) const override
validate request parameters
virtual void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
virtual void validateResponse(const ControlParameters ¶meters) const override
validate response 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 override
validate response parameters
FieldValidator & required(ControlParameterField field)
declare a required field
virtual void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
virtual void validateResponse(const ControlParameters ¶meters) const override
validate response parameters
Name abstraction to represent an absolute name.
const std::string CONTROL_PARAMETER_FIELD[CONTROL_PARAMETER_UBOUND]
virtual void validateResponse(const ControlParameters ¶meters) const override
virtual 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 the number of components.
virtual void validateRequest(const ControlParameters ¶meters) const override
validate request parameters
ControlParameters & setCost(uint64_t cost)
bool hasFacePersistency() const
Base class for faces/[*]-local-control commands.
virtual void applyDefaultsToRequest(ControlParameters ¶meters) const override
apply default values to missing fields in request
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 validateResponse(const ControlParameters ¶meters) const override
validate response parameters
FieldValidator & optional(ControlParameterField field)
declare an optional field