#include <OSGDgram.h>
compare | |
| bool | operator< (const Dgram &other) const |
| static bool | less (UInt16, UInt16) |
Public Member Functions | |
constructor | |
| Dgram (void) | |
| ~Dgram (void) | |
get | |
| UInt32 | getCapacity (void) const |
| UInt16 | getId (void) const |
| bool | getResponseAck (void) const |
| UInt32 | getSize (void) const |
| UChar8 * | getData (void) |
| const UChar8 * | getData (void) const |
| UChar8 * | getBuffer (void) |
| UInt32 | getBufferSize (void) const |
| UInt32 | getBufferCapacity (void) const |
| bool | getEarlySend (void) const |
set | |
| void | setSize (UInt32 size) |
| void | setResponseSize (void) |
| void | setId (UInt16 id) |
| void | setResponseAck (bool value) |
| void | setBufferSize (UInt32 size) |
| void | setEarlySend (bool value) |
Static Public Member Functions | |
create, release | |
| static Dgram * | create (void) |
| static void | release (Dgram *dgram) |
Protected Attributes | |
member | |
| bool | _earlySend |
| UInt32 | _size |
| struct { | |
| UInt16 _id | |
| UChar8 _data [OSG_DGRAM_LEN-2] | |
| } | _buffer |
Definition at line 63 of file OSGDgram.h.
| Dgram::Dgram | ( | void | ) |
Definition at line 63 of file OSGDgram.cpp.
00063 : 00064 _size ( 0), 00065 _earlySend(false) 00066 { 00067 }
| Dgram::~Dgram | ( | void | ) |
| static Dgram* OSG::Dgram::create | ( | void | ) | [static] |
| static void OSG::Dgram::release | ( | Dgram * | dgram | ) | [static] |
| UInt32 OSG::Dgram::getCapacity | ( | void | ) | const [inline] |
Definition at line 48 of file OSGDgram.inl.
References _buffer.
Referenced by OSG::GroupMCastConnection::write().
| UInt16 OSG::Dgram::getId | ( | void | ) | const [inline] |
Definition at line 54 of file OSGDgram.inl.
References _buffer.
Referenced by OSG::PointMCastConnection::combineAck(), operator<(), OSG::PointMCastConnection::recvNextDgram(), OSG::PointMCastConnection::recvQueue(), and OSG::GroupMCastConnection::sendQueue().
00055 { 00056 return osgNetToHost<UInt16>(_buffer._id); 00057 }
| bool OSG::Dgram::getResponseAck | ( | void | ) | const [inline] |
Definition at line 96 of file OSGDgram.inl.
References _buffer.
Referenced by OSG::PointMCastConnection::recvQueue(), and OSG::GroupMCastConnection::sendQueue().
00097 { 00098 return (_buffer._data[0] != 0); 00099 }
| UInt32 OSG::Dgram::getSize | ( | void | ) | const [inline] |
Definition at line 60 of file OSGDgram.inl.
References _size.
Referenced by OSG::PointMCastConnection::read(), OSG::PointMCastConnection::readBuffer(), OSG::PointMCastConnection::recvQueue(), and OSG::GroupMCastConnection::write().
00061 { 00062 return _size; 00063 }
| UChar8 * OSG::Dgram::getData | ( | void | ) | [inline] |
Definition at line 66 of file OSGDgram.inl.
References _buffer.
Referenced by OSG::PointMCastConnection::read(), OSG::PointMCastConnection::readBuffer(), and OSG::GroupMCastConnection::write().
00067 { 00068 return _buffer._data; 00069 }
| const UChar8 * OSG::Dgram::getData | ( | void | ) | const [inline] |
Definition at line 72 of file OSGDgram.inl.
References _buffer.
00073 { 00074 return _buffer._data; 00075 }
| UChar8 * OSG::Dgram::getBuffer | ( | void | ) | [inline] |
Definition at line 78 of file OSGDgram.inl.
References _buffer.
Referenced by OSG::PointMCastConnection::combineAck(), OSG::PointMCastConnection::recvNextDgram(), OSG::PointMCastConnection::recvQueue(), OSG::GroupMCastConnection::sendQueue(), and OSG::GroupMCastConnection::write().
00079 { 00080 return (UChar8 *)&_buffer; 00081 }
| UInt32 OSG::Dgram::getBufferSize | ( | void | ) | const [inline] |
Definition at line 84 of file OSGDgram.inl.
References _buffer, and _size.
Referenced by OSG::PointMCastConnection::combineAck(), OSG::PointMCastConnection::recvNextDgram(), OSG::PointMCastConnection::recvQueue(), OSG::GroupMCastConnection::sendQueue(), and OSG::GroupMCastConnection::write().
| UInt32 OSG::Dgram::getBufferCapacity | ( | void | ) | const [inline] |
Definition at line 90 of file OSGDgram.inl.
References _buffer.
Referenced by OSG::PointMCastConnection::recvNextDgram(), and OSG::GroupMCastConnection::sendQueue().
00091 { 00092 return sizeof(_buffer); 00093 }
| bool OSG::Dgram::getEarlySend | ( | void | ) | const [inline] |
Definition at line 102 of file OSGDgram.inl.
References _earlySend.
00103 { 00104 return _earlySend; 00105 }
| void OSG::Dgram::setSize | ( | UInt32 | size | ) | [inline] |
Definition at line 111 of file OSGDgram.inl.
References _size.
Referenced by OSG::PointMCastConnection::recvQueue(), OSG::GroupMCastConnection::sendQueue(), OSG::GroupMCastConnection::write(), and OSG::GroupMCastConnection::~GroupMCastConnection().
| void OSG::Dgram::setResponseSize | ( | void | ) | [inline] |
Definition at line 117 of file OSGDgram.inl.
References _size.
Referenced by OSG::PointMCastConnection::combineAck(), OSG::PointMCastConnection::recvNextDgram(), OSG::PointMCastConnection::recvQueue(), and OSG::GroupMCastConnection::sendQueue().
00118 { 00119 _size = sizeof(UChar8); 00120 }
| void OSG::Dgram::setId | ( | UInt16 | id | ) | [inline] |
Definition at line 123 of file OSGDgram.inl.
References _buffer.
Referenced by OSG::PointMCastConnection::combineAck(), OSG::PointMCastConnection::recvNextDgram(), OSG::PointMCastConnection::recvQueue(), OSG::GroupMCastConnection::sendQueue(), and OSG::GroupMCastConnection::write().
00124 { 00125 _buffer._id = osgHostToNet<UInt16>(id); 00126 }
| void OSG::Dgram::setResponseAck | ( | bool | value | ) | [inline] |
Definition at line 135 of file OSGDgram.inl.
References _buffer.
Referenced by OSG::PointMCastConnection::combineAck(), OSG::PointMCastConnection::recvNextDgram(), and OSG::PointMCastConnection::recvQueue().
| void OSG::Dgram::setBufferSize | ( | UInt32 | size | ) | [inline] |
Definition at line 129 of file OSGDgram.inl.
References _buffer, and _size.
Referenced by OSG::PointMCastConnection::recvNextDgram().
| void OSG::Dgram::setEarlySend | ( | bool | value | ) | [inline] |
Definition at line 141 of file OSGDgram.inl.
References _earlySend.
Referenced by OSG::GroupMCastConnection::write().
00142 { 00143 _earlySend = value; 00144 }
| bool OSG::Dgram::operator< | ( | const Dgram & | other | ) | const [inline] |
Definition at line 165 of file OSGDgram.inl.
References getId(), and less().
00166 { 00167 return less(this->getId(),other.getId()); 00168 }
| bool OSG::Dgram::less | ( | UInt16 | a, | |
| UInt16 | b | |||
| ) | [inline, static] |
Compare IDs. Use Window.
Definition at line 151 of file OSGDgram.inl.
Referenced by OSG::PointMCastConnection::combineAck(), operator<(), OSG::PointMCastConnection::recvQueue(), and OSG::GroupMCastConnection::sendQueue().
00152 { 00153 a = a - b; 00154 00155 if(a & 0x8000) 00156 return true; 00157 else 00158 return false; 00159 }
bool OSG::Dgram::_earlySend [protected] |
UInt32 OSG::Dgram::_size [protected] |
Definition at line 134 of file OSGDgram.h.
Referenced by getBufferSize(), getSize(), setBufferSize(), setResponseSize(), and setSize().
| UInt16 OSG::Dgram::_id |
Definition at line 138 of file OSGDgram.h.
| UChar8 OSG::Dgram::_data[OSG_DGRAM_LEN-2] |
Definition at line 139 of file OSGDgram.h.
struct { ... } OSG::Dgram::_buffer [protected] |
Referenced by getBuffer(), getBufferCapacity(), getBufferSize(), getCapacity(), getData(), getId(), getResponseAck(), setBufferSize(), setId(), and setResponseAck().