22 #ifndef NDN_CONTROL_PARAMETERS_LITE_HPP
23 #define NDN_CONTROL_PARAMETERS_LITE_HPP
25 #include "common-lite.hpp"
26 #include "name-lite.hpp"
27 #include "forwarding-flags-lite.hpp"
28 #include "../c/control-parameters-types.h"
58 size_t strategyMaxNameComponents);
78 getFaceId()
const {
return faceId; }
87 getOrigin()
const {
return origin; }
90 getCost()
const {
return cost; }
95 const ForwardingFlagsLite&
113 setHasName(
bool hasName) { this->hasName = hasName ? 1 : 0; }
266 friend class Tlv0_1_1WireFormatLite;
NameLite & getName()
Get the name, if specified.
Definition: control-parameters-lite.hpp:72
double Milliseconds
A time interval represented as the number of milliseconds.
Definition: common.hpp:111
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
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.
Definition: control-parameters-lite.cpp:28
ControlParametersLite & setUri(const BlobLite &uri)
Set the URI.
Definition: control-parameters-lite.hpp:150
int cost
-1 for none.
Definition: control-parameters-types.h:50
bool getHasName() const
Check if the name is specified.
Definition: control-parameters-lite.hpp:65
ControlParametersLite & setLocalControlFeature(int localControlFeature)
Set the local control feature value.
Definition: control-parameters-lite.hpp:164
ControlParametersLite & setOrigin(int origin)
Set the origin value.
Definition: control-parameters-lite.hpp:177
static ForwardingFlagsLite & downCast(ndn_ForwardingFlags &forwardingFlags)
Downcast the reference to the ndn_ForwardingFlags struct to a ForwardingFlagsLite.
Definition: forwarding-flags-lite.hpp:90
struct ndn_Name strategy
nComponents == 0 for none.
Definition: control-parameters-types.h:52
A NameLite holds an array of NameLite::Component.
Definition: name-lite.hpp:34
ndn_Error setStrategy(const NameLite &strategy)
Set the strategy to a copy of the given Name.
Definition: control-parameters-lite.hpp:217
void setHasName(bool hasName)
Set the flag for whether the name is specified.
Definition: control-parameters-lite.hpp:113
int localControlFeature
-1 for none.
Definition: control-parameters-types.h:48
struct ndn_Blob uri
A Blob whose value is a pointer to pre-allocated buffer.
Definition: control-parameters-types.h:46
static BlobLite & downCast(ndn_Blob &blob)
Downcast the reference to the ndn_Blob struct to a BlobLite.
Definition: blob-lite.hpp:76
ndn_Error set(const NameLite &other)
Set this name to have the values from the other name.
Definition: name-lite.cpp:216
Copyright (C) 2015-2016 Regents of the University of California.
Definition: name-types.h:33
static ControlParametersLite & downCast(ndn_ControlParameters &controlParameters)
Downcast the reference to the ndn_ControlParameters struct to a ControlParametersLite.
Definition: control-parameters-lite.hpp:253
ControlParametersLite & setExpirationPeriod(Milliseconds expirationPeriod)
Set the expiration period.
Definition: control-parameters-lite.hpp:230
A BlobLite holds a pointer to an immutable pre-allocated buffer and its length This is like a JavaScr...
Definition: blob-lite.hpp:37
int faceId
-1 for none.
Definition: control-parameters-types.h:45
A ControlParametersLite holds a Name and other fields for a ControlParameters which is used...
Definition: control-parameters-lite.hpp:37
ControlParametersLite & setForwardingFlags(const ForwardingFlagsLite &flags)
Set the ForwardingFlags object to a copy of forwardingFlags.
Definition: control-parameters-lite.hpp:204
ControlParametersLite & setFaceId(int faceId)
Set the Face ID.
Definition: control-parameters-lite.hpp:137
int origin
-1 for none.
Definition: control-parameters-types.h:49
ControlParametersLite & setCost(int cost)
Set the cost value.
Definition: control-parameters-lite.hpp:190
static NameLite & downCast(ndn_Name &name)
Downcast the reference to the ndn_Name struct to a NameLite.
Definition: name-lite.hpp:429
ndn_Error set(const ControlParametersLite &other)
Set this control parameters to have the values from the other control parameters. ...
Definition: control-parameters-lite.cpp:38
An ndn_ControlParameters holds fields for a ControlParameters which is used in the command interest s...
Definition: control-parameters-types.h:42
struct ndn_Name name
Only used if hasName.
Definition: control-parameters-types.h:44
ndn_Error setName(const NameLite &name)
Set the name to have the values from the given name.
Definition: control-parameters-lite.hpp:124
A ForwardingFlagsLite holds the flags which specify how the forwarding daemon should forward an inter...
Definition: forwarding-flags-lite.hpp:35
ndn_Milliseconds expirationPeriod
-1 for none.
Definition: control-parameters-types.h:53