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

DCDT_LinkRx.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 dEVICE cOMMUNITIES dEVELOPMENT tOOLKIT 
00003 
00004 DCDT_LinkRx.h
00005 
00006 COPYRIGHT (C) 2002   Alessandro Mazzini (mazzini@airlab.elet.polimi.it)
00007                      Cristian Giussani (cgiussani@fastflow.it)
00008 
00009 This library is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU Lesser General Public
00011 License as published by the Free Software Foundation; either
00012 version 2 of the License, or (at your option) any later version.
00013 
00014 This library is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 Lesser General Public License for more details.
00018 
00019 You should have received a copy of the GNU Lesser General Public
00020 License along with this library; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
00022 
00023 ****************************************************************************/
00024 
00025 #ifndef LINKRX_H
00026 #define LINKRX_H
00027 
00028 #include <DCDT_Member.h>
00029 #include <DCDT_Channel.h>
00030 #include <DCDT_LinkTx.h>
00031 
00040 class DCDT_LinkRx : public DCDT_Member {
00041  public:
00042   DCDT_LinkRx(DCDT_Agora *agora, int id, int r_id);
00043   ~DCDT_LinkRx() {};
00044 
00045   CommData* Prepare(int stat, CommData *l_cd, CommData *r_cd);
00046   void Init();
00047   void DoYourJob(int par = 0);
00048   CommData* Restart(int restart_status, CommData *l_cd, CommData *r_cd);
00049   CommData* GetCommData();
00050   void ResetToConnecting(CommData *l_cd, CommData *r_cd);
00051   void ChangeStatus(int newstat) { status = newstat; };
00052   int ReadStatus() { return status; };
00053   int ReadRemoteID() { return remoteID; };
00054   void SetCDs(CommData *l_cd, CommData *r_cd);
00055   void Close();
00056 
00057  private:
00058   /*
00059     ( ??? )
00060     creation_status, restart_counter, mymask - initialized but never used
00061   */
00062   int linkID, remoteID;
00063   int creation_status, status, restart_counter, lost_counter;
00064   
00066   DCDT_Channel *channel;
00067   
00068   unsigned int mymask[NUMINT_MSGTYPE];
00069   CommData *localCD, *remoteCD;
00070   int i;
00071 
00073   DCDT_Msg  *msgrcv;
00074 
00076   unsigned int *subs_mask_rcv;
00077 
00079   DCDT_LinkTx* LinkTxPtr;
00080 
00081 };
00082 
00083 
00084 #endif //define

Generated on Sun Jun 19 10:35:50 2005 for dcdt by  doxygen 1.3.9.1