dtn::ForwardingInfo Class Reference

Class to encapsulate bundle forwarding information. More...

#include <ForwardingInfo.h>

List of all members.

Public Types

enum  action_t { INVALID_ACTION = 0, FORWARD_ACTION = 1 << 0, COPY_ACTION = 1 << 1 }
 

The forwarding action type codes.

More...
enum  state_t {
  NONE = 0, QUEUED = 1 << 0, TRANSMITTED = 1 << 1, TRANSMIT_FAILED = 1 << 2,
  CANCELLED = 1 << 3, CUSTODY_TIMEOUT = 1 << 4, DELIVERED = 1 << 5, SUPPRESSED = 1 << 6,
  RECEIVED = 1 << 10
}
 

The forwarding log state codes.

More...

Public Member Functions

 ForwardingInfo ()
 Default constructor.
 ForwardingInfo (const oasys::Builder &builder)
 ForwardingInfo (state_t state, action_t action, const std::string &link_name, u_int32_t regid, const EndpointID &remote_eid, const CustodyTimerSpec &custody_spec)
 Constructor used for new entries.
void set_state (state_t new_state)
 Set the state and update the timestamp.
virtual void serialize (oasys::SerializeAction *a)

const state_t state () const
 Accessors.
const action_t action () const
 Accessors.
const std::string & link_name () const
 Accessors.
const u_int32_t regid () const
 Accessors.
const EndpointIDremote_eid () const
 Accessors.
const oasys::Time & timestamp () const
 Accessors.
const CustodyTimerSpeccustody_spec () const
 Accessors.

Static Public Member Functions

static const char * action_to_str (action_t action)
static const char * state_to_str (state_t state)

Static Public Attributes

static const unsigned int ANY_ACTION = 0xffffffff
 Convenience flag to specify any forwarding action for use in searching the log.
static const unsigned int ANY_STATE = 0xffffffff
 Convenience flag to specify any forwarding state for use in searching the log.

Private Attributes

u_int32_t state_
 State of the transmission.
u_int32_t action_
 Forwarding action.
std::string link_name_
 The name of the link.
u_int32_t regid_
 The regid (DELIVERED only).
EndpointID remote_eid_
 The EID of the next hop node/reg.
oasys::Time timestamp_
 Timestamp of last state update.
CustodyTimerSpec custody_spec_
 Custody timer information.

Detailed Description

Class to encapsulate bundle forwarding information.

This is created when a bundle is forwarded to log a record of the forwarding event, along with any route-specific information about the action, such as the custody timer.

Routing algorithms consult this log to determine their course of action, for instance if they don't want to retransmit to the same next hop twice.

Definition at line 38 of file ForwardingInfo.h.


Member Enumeration Documentation

The forwarding action type codes.

Enumerator:
INVALID_ACTION 

Invalid action.

FORWARD_ACTION 

Forward the bundle to only this next hop.

COPY_ACTION 

Forward a copy of the bundle.

Definition at line 43 of file ForwardingInfo.h.

The forwarding log state codes.

Enumerator:
NONE 

Return value for no entry.

QUEUED 

Currently queued or being sent.

TRANSMITTED 

Successfully transmitted.

TRANSMIT_FAILED 

Transmission failed.

CANCELLED 

Transmission cancelled.

CUSTODY_TIMEOUT 

Custody transfer timeout.

DELIVERED 

Delivered to local registration.

SUPPRESSED 

Transmission suppressed.

RECEIVED 

Where the bundle came from.

Definition at line 69 of file ForwardingInfo.h.


Constructor & Destructor Documentation

dtn::ForwardingInfo::ForwardingInfo (  )  [inline]

Default constructor.

Definition at line 108 of file ForwardingInfo.h.

dtn::ForwardingInfo::ForwardingInfo ( const oasys::Builder &  builder  )  [inline]

Definition at line 119 of file ForwardingInfo.h.

dtn::ForwardingInfo::ForwardingInfo ( state_t  state,
action_t  action,
const std::string &  link_name,
u_int32_t  regid,
const EndpointID remote_eid,
const CustodyTimerSpec custody_spec 
) [inline]

Constructor used for new entries.

Definition at line 130 of file ForwardingInfo.h.

References set_state().


Member Function Documentation

const action_t dtn::ForwardingInfo::action (  )  const [inline]
static const char* dtn::ForwardingInfo::action_to_str ( action_t  action  )  [inline, static]
const CustodyTimerSpec& dtn::ForwardingInfo::custody_spec (  )  const [inline]

Accessors.

Definition at line 164 of file ForwardingInfo.h.

References custody_spec_.

Referenced by dtn::TableBasedRouter::check_next_hop(), and dtn::ForwardingLog::dump().

const std::string& dtn::ForwardingInfo::link_name (  )  const [inline]

Accessors.

Definition at line 160 of file ForwardingInfo.h.

References link_name_.

Referenced by dtn::ForwardingLog::dump().

const u_int32_t dtn::ForwardingInfo::regid (  )  const [inline]

Accessors.

Definition at line 161 of file ForwardingInfo.h.

References regid_.

const EndpointID& dtn::ForwardingInfo::remote_eid (  )  const [inline]

Accessors.

Definition at line 162 of file ForwardingInfo.h.

References remote_eid_.

Referenced by dtn::ForwardingLog::dump(), and dtn::DTLSRRouter::handle_lsa().

void dtn::ForwardingInfo::serialize ( oasys::SerializeAction *  a  )  [virtual]

Definition at line 31 of file ForwardingInfo.cc.

References action_, link_name_, regid_, remote_eid_, state_, and timestamp_.

void dtn::ForwardingInfo::set_state ( state_t  new_state  )  [inline]

Set the state and update the timestamp.

Definition at line 149 of file ForwardingInfo.h.

References state_, and timestamp_.

Referenced by ForwardingInfo().

const state_t dtn::ForwardingInfo::state (  )  const [inline]

Accessors.

Definition at line 158 of file ForwardingInfo.h.

References state_.

Referenced by dtn::ForwardingLog::dump(), and dtn::ForwardingLog::get_latest_entry().

static const char* dtn::ForwardingInfo::state_to_str ( state_t  state  )  [inline, static]
const oasys::Time& dtn::ForwardingInfo::timestamp (  )  const [inline]

Accessors.

Definition at line 163 of file ForwardingInfo.h.

References timestamp_.

Referenced by dtn::ForwardingLog::dump().


Member Data Documentation

u_int32_t dtn::ForwardingInfo::action_ [private]

Forwarding action.

Definition at line 169 of file ForwardingInfo.h.

Referenced by action(), and serialize().

const unsigned int dtn::ForwardingInfo::ANY_ACTION = 0xffffffff [static]

Convenience flag to specify any forwarding action for use in searching the log.

Definition at line 53 of file ForwardingInfo.h.

Referenced by dtn::TableBasedRouter::delete_bundle().

const unsigned int dtn::ForwardingInfo::ANY_STATE = 0xffffffff [static]

Convenience flag to specify any forwarding state for use in searching the log.

Definition at line 85 of file ForwardingInfo.h.

Custody timer information.

Definition at line 174 of file ForwardingInfo.h.

Referenced by custody_spec().

std::string dtn::ForwardingInfo::link_name_ [private]

The name of the link.

Definition at line 170 of file ForwardingInfo.h.

Referenced by link_name(), and serialize().

u_int32_t dtn::ForwardingInfo::regid_ [private]

The regid (DELIVERED only).

Definition at line 171 of file ForwardingInfo.h.

Referenced by regid(), and serialize().

The EID of the next hop node/reg.

Definition at line 172 of file ForwardingInfo.h.

Referenced by remote_eid(), and serialize().

u_int32_t dtn::ForwardingInfo::state_ [private]

State of the transmission.

Definition at line 168 of file ForwardingInfo.h.

Referenced by serialize(), set_state(), and state().

oasys::Time dtn::ForwardingInfo::timestamp_ [private]

Timestamp of last state update.

Definition at line 173 of file ForwardingInfo.h.

Referenced by serialize(), set_state(), and timestamp().


The documentation for this class was generated from the following files:
Generated on Sun Nov 21 13:21:13 2010 for DTN Reference Implementation by  doxygen 1.6.3