Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

DCDT_InnerLinkManager Class Reference

Member that manage the InnerLink. More...

#include <DCDT_InnerLinkManager.h>

Inheritance diagram for DCDT_InnerLinkManager:

DCDT_Member List of all members.

Public Member Functions

 DCDT_InnerLinkManager (DCDT_Agora *agora)
 ~DCDT_InnerLinkManager ()
void Init ()
 Preparing the listening inner channel.
void DoYourJob (int par=0)
 Listen to internal msgs and reacts opening inner links.
void CreateLink (int status)
 Add a new LinkRx to our Agora.
InnerCommDataCreateName (int count)
 Create the socket name for the InnerLink.
void SetCDs (int status)
 Set the socket's names ( must be different because stand on the same machine ).
int LookForExistingAgora (int &agoraID)
 Tries to find others Agorae on the local system.
.

Private Attributes

DCDT_InnerChannelInnerChannel
InnerCommDataInnerCD
InnerCommDataInnerStartCD
InnerCommDatalocalCD
InnerCommDataremoteCD
InnerCommDataname_cd
CommDatahs_cd
int innerlink_counter
char * name
HSMsgHeaderhs_header

Detailed Description

Member that manage the InnerLink.

Definition at line 38 of file DCDT_InnerLinkManager.h.


Constructor & Destructor Documentation

DCDT_InnerLinkManager::DCDT_InnerLinkManager DCDT_Agora agora  ) 
 

Definition at line 34 of file DCDT_InnerLinkManager.cpp.

References hs_cd, hs_header, INNER_NAME, INNER_STARTNAME, InnerCD, InnerChannel, innerlink_counter, InnerStartCD, localCD, name, name_cd, and remoteCD.

DCDT_InnerLinkManager::~DCDT_InnerLinkManager  ) 
 

Definition at line 48 of file DCDT_InnerLinkManager.cpp.


Member Function Documentation

void DCDT_InnerLinkManager::CreateLink int  status  ) 
 

Add a new LinkRx to our Agora.

Link ID = 1000 + innerlink_counter

Definition at line 182 of file DCDT_InnerLinkManager.cpp.

References DCDT_Agora::ActivateMember(), DCDT_Agora::AddSysMember(), DCDT_TRC_COMM, innerlink_counter, localCD, MPM_SYSTEM, DCDT_LinkRx::Prepare(), ProfileType, remoteCD, SetCDs(), and TRC_PRINT.

Referenced by DoYourJob(), and LookForExistingAgora().

InnerCommData * DCDT_InnerLinkManager::CreateName int  count  ) 
 

Create the socket name for the InnerLink.

The name is of this form: INNER_NAME+innerlink_counter.

Returns:
Pointer to the new communication data structure

Definition at line 202 of file DCDT_InnerLinkManager.cpp.

References INNER_NAME, localCD, and remoteCD.

Referenced by DoYourJob().

void DCDT_InnerLinkManager::DoYourJob int  par = 0  )  [virtual]
 

Listen to internal msgs and reacts opening inner links.

The InnerChannel waits until a new message was received then opens a new link.

Implements DCDT_Member.

Definition at line 141 of file DCDT_InnerLinkManager.cpp.

References CreateLink(), CreateName(), DCDT_TRC_COMM, HS_ANSWER, hs_cd, hs_header, HS_NOTIFY, InnerChannel, innerlink_counter, L_WAITING, name_cd, DCDT_InnerChannel::ReceiveHS(), DCDT_Agora::RemoveMember(), DCDT_InnerChannel::SendAnswer(), TRC_PRINT, and _HSMsgHeader::type.

void DCDT_InnerLinkManager::Init  )  [virtual]
 

Preparing the listening inner channel.

Reimplemented from DCDT_Member.

Definition at line 122 of file DCDT_InnerLinkManager.cpp.

References DCDT_InnerChannel::Close(), InnerCD, InnerChannel, DCDT_InnerChannel::Open(), DCDT_InnerChannel::Prepare(), DCDT_InnerChannel::ReceiveTimerOff(), and DCDT_Agora::RemoveMember().

int DCDT_InnerLinkManager::LookForExistingAgora int &  agoraID  ) 
 

Tries to find others Agorae on the local system.
.

Returns:
0 - This is the first Agorà, starting an inner listening channel
1 - This isn't the first Agorà, star an inner link to the first Agorà

Definition at line 74 of file DCDT_InnerLinkManager.cpp.

References _HSMsgHeader::AgoraID, DCDT_InnerChannel::Close(), CreateLink(), Delay(), hs_cd, hs_header, ILM_RECV_TIMER, INNER_NAME, InnerChannel, InnerStartCD, L_CONNECTING, localCD, InnerCommData::name, DCDT_InnerChannel::Open(), DCDT_InnerChannel::ReceiveHS(), DCDT_InnerChannel::ReceiveTimerOn(), remoteCD, DCDT_InnerChannel::SendNotify(), DCDT_InnerChannel::SetReceiveTimer(), and DCDT_InnerChannel::StartingPrepare().

Referenced by DCDT_Agora::DCDT_Agora().

void DCDT_InnerLinkManager::SetCDs int  status  ) 
 

Set the socket's names ( must be different because stand on the same machine ).

Definition at line 252 of file DCDT_InnerLinkManager.cpp.

References localCD, InnerCommData::name, and remoteCD.

Referenced by CreateLink().


Member Data Documentation

CommData* DCDT_InnerLinkManager::hs_cd [private]
 

Definition at line 57 of file DCDT_InnerLinkManager.h.

Referenced by DCDT_InnerLinkManager(), DoYourJob(), and LookForExistingAgora().

HSMsgHeader* DCDT_InnerLinkManager::hs_header [private]
 

Definition at line 61 of file DCDT_InnerLinkManager.h.

Referenced by DCDT_InnerLinkManager(), DoYourJob(), and LookForExistingAgora().

InnerCommData* DCDT_InnerLinkManager::InnerCD [private]
 

Definition at line 56 of file DCDT_InnerLinkManager.h.

Referenced by DCDT_InnerLinkManager(), and Init().

DCDT_InnerChannel* DCDT_InnerLinkManager::InnerChannel [private]
 

Definition at line 55 of file DCDT_InnerLinkManager.h.

Referenced by DCDT_InnerLinkManager(), DoYourJob(), Init(), and LookForExistingAgora().

int DCDT_InnerLinkManager::innerlink_counter [private]
 

Definition at line 59 of file DCDT_InnerLinkManager.h.

Referenced by CreateLink(), DCDT_InnerLinkManager(), and DoYourJob().

InnerCommData * DCDT_InnerLinkManager::InnerStartCD [private]
 

Definition at line 56 of file DCDT_InnerLinkManager.h.

Referenced by DCDT_InnerLinkManager(), and LookForExistingAgora().

InnerCommData * DCDT_InnerLinkManager::localCD [private]
 

Definition at line 56 of file DCDT_InnerLinkManager.h.

Referenced by CreateLink(), CreateName(), DCDT_InnerLinkManager(), LookForExistingAgora(), and SetCDs().

char* DCDT_InnerLinkManager::name [private]
 

Definition at line 60 of file DCDT_InnerLinkManager.h.

Referenced by DCDT_InnerLinkManager().

InnerCommData * DCDT_InnerLinkManager::name_cd [private]
 

Definition at line 56 of file DCDT_InnerLinkManager.h.

Referenced by DCDT_InnerLinkManager(), and DoYourJob().

InnerCommData * DCDT_InnerLinkManager::remoteCD [private]
 

Definition at line 56 of file DCDT_InnerLinkManager.h.

Referenced by CreateLink(), CreateName(), DCDT_InnerLinkManager(), LookForExistingAgora(), and SetCDs().


The documentation for this class was generated from the following files:
Generated on Sun Jun 19 10:35:51 2005 for dcdt by  doxygen 1.3.9.1