Public Member Functions | List of all members
ndn::ControlParameters Class Reference

A ControlParameters holds a Name and other fields for a ControlParameters which is used, for example, in the command interest to register a prefix with a forwarder. More...

#include <control-parameters.hpp>

Public Member Functions

Blob wireEncode (WireFormat &wireFormat=*WireFormat::getDefaultWireFormat()) const
 
void wireDecode (const uint8_t *input, size_t inputLength, WireFormat &wireFormat=*WireFormat::getDefaultWireFormat())
 
void wireDecode (const std::vector< uint8_t > &input, WireFormat &wireFormat=*WireFormat::getDefaultWireFormat())
 
void wireDecode (const Blob &input, WireFormat &wireFormat=*WireFormat::getDefaultWireFormat())
 
void get (ControlParametersLite &controlParametersLite) const
 Set controlParametersLite to point to the components in this ControlParameters, without copying any memory. More...
 
void set (const ControlParametersLite &controlParametersLite)
 Clear this ControlParameters, and set the values by copying from controlParametersLite. More...
 
bool getHasName () const
 Check if the name is specified. More...
 
const NamegetName () const
 Get the name, if specified. More...
 
int getFaceId () const
 
const std::string & getUri () const
 
int getLocalControlFeature () const
 
int getOrigin () const
 
int getCost () const
 
ForwardingFlagsgetForwardingFlags ()
 
const ForwardingFlagsgetForwardingFlags () const
 
NamegetStrategy ()
 
const NamegetStrategy () const
 
Milliseconds getExpirationPeriod () const
 
void setHasName (bool hasName)
 Set the flag for whether the name is specified. More...
 
ControlParameterssetName (const Name &name)
 Set the name. More...
 
ControlParameterssetFaceId (int faceId)
 Set the Face ID. More...
 
ControlParameterssetUri (const std::string &uri)
 Set the URI. More...
 
ControlParameterssetLocalControlFeature (int localControlFeature)
 Set the local control feature value. More...
 
ControlParameterssetOrigin (int origin)
 Set the origin value. More...
 
ControlParameterssetCost (int cost)
 Set the cost value. More...
 
ControlParameterssetForwardingFlags (const ForwardingFlags &flags)
 Set the ForwardingFlags object to a copy of forwardingFlags. More...
 
ControlParameterssetStrategy (const Name &strategy)
 Set the strategy to a copy of the given Name. More...
 
ControlParameterssetExpirationPeriod (Milliseconds expirationPeriod)
 Set the expiration period. More...
 

Detailed Description

A ControlParameters holds a Name and other fields for a ControlParameters which is used, for example, in the command interest to register a prefix with a forwarder.

Member Function Documentation

void ndn::ControlParameters::get ( ControlParametersLite controlParametersLite) const

Set controlParametersLite to point to the components in this ControlParameters, without copying any memory.

WARNING: The resulting pointers in controlParametersLite are invalid after a further use of this object which could reallocate memory.

Parameters
controlParametersLiteThe ControlParametersLite object which receives the values. where the name components arrays are already allocated.
bool ndn::ControlParameters::getHasName ( ) const
inline

Check if the name is specified.

Returns
True if the name is specified, false if not.
const Name& ndn::ControlParameters::getName ( ) const
inline

Get the name, if specified.

Returns
The Name. This is only meaningful if getHasName() is true.
void ndn::ControlParameters::set ( const ControlParametersLite controlParametersLite)

Clear this ControlParameters, and set the values by copying from controlParametersLite.

Parameters
controlParametersLiteA ControlParametersLite object.
ControlParameters& ndn::ControlParameters::setCost ( int  cost)
inline

Set the cost value.

Parameters
costThe new cost value, or -1 for not specified.
Returns
This ControlParameters so that you can chain calls to update values.
ControlParameters& ndn::ControlParameters::setExpirationPeriod ( Milliseconds  expirationPeriod)
inline

Set the expiration period.

Parameters
expirationPeriodThe expiration period in milliseconds, or null for not specified.
Returns
This ControlParameters so that you can chain calls to update values.
ControlParameters& ndn::ControlParameters::setFaceId ( int  faceId)
inline

Set the Face ID.

Parameters
faceIdThe new face ID, or -1 for not specified.
Returns
This ControlParameters so that you can chain calls to update values.
ControlParameters& ndn::ControlParameters::setForwardingFlags ( const ForwardingFlags flags)
inline

Set the ForwardingFlags object to a copy of forwardingFlags.

You can use getForwardingFlags() and change the existing ForwardingFlags object.

Parameters
forwardingFlagsThe new cost value, or null for not specified.
Returns
This ControlParameters so that you can chain calls to update values.
void ndn::ControlParameters::setHasName ( bool  hasName)
inline

Set the flag for whether the name is specified.

Note that setName automatically calls setHasName(true).

Parameters
hasNameTrue if the name is specified, false if not.
ControlParameters& ndn::ControlParameters::setLocalControlFeature ( int  localControlFeature)
inline

Set the local control feature value.

Parameters
localControlFeatureThe new local control feature value, or -1 for not specified.
Returns
This ControlParameters so that you can chain calls to update values.
ControlParameters& ndn::ControlParameters::setName ( const Name name)
inline

Set the name.

This also calls setHasName(true).

Parameters
nameThe name. This makes a copy of the name. If the name is not specified, call setHasName(false).
Returns
This ControlParameters so that you can chain calls to update values.
ControlParameters& ndn::ControlParameters::setOrigin ( int  origin)
inline

Set the origin value.

Parameters
originThe new origin value, or -1 for not specified.
Returns
This ControlParameters so that you can chain calls to update values.
ControlParameters& ndn::ControlParameters::setStrategy ( const Name strategy)
inline

Set the strategy to a copy of the given Name.

Parameters
strategyThe Name to copy, or an empty Name if not specified.
Returns
This ControlParameters so that you can chain calls to update values.
ControlParameters& ndn::ControlParameters::setUri ( const std::string &  uri)
inline

Set the URI.

Parameters
uriThe new uri, or an empty string for not specified.
Returns
This ControlParameters so that you can chain calls to update values.

The documentation for this class was generated from the following files: