IBR-DTNSuite  0.8
dtn::streams::StreamDataSegment Class Reference

#include <StreamDataSegment.h>

List of all members.

Public Types

enum  SegmentType {
  MSG_DATA_SEGMENT = 0x1, MSG_ACK_SEGMENT = 0x2, MSG_REFUSE_BUNDLE = 0x3, MSG_KEEPALIVE = 0x4,
  MSG_SHUTDOWN = 0x5
}
enum  SegmentMark { MSG_MARK_BEGINN = 0x02, MSG_MARK_END = 0x01 }
enum  ShutdownReason { MSG_SHUTDOWN_NONE = 0xff, MSG_SHUTDOWN_IDLE_TIMEOUT = 0x00, MSG_SHUTDOWN_VERSION_MISSMATCH = 0x01, MSG_SHUTDOWN_BUSY = 0x02 }

Public Member Functions

 StreamDataSegment (SegmentType type, size_t size)
 StreamDataSegment (SegmentType type=MSG_KEEPALIVE)
 StreamDataSegment (ShutdownReason reason, size_t reconnect=0)
virtual ~StreamDataSegment ()

Public Attributes

size_t _value
SegmentType _type
ShutdownReason _reason
u_int8_t _flags

Friends

std::ostream & operator<< (std::ostream &stream, const StreamDataSegment &seg)
std::istream & operator>> (std::istream &stream, StreamDataSegment &seg)

Detailed Description

Definition at line 19 of file StreamDataSegment.h.


Member Enumeration Documentation

Enumerator:
MSG_MARK_BEGINN 
MSG_MARK_END 

Definition at line 31 of file StreamDataSegment.h.

Enumerator:
MSG_DATA_SEGMENT 
MSG_ACK_SEGMENT 
MSG_REFUSE_BUNDLE 
MSG_KEEPALIVE 
MSG_SHUTDOWN 

Definition at line 22 of file StreamDataSegment.h.

Enumerator:
MSG_SHUTDOWN_NONE 
MSG_SHUTDOWN_IDLE_TIMEOUT 
MSG_SHUTDOWN_VERSION_MISSMATCH 
MSG_SHUTDOWN_BUSY 

Definition at line 37 of file StreamDataSegment.h.


Constructor & Destructor Documentation

Definition at line 17 of file StreamDataSegment.cpp.

Definition at line 27 of file StreamDataSegment.cpp.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const StreamDataSegment seg 
) [friend]

Definition at line 36 of file StreamDataSegment.cpp.

std::istream& operator>> ( std::istream &  stream,
StreamDataSegment seg 
) [friend]

Definition at line 72 of file StreamDataSegment.cpp.


Member Data Documentation


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