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

DCDT_LinkRx Class Reference

Member that receive messages on a channel. More...

#include <DCDT_LinkRx.h>

Inheritance diagram for DCDT_LinkRx:

DCDT_Member List of all members.

Public Member Functions

 DCDT_LinkRx (DCDT_Agora *agora, int id, int r_id)
 ~DCDT_LinkRx ()
CommDataPrepare (int stat, CommData *l_cd, CommData *r_cd)
 Prepare the data structures and open the local channel part.
void Init ()
void DoYourJob (int par=0)
 FSM for the LinkRx member.
CommDataRestart (int restart_status, CommData *l_cd, CommData *r_cd)
CommDataGetCommData ()
void ResetToConnecting (CommData *l_cd, CommData *r_cd)
void ChangeStatus (int newstat)
int ReadStatus ()
int ReadRemoteID ()
void SetCDs (CommData *l_cd, CommData *r_cd)
void Close ()

Private Attributes

int linkID
int remoteID
int creation_status
int status
int restart_counter
int lost_counter
DCDT_Channelchannel
 Channel implementation.
unsigned int mymask [NUMINT_MSGTYPE]
CommDatalocalCD
CommDataremoteCD
int i
DCDT_Msgmsgrcv
 Last message received.
unsigned int * subs_mask_rcv
 Message subscription mask receveid from the remote Agora.
DCDT_LinkTxLinkTxPtr
 Pointer to the transmission part of this channel.

Detailed Description

Member that receive messages on a channel.

This member implements only channel policies for the message reception, the real reception was implements in the DCDT_Channel specified by channel. The main goals for this member are:

Definition at line 40 of file DCDT_LinkRx.h.


Constructor & Destructor Documentation

DCDT_LinkRx::DCDT_LinkRx DCDT_Agora agora,
int  id,
int  r_id
 

Definition at line 33 of file DCDT_LinkRx.cpp.

References i, linkID, LinkTxPtr, localCD, msgrcv, mymask, remoteCD, remoteID, restart_counter, and status.

DCDT_LinkRx::~DCDT_LinkRx  )  [inline]
 

Definition at line 43 of file DCDT_LinkRx.h.


Member Function Documentation

void DCDT_LinkRx::ChangeStatus int  newstat  )  [inline]
 

Definition at line 51 of file DCDT_LinkRx.h.

References status.

Referenced by DCDT_LinkTx::DoYourJob().

void DCDT_LinkRx::Close  )  [virtual]
 

Reimplemented from DCDT_Member.

Definition at line 229 of file DCDT_LinkRx.cpp.

References channel, and DCDT_Channel::Close().

Referenced by DoYourJob().

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

FSM for the LinkRx member.

  • L_WAITING: Wait for a connection and an MT_CONNECT message
  • L_CONNECTING: Connect to a remote link and send an MT_CONNECT message
  • L_RESETTOCONN: Stop and restart the channel
  • L_WORKING: Receive messages and if needed share it with local members
  • L_STOPPING: End all the communications
  • L_LOST: The communication is lost, if the channel remains in this state for a certain amount of time it can be deleted and his resources can be released.

In any state if a timeout occurs the state is always set to L_STOPPING.

Implements DCDT_Member.

Definition at line 77 of file DCDT_LinkRx.cpp.

References DCDT_Agora::ActivateMember(), DCDT_Agora::AddSysMember(), DCDT_LinkTx::ChangeStatus(), channel, Close(), DCDT_Finder::CloseLink(), DCDT_TRC_COMM, Delay(), DCDT_Channel::Dispose(), DCDT_Msg::GetPayload(), L_CONNECTING, L_LOST, L_RESETTOCONN, L_STOPPING, L_WAITING, L_WORKING, LINK_LOST_TIMER, linkID, LinkTxPtr, localCD, lost_counter, msgrcv, DCDT_LinkTx::Prepare(), DCDT_Msg::ReadType(), DCDT_Channel::Receive(), DCDT_Channel::ReceiveTimerOff(), remoteCD, remoteID, DCDT_Agora::RemoveMember(), Restart(), DCDT_LinkTx::Restart(), DCDT_Channel::SetTimers(), DCDT_Member::ShareMsg(), DCDT_Channel::StartConn(), status, DCDT_Channel::Stop(), subs_mask_rcv, DCDT_LinkTx::Subscribe(), TRC_PRINT, DCDT_Member::UnSubscribeAll(), and DCDT_Channel::WaitConn().

CommData * DCDT_LinkRx::GetCommData  ) 
 

Definition at line 208 of file DCDT_LinkRx.cpp.

References channel, and DCDT_Channel::GetCommData().

void DCDT_LinkRx::Init  )  [virtual]
 

Reimplemented from DCDT_Member.

Definition at line 46 of file DCDT_LinkRx.cpp.

CommData * DCDT_LinkRx::Prepare int  stat,
CommData l_cd,
CommData r_cd
 

Prepare the data structures and open the local channel part.

l_cd must be specified, at exit every null field will contains values defined by the kernel.

Returns:
Pointer to the communications data for the channel

Definition at line 55 of file DCDT_LinkRx.cpp.

References channel, CommData::CreateChannel(), creation_status, DCDT_TRC_COMM, DCDT_Channel::GetCommData(), DCDT_Channel::Open(), DCDT_Channel::Prepare(), DCDT_Channel::SetTimers(), status, and TRC_PRINT.

Referenced by DCDT_InnerLinkManager::CreateLink(), and DCDT_Finder::CreateLink().

int DCDT_LinkRx::ReadRemoteID  )  [inline]
 

Definition at line 53 of file DCDT_LinkRx.h.

Referenced by DCDT_Finder::IsPresent().

int DCDT_LinkRx::ReadStatus  )  [inline]
 

Definition at line 52 of file DCDT_LinkRx.h.

Referenced by DCDT_Finder::DoYourJob().

void DCDT_LinkRx::ResetToConnecting CommData l_cd,
CommData r_cd
 

Definition at line 213 of file DCDT_LinkRx.cpp.

References SetCDs(), and status.

Referenced by DCDT_Finder::DoYourJob().

CommData * DCDT_LinkRx::Restart int  restart_status,
CommData l_cd,
CommData r_cd
 

Definition at line 198 of file DCDT_LinkRx.cpp.

References channel, creation_status, DCDT_Channel::GetCommData(), DCDT_Channel::Prepare(), DCDT_Channel::Reopen(), DCDT_Channel::SetTimers(), and status.

Referenced by DoYourJob(), and DCDT_Finder::DoYourJob().

void DCDT_LinkRx::SetCDs CommData l_cd,
CommData r_cd
 

Definition at line 219 of file DCDT_LinkRx.cpp.

References localCD, and remoteCD.

Referenced by ResetToConnecting().


Member Data Documentation

DCDT_Channel* DCDT_LinkRx::channel [private]
 

Channel implementation.

Definition at line 66 of file DCDT_LinkRx.h.

Referenced by Close(), DoYourJob(), GetCommData(), Prepare(), and Restart().

int DCDT_LinkRx::creation_status [private]
 

Definition at line 63 of file DCDT_LinkRx.h.

Referenced by Prepare(), and Restart().

int DCDT_LinkRx::i [private]
 

Definition at line 70 of file DCDT_LinkRx.h.

Referenced by DCDT_LinkRx().

int DCDT_LinkRx::linkID [private]
 

Definition at line 62 of file DCDT_LinkRx.h.

Referenced by DCDT_LinkRx(), and DoYourJob().

DCDT_LinkTx* DCDT_LinkRx::LinkTxPtr [private]
 

Pointer to the transmission part of this channel.

Definition at line 79 of file DCDT_LinkRx.h.

Referenced by DCDT_LinkRx(), and DoYourJob().

CommData* DCDT_LinkRx::localCD [private]
 

Definition at line 69 of file DCDT_LinkRx.h.

Referenced by DCDT_LinkRx(), DoYourJob(), and SetCDs().

int DCDT_LinkRx::lost_counter [private]
 

Definition at line 63 of file DCDT_LinkRx.h.

Referenced by DoYourJob().

DCDT_Msg* DCDT_LinkRx::msgrcv [private]
 

Last message received.

Definition at line 73 of file DCDT_LinkRx.h.

Referenced by DCDT_LinkRx(), and DoYourJob().

unsigned int DCDT_LinkRx::mymask[NUMINT_MSGTYPE] [private]
 

Definition at line 68 of file DCDT_LinkRx.h.

Referenced by DCDT_LinkRx().

CommData * DCDT_LinkRx::remoteCD [private]
 

Definition at line 69 of file DCDT_LinkRx.h.

Referenced by DCDT_LinkRx(), DoYourJob(), and SetCDs().

int DCDT_LinkRx::remoteID [private]
 

Definition at line 62 of file DCDT_LinkRx.h.

Referenced by DCDT_LinkRx(), and DoYourJob().

int DCDT_LinkRx::restart_counter [private]
 

Definition at line 63 of file DCDT_LinkRx.h.

Referenced by DCDT_LinkRx().

int DCDT_LinkRx::status [private]
 

Definition at line 63 of file DCDT_LinkRx.h.

Referenced by ChangeStatus(), DCDT_LinkRx(), DoYourJob(), Prepare(), ResetToConnecting(), and Restart().

unsigned int* DCDT_LinkRx::subs_mask_rcv [private]
 

Message subscription mask receveid from the remote Agora.

Definition at line 76 of file DCDT_LinkRx.h.

Referenced by DoYourJob().


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