#include <dtn/Bundle.h>

Public Types | |
| enum | { kData = 1 << 0, kACK = 1 << 1, kNoACK = 1 << 2, kCustodial = 1 << 3, kBcast = 1 << 4 } |
| Enumeration defining types of bundles. More... | |
| typedef unsigned char | BundleType |
| Flags defining the type and handling for the bundle. | |
Public Member Functions | |
| Bundle (uint32_t seq, const ByteString &src, const struct timeval &creat, const struct timeval &expir, BundleType t=kData, const ByteString &app=ByteString()) | |
| Basic constructor, without destination or payload specified. | |
| Bundle (const Bundle &aOther) | |
| Copy constructor. | |
| Bundle (uint32_t seq, const ByteString &src, const ByteString &dest, const struct timeval &creat, const struct timeval &expir, BundleType t=kData, const ByteString &app=ByteString()) | |
| Constructor without payload. | |
| Bundle (uint32_t seq, const ByteString &src, const ByteString &dest, const ByteString &data, const struct timeval &creat, const struct timeval &expir, BundleType t=kData, const ByteString &app=ByteString()) | |
| Fully specified constructor. | |
| virtual | ~Bundle () |
| Destructor. | |
| virtual Bundle * | clone () const |
| |
| virtual unsigned int | size () const |
| |
| uint32_t | seqNum () const |
| |
| const ByteString & | source () const |
| |
| const ByteString & | destination () const |
| |
| const ByteString & | custodian () const |
| |
| const ByteString & | send () const |
| |
| const ByteString & | recv () const |
| |
| const ByteString & | payload () const |
| |
| struct timeval & | created () const |
| |
| struct timeval & | expiry () const |
| |
| BundleType | type () const |
| |
| const ByteString & | app () const |
| |
| uint32_t | hopCount () const |
| |
| ByteString & | destination () |
| |
| ByteString & | custodian () |
| |
| ByteString & | send () |
| |
| ByteString & | recv () |
| |
| ByteString & | payload () |
| |
| struct timeval & | created () |
| |
| struct timeval & | expiry () |
| |
| BundleType & | type () |
| |
| virtual bool | expired () const |
| |
| void | incrHop () |
| Increment the hop count. | |
This class holds the DTN routing and forwarding information, as well as the serialized data to be forwarded. A wrapper will need to translate this into socket and data information, a raw packet, a simulator event, etc.
Definition at line 59 of file Bundle.h.
| anonymous enum |
| Bundle::Bundle | ( | uint32_t | seq, | |
| const ByteString & | src, | |||
| const struct timeval & | creat, | |||
| const struct timeval & | expir, | |||
| BundleType | t = kData, |
|||
| const ByteString & | app = ByteString() | |||
| ) |
Basic constructor, without destination or payload specified.
| seq | The sequence number of the bundle at src | |
| src | ByteString representation of the bundle's source | |
| creat | Creation time | |
| expir | Expiration time | |
| t | The type of bundle | |
| app | The application identifier for this bundle |
Definition at line 36 of file Bundle.cc.
Referenced by MockBundle::MockBundle().
| Bundle::Bundle | ( | const Bundle & | aOther | ) |
| Bundle::Bundle | ( | uint32_t | seq, | |
| const ByteString & | src, | |||
| const ByteString & | dest, | |||
| const struct timeval & | creat, | |||
| const struct timeval & | expir, | |||
| BundleType | t = kData, |
|||
| const ByteString & | app = ByteString() | |||
| ) |
Constructor without payload.
| seq | The sequence number of the bundle at src | |
| src | ByteString representation of the bundle's source | |
| dest | ByteString representation of the bundle's destination | |
| creat | Creation time | |
| expir | Creation time | |
| t | The type of bundle | |
| app | The application identifier for this bundle |
| Bundle::Bundle | ( | uint32_t | seq, | |
| const ByteString & | src, | |||
| const ByteString & | dest, | |||
| const ByteString & | data, | |||
| const struct timeval & | creat, | |||
| const struct timeval & | expir, | |||
| BundleType | t = kData, |
|||
| const ByteString & | app = ByteString() | |||
| ) |
Fully specified constructor.
| seq | The sequence number of the bundle at src | |
| src | ByteString representation of the bundle's source | |
| dest | ByteString representation of the bundle's destination | |
| data | ByteString serialization of the bundle's payload | |
| creat | Creation time | |
| expir | Creation time | |
| t | The type of bundle | |
| app | The application identifier for this bundle |
1.5.4