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

NetworkNackLite represents a network Nack packet and includes a Nack reason. More...

#include <network-nack-lite.hpp>

Inheritance diagram for ndn::NetworkNackLite:
ndn_NetworkNack

Public Member Functions

 NetworkNackLite ()
 Create a NetworkNackLite where all the values are unspecified.
 
ndn_NetworkNackReason getReason () const
 Get the network Nack reason. More...
 
int getOtherReasonCode () const
 Get the reason code from the packet which is other than a recognized ndn_NetworkNackReason enum value. More...
 
void setReason (ndn_NetworkNackReason reason)
 Set the network Nack reason. More...
 
void setOtherReasonCode (int otherReasonCode)
 Set the packet's reason code to use when the reason enum is ndn_NetworkNackReason_OTHER_CODE. More...
 

Static Public Member Functions

static const NetworkNackLitegetFirstHeader (const LpPacketLite &lpPacket)
 Get the first header field in lpPacket which is a NetworkNackLite. More...
 
static NetworkNackLitedownCast (ndn_NetworkNack &networkNack)
 Downcast the reference to the ndn_NetworkNack struct to an NetworkNackLite. More...
 
static const NetworkNackLitedownCast (const ndn_NetworkNack &networkNack)
 

Detailed Description

NetworkNackLite represents a network Nack packet and includes a Nack reason.

Member Function Documentation

static NetworkNackLite& ndn::NetworkNackLite::downCast ( ndn_NetworkNack networkNack)
inlinestatic

Downcast the reference to the ndn_NetworkNack struct to an NetworkNackLite.

Parameters
networkNackA reference to the ndn_NetworkNack struct.
Returns
The same reference as NetworkNackLite.
const NetworkNackLite * ndn::NetworkNackLite::getFirstHeader ( const LpPacketLite lpPacket)
static

Get the first header field in lpPacket which is a NetworkNackLite.

Parameters
lpPacketThe ndn_LpPacket struct with the header fields to search.
Returns
A pointer to the first NetworkNackLite header field, or 0 if not found.
int ndn::NetworkNackLite::getOtherReasonCode ( ) const
inline

Get the reason code from the packet which is other than a recognized ndn_NetworkNackReason enum value.

This is only meaningful if getReason() is ndn_NetworkNackReason_OTHER_CODE.

Returns
The reason code.
ndn_NetworkNackReason ndn::NetworkNackLite::getReason ( ) const
inline

Get the network Nack reason.

Returns
The reason enum value. If this is ndn_NetworkNackReason_OTHER_CODE, then call getOtherReasonCode() to get the unrecognized reason code.
void ndn::NetworkNackLite::setOtherReasonCode ( int  otherReasonCode)
inline

Set the packet's reason code to use when the reason enum is ndn_NetworkNackReason_OTHER_CODE.

If the packet's reason code is a recognized enum value, just call setReason().

Parameters
otherReasonCodeThe packet's unrecognized reason code.
void ndn::NetworkNackLite::setReason ( ndn_NetworkNackReason  reason)
inline

Set the network Nack reason.

Parameters
reasonThe network Nack reason enum value. If the packet's reason code is not a recognized Reason enum value, use ndn_NetworkNackReason_OTHER_CODE and call setOtherReasonCode().

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