A ControlParametersLite 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-lite.hpp>
|
class | Tlv0_1_1WireFormatLite |
|
A ControlParametersLite 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.
ndn::ControlParametersLite::ControlParametersLite |
( |
struct ndn_NameComponent * nameComponents |
, |
|
|
size_t |
maxNameComponents, |
|
|
struct ndn_NameComponent * strategyNameComponents |
, |
|
|
size_t |
strategyMaxNameComponents |
|
) |
| |
Create a ControlParametersLite to use the pre-allocated nameComponents and strategyNameComponents, and with default field values.
- Parameters
-
nameComponents | The pre-allocated array of ndn_NameComponent for the main name. Instead of an array of NameLite::Component, this is an array of the underlying ndn_NameComponent struct so that it doesn't run the default constructor unnecessarily. |
maxNameComponents | The number of elements in the allocated nameComponents array. |
strategyNameComponents | The pre-allocated array of ndn_NameComponent for the strategy name. Instead of an array of NameLite::Component, this is an array of the underlying ndn_NameComponent struct so that it doesn't run the default constructor unnecessarily. |
strategyMaxNameComponents | The number of elements in the allocated strategyNameComponents array. |
bool ndn::ControlParametersLite::getHasName |
( |
| ) |
const |
|
inline |
Check if the name is specified.
- Returns
- True if the name is specified, false if not.
NameLite& ndn::ControlParametersLite::getName |
( |
| ) |
|
|
inline |
Get the name, if specified.
- Returns
- The Name. This is only meaningful if getHasName() is true.
Set this control parameters to have the values from the other control parameters.
- Parameters
-
- Returns
- 0 for success, or an error code if there is not enough room in this object's components array.
Set the cost value.
- Parameters
-
cost | The new cost value, or -1 for not specified. |
- Returns
- This ControlParametersLite so that you can chain calls to update values.
Set the expiration period.
- Parameters
-
expirationPeriod | The expiration period in milliseconds, or null for not specified. |
- Returns
- This ControlParametersLite so that you can chain calls to update values.
Set the Face ID.
- Parameters
-
faceId | The new face ID, or -1 for not specified. |
- Returns
- This ControlParametersLite so that you can chain calls to update values.
Set the ForwardingFlags object to a copy of forwardingFlags.
You can use getForwardingFlags() and change the existing ForwardingFlags object.
- Parameters
-
forwardingFlags | The new cost value, or null for not specified. |
- Returns
- This ControlParametersLite so that you can chain calls to update values.
void ndn::ControlParametersLite::setHasName |
( |
bool |
hasName | ) |
|
|
inline |
Set the flag for whether the name is specified.
Note that setName automatically calls setHasName(true).
- Parameters
-
hasName | True if the name is specified, false if not. |
Set the local control feature value.
- Parameters
-
localControlFeature | The new local control feature value, or -1 for not specified. |
- Returns
- This ControlParametersLite so that you can chain calls to update values.
ndn_Error ndn::ControlParametersLite::setName |
( |
const NameLite & |
name | ) |
|
|
inline |
Set the name to have the values from the given name.
This also calls setHasName(true).
- Parameters
-
name | The name to get values from. If the name is not specified, call setHasName(false). |
- Returns
- 0 for success, or an error code if there is not enough room in this object's name components array.
Set the origin value.
- Parameters
-
origin | The new origin value, or -1 for not specified. |
- Returns
- This ControlParametersLite so that you can chain calls to update values.
ndn_Error ndn::ControlParametersLite::setStrategy |
( |
const NameLite & |
strategy | ) |
|
|
inline |
Set the strategy to a copy of the given Name.
- Parameters
-
strategy | The Name to copy, or an empty Name if not specified. |
- Returns
- 0 for success, or an error code if there is not enough room in this object's name components array.
Set the URI.
- Parameters
-
uri | The new uri, or an empty string for not specified. |
- Returns
- This ControlParametersLite so that you can chain calls to update values.
The documentation for this class was generated from the following files: