#include <Protocol.h>
Inheritance diagram for ACE_RMCast::NRTM:
Public Member Functions | |
map_ (10) | |
map_ (10) | |
NRTM_ptr | clone () |
void | insert (Address const &addr, u64 sn) |
u64 | find (Address const &addr) const |
bool | empty () const |
virtual void | serialize_body (ostream &os) const |
virtual void | serialize_body (sstream &ss) const |
Static Public Member Functions | |
static u32 | max_count (u32 max_size) |
Public Attributes | |
__pad0__: Profile (h) | |
__pad1__: Profile (id) | |
Static Public Attributes | |
static u16 const | id = 0x0006 |
Protected Member Functions | |
virtual Profile_ptr | clone_ () |
i | done () |
i | advance ()) |
Protected Attributes | |
__pad2__: Profile (nrtm) { for (Map::const_iterator i (nrtm.map_) | |
Private Types | |
typedef ACE_Hash_Map_Manager_Ex< Address, u64, AddressHasher, ACE_Equal_To< Address >, ACE_Null_Mutex > | Map |
Private Attributes | |
Map | map_ |
Definition at line 953 of file Protocol.h.
typedef ACE_Hash_Map_Manager_Ex<Address, u64, AddressHasher, ACE_Equal_To<Address>, ACE_Null_Mutex> ACE_RMCast::NRTM::Map [private] |
Definition at line 1113 of file Protocol.h.
i ACE_RMCast::NRTM::advance | ( | ) | [inline, protected] |
Definition at line 1009 of file Protocol.h.
References ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::bind(), and map_.
NRTM_ptr ACE_RMCast::NRTM::clone | ( | void | ) | [inline] |
Reimplemented from ACE_RMCast::Profile.
Definition at line 993 of file Protocol.h.
References clone_().
virtual Profile_ptr ACE_RMCast::NRTM::clone_ | ( | ) | [inline, protected, virtual] |
Implements ACE_RMCast::Profile.
Definition at line 1000 of file Protocol.h.
Referenced by clone().
01001 { 01002 Profile_ptr p (new NRTM (*this)); 01003 return p; 01004 }
i ACE_RMCast::NRTM::done | ( | ) | [protected] |
bool ACE_RMCast::NRTM::empty | ( | void | ) | const [inline] |
Definition at line 1035 of file Protocol.h.
References ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::current_size(), and map_.
01036 { 01037 return map_.current_size () == 0; 01038 }
Definition at line 1025 of file Protocol.h.
References ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::find(), and map_.
01026 { 01027 u64 sn; 01028 01029 if (map_.find (addr, sn) == -1) return 0; 01030 01031 return sn; 01032 }
Definition at line 1017 of file Protocol.h.
References ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::bind(), ACE_RMCast::Profile::calculate_size(), map_, and ACE_RMCast::Profile::size().
01018 { 01019 map_.bind (addr, sn); 01020 01021 size (calculate_size ()); 01022 }
ACE_RMCast::NRTM::map_ | ( | 10 | ) | [inline] |
Definition at line 987 of file Protocol.h.
References ACE_RMCast::Profile::calculate_size(), and ACE_RMCast::Profile::size().
00987 : Profile (id), map_ (10) 00988 { 00989 size (calculate_size ()); 00990 }
ACE_RMCast::NRTM::map_ | ( | 10 | ) | [inline] |
Definition at line 959 of file Protocol.h.
References ACE_Hash_Map_Manager_Ex< EXT_ID, INT_ID, HASH_KEY, COMPARE_KEYS, ACE_LOCK >::bind(), map_, and ACE_SizeCDR::total_length().
00959 : Profile (h), map_ (10) 00960 { 00961 u32 addr (0); 00962 u16 port (0); 00963 u64 sn (0); 00964 00965 sstream ss; 00966 00967 ss << sn; 00968 ss << addr; 00969 ss << port; 00970 00971 size_t block_size (ss.total_length ()); 00972 00973 00974 // num_of_blocks = size / block_size 00975 // 00976 for (size_t i (0); i < (h.size () / block_size); ++i) 00977 { 00978 is >> sn; 00979 is >> addr; 00980 is >> port; 00981 00982 map_.bind (Address (port, addr), sn); 00983 } 00984 }
Definition at line 1045 of file Protocol.h.
References ACE_SizeCDR::total_length().
Referenced by ACE_RMCast::Acknowledge::send(), and ACE_RMCast::Acknowledge::track().
01046 { 01047 u32 n (0); 01048 01049 sstream ss; 01050 01051 Profile::Header hdr (0, 0); 01052 ss << hdr; 01053 01054 while (true) 01055 { 01056 u32 addr (0); 01057 u16 port (0); 01058 u64 sn (0); 01059 01060 ss << sn; 01061 ss << addr; 01062 ss << port; 01063 01064 if (ss.total_length () <= max_size) 01065 ++n; 01066 01067 if (ss.total_length () >= max_size) 01068 break; 01069 } 01070 01071 return n; 01072 }
virtual void ACE_RMCast::NRTM::serialize_body | ( | sstream & | ss | ) | const [inline, virtual] |
Implements ACE_RMCast::Profile.
Definition at line 1092 of file Protocol.h.
References map_.
01093 { 01094 for (Map::const_iterator i (map_), e (map_, 1); i != e; ++i) 01095 { 01096 u32 addr (0); 01097 u16 port (0); 01098 u64 sn (0); 01099 01100 ss << sn; 01101 ss << addr; 01102 ss << port; 01103 } 01104 }
virtual void ACE_RMCast::NRTM::serialize_body | ( | ostream & | os | ) | const [inline, virtual] |
Implements ACE_RMCast::Profile.
Definition at line 1076 of file Protocol.h.
References map_.
01077 { 01078 for (Map::const_iterator i (map_), e (map_, 1); i != e; ++i) 01079 { 01080 u32 addr ((*i).ext_id_.get_ip_address ()); 01081 u16 port ((*i).ext_id_.get_port_number ()); 01082 u64 sn ((*i).int_id_); 01083 01084 os << sn; 01085 os << addr; 01086 os << port; 01087 01088 } 01089 }
Definition at line 959 of file Protocol.h.
Definition at line 987 of file Protocol.h.
ACE_RMCast::NRTM::__pad2__ [protected] |
Definition at line 1009 of file Protocol.h.
u16 const ACE_RMCast::NRTM::id = 0x0006 [static] |
Definition at line 955 of file Protocol.h.
Map ACE_RMCast::NRTM::map_ [private] |
Definition at line 1115 of file Protocol.h.
Referenced by advance(), empty(), find(), insert(), map_(), and serialize_body().